my app runs quite right, in the normal play mode. then
i started adding some
effects. after adding 6 x 31 band eqs i have tons of xruns. but the cpu is
only at 60% . A friend of mine told me, this can be because of the usage of
only one jack buffer.
this means
- get jack callback
- get the buffer from jack
- fill the buffer with data
- copy it back to jack
is there a way to specify more than one buffer with jack ( like direct sound )
or do i need the ringbuffer. maybe someone can give my a link to an example.
you friend is wrong. JACK's default configuration (2 software buffers or
interrupts per hardware buffer) is the same as ASIO. You can use the -n
flag or the equivalent control in the setup dialog of qjackctl to get
more, but there are many cards that will only accept specific
combinations of software buffer counts and sample rate. you may have to
experiment to find the best.
however, this is not necessarily the right approach to handling xruns.
its worth trying. a better start is to check if the xruns go away or
occur less frequently with a larger buffer size.
--p