[LAD] some questions about writing a jack client

fons at kokkinizita.net fons at kokkinizita.net
Wed Nov 25 17:41:44 UTC 2009


On Wed, Nov 25, 2009 at 12:17:39PM +0200, mutil wrote:

> 	I am trying to write a c++/qt4 jack client which mix 2 inputs and has a jack 
> output.
> ...
> 	The way it's currently written makes use of mutexes and locks to pass the 
> data beetween a custom global buffer.

The first question to ask is if you really need the buffer
and mutexes. Normally in a Jack client you'd do the audio
processing in the process() callback, and there's no need
to buffer signals unless you want to do something with them
that can't be done and finished immediately. Examples are
reading/writing from/to files, or displaying the waveform
or spectrum. For those you need to transfer the signals
to/from non-realtime threads.

Just mixing two inputs to one output would not require this.

Ciao,

-- 
FA

Io lo dico sempre: l'Italia è troppo stretta e lunga.




More information about the Linux-audio-dev mailing list