sound/gui interaction
hi there linux-sound,
i'm working on a linux sound app. my signal processing loop runs in its own thread. whenever i do a full drawing update of my GUI, i get a glitch in the sound output. my CPU usage goes up during the redraw, but not very much. does anyone know what's happening and how i can avoid it? i would think that doing the graphics and the sound in seperate threads would shield the one from the other, but apparently that's not the case. is this an XWindows issue perhaps?
thanks,
douglas
Signature · 4 lines
douglas irving repetto
http://music.columbia.edu/~douglas
the music-dsp mailing list and website:
http://shoko.calarts.edu/musicdspQuoted 10 lines · douglas irving repetto
hi there linux-sound,
i'm working on a linux sound app. my signal processing loop runs in its own thread. whenever i do a full drawing update of my GUI, i get a glitch in the sound output. my CPU usage goes up during the redraw, but not very much. does anyone know what's happening and how i can avoid it? i would think that doing the graphics and the sound in seperate threads would shield the one from the other, but apparently that's not the case. is this an XWindows issue perhaps?
your thinking is pretty much correct (as threads in Linux are independently scheduled). What's most important is which thread is writing to the sound device -- make sure you're not doing your write()s in the same thread as dealing with X events.
If that's not the case... can we see the code?
Conrad.