[linux-audio-dev] xruns

conrad berhörster conrad.berhoerster at gmx.de
Wed Nov 23 12:25:16 UTC 2005


Am Sonntag 20 November 2005 14:29 schrieb Paul Davis:
> > 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
hi Paul,
thanks to your reply. I think, i should describe my problem more detailed. 
For a customer, wrote an app for a 5.1 system. The system is slackware box and 
this terratec phase 28 card.  the kernel is a rt patched 2.6.14
All of the 6 channels need to have a 10 -band EQ, an 31-band  EQ, and a 
reverb. Each effect works well if i only use it alone.  But if i try to set 
them up in a chain, i got tons of xruns. the app is (roughly described) 
implemented as the example clients . as described above, the app only 
produces the sound only, if it's needed. 

my inner voices (oh well, lots of them) tell me, that  the app doesn't provide 
enough sounddata to jack. so jack aka ALSA produces an xrun. right ? 
what puzzles me, is the fact, that the CPU is only at 60% . so there is enough 
power, to produce the data . 
The first idea was, to handle one buffer for each channel. this i would do 
with APIs like DirectSound. 
But since JACK only handles 2 buffers as default, the app can provide this 
buffers and copy the data into the JACK buffer. are there any comments for 
this disposition. 
How big should this buffers are. 

and a word to christoph: i had could be a possibility, but IRQ 10 is only used 
once - from the soundcard. 
thanks for comments c~




More information about the Linux-audio-dev mailing list