[linux-audio-dev] General strategies for RT Audio Thread

Alfons Adriaensen fons.adriaensen at alcatel.be
Fri May 2 06:40:01 UTC 2003


On Fri, May 02, 2003 at 10:51:27AM +0200, Alexander Lenhardt wrote:

> I'm trying to write very simple software synthesizer under Linux just for my
> own educational purpose.
> but one problem i came over is the following:
> I made the audio thread shced_fifo with max priority. My GUI thread is
> sched_other. To allow the GUI to rerspond, I thought i could just put the
> audio thread to sleep for the playing length of the buffer (7ms).

There's something fundamentally wrong here. Normally, the audio thread
synchronises with the audio (ALSA) driver. It will be waiting most of the
time, giving other threads a chance to run, and the problem you describe
then does not exist. This is really the first thing you should get right.

FA





More information about the Linux-audio-dev mailing list