[linux-audio-dev] jack_ringbuffer_read_space() question

Paul Davis paul at linuxaudiosystems.com
Mon Jul 12 18:11:05 UTC 2004


>I have a program with some (p)threads, and a jack ringbuffer. One
>thread is writing to the ringbuffer, and another is reading from it.
>
>The question is: is it (thread-)safe to have a _third_ thread that
>looks at the ringbuffer via jack_ringbuffer_read_space() at random
>times to determine how much data is in the ringbuffer? This third
>thread does not actually read nor write any data to/from the
>ringbuffer, just wants to know the amount of data in it.

it cannot accurately measure the available data or space. so it
depends what you plan to do with the data.



More information about the Linux-audio-dev mailing list