>Well, it doesn't seem to be completely okay... I occasionally get the error
>"Initial write error: broken pipe" and it just shuts down (well, it actually
>just hangs because the incallback mutex is never cleared - I need a timeout
>in there) the callback if things get too much for the poor thing to take.  I
>did also notice when running the pcm example in async mode, if I started
>moving scrollbars and the like in my KDE environment, continuous glitches
>came into the audio.

no suprise there. i imagine you were handling the "audio device ready"
SIGIO signal in the same thread as the GUI, right? common mistake #1.

>Even if I decide not to use async mode, I'm going to have to redo my code a
>bit more to work properly under Linux... while it was fine under Win9x-style
>multitasking, it's now dropping out all over the place...

i'm sad to say this, but most people don't have a clue about writing
real-time audio applications for linux (or POSIX systems in
general). the issues are subtle, some of them are complex. ALSA
doesn't address them, nor does it seek to (at least not at this time).

i wrote JACK (http://jackit.sf.net/) partly to help with this. but
JACK is not finished yet, and sometimes it seems that an entire book
is needed. i've spent the last 3 years doing nothing (code-wise) but
writing real time audio+MIDI apps, and the accumulated information is
full of stuff that continually trips people up.

i don't know how to make specific suggestions in your case, because i
have no idea what to do. but as a general suggestion, you should join
the linux-audio-development mailing list, and read the source code of
lots of real time audio code. async mode is not the right choice for
apps in that class: it might work, but the code will need to be using
threads anyway, so why bother?

--p


_______________________________________________
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

Reply via email to