[Clam-devel] Re: [Portaudio] Xruns using alsa api

Arve Knudsen aknuds-1 at broadpark.no
Wed Mar 14 13:03:03 PDT 2007


Hi David

On Mon, 12 Mar 2007 20:27:02 +0100, David García Garzón  
<dgarcia at iua.upf.edu> wrote:

> Hi, all.
>
> We are trying to use Portaudio as the default audio backend for CLAM. We
> already used it on Windows and got some xruns depending on the machine,  
> but
> for Linux we got a lot of continuous xruns either by using OSS api (not
> reported to the callback but heard) and Alsa api (reported and heard). I
> tested it in several Kubuntu machines. And got the same bad results.
>
> Such xruns don't happen neither by using directly JACK or by using Alsa  
> in
> blocking mode. For direct Alsa, we gave some priority to the audio  
> thread.
> Maybe that could be the trick but firstly i don't know how the proper  
> way of
> bumping the portaudio callback priority, and, secondly it is strange for  
> me
> that portaudio doesn't work well as is.
>
> I am missing something? Any clues?

It is simply possible that this is down to bottlenecks in the PA ALSA  
layer; it always worked alright for my purposes, but people have reported  
less than perfect performance from time to time. I have done some tweaking  
of the implementation in the past, but I don't see myself making major  
improvements to PA ALSA -- professional obligations must receive priority  
and I don't do any audio-related development these days. I can assist,  
however, in making sense of the code if some brave soul were to try and  
improve on it.

Arve





More information about the clam-devel mailing list