[linux-audio-dev] jack_callback <-> rest of the world

Dan Mills dmills at spamblock.demon.co.uk
Sun Oct 30 13:08:51 UTC 2005


On Sunday 30 October 2005 11:11, Florian Schmidt wrote:
>
> Also the basic problem of signalling (in this case the disk thread that
> there is work to do) still persists even with lockless ringbuffers. The
> other thinkable approach would be to make the diskthread wakeup
> regularly and check whether data is available in the ringbuffer. This is
> nasty, too, and unsuitable for some situations.
>

Actually this approach can work very well, just make sure that the ring 
buffers are sufficiently large and make the disk thread run at a lower RT 
priority then any of the audio handling threads. 

This is the approach taken in the rivendell broadcast automation system and it 
seems to work fine even with the disk array mounted over NFS. 

The trick is to remember that things like gain changes and effects can be 
applied in the process thread, so there is no need for big latency even with 
several seconds of disk buffer per file. 

IIRC we wake up the disk thread at a few tens of HZ. 

The downside is that it is kind of hard on memory usage when you need to 
support lots of parallel playbacks. 

Regards, Dan. 



More information about the Linux-audio-dev mailing list