[CLAM] ALSA, AudioIn & dropouts

David García Garzón dgarcia at iua.upf.edu
Thu Dec 11 17:33:56 PST 2008


The dot indicates an xrun. AudioManager and AudioOut, are obsolete, and we are 
not testing them at all, it is possible that we might introduce some 
regression. You should use instead an AudioSource inside a network with a 
PANetworkPlayer. Take a look to this example:

http://iua-
share.upf.edu/wikis/clam/index.php/Constructing_and_playing_a_simple_network

I don't know for sure whether this will solve the xrun problem but it could. 
Anyway it is the way to go. Tell us whether the network approach works, 
please.

David.


El Wednesday 10 December 2008 16:14:03 Patrick Pogscheba va escriure:
> Hello,
>
> I'm a new user of the clam-framework and i have a question about audio
> capturing. I've created an AudioIn-Object with the proper settings. For
> testing purposes i've written the audio from this to an audio file and
> encoutered many dropouts, especially when i'm moving the mouse. In other
> applications i don't get this behaviour from my audioinput. Each time a
> dropout occurs, there will be a "." in my terminal window. Do you guys have
> an idea why i get this behaviour ??
>
> The Code:
>
>         int _sampleRate = 8000;
>         int _bufferSize = 256;
>
>
>
>
>         AudioManager audioManager(_sampleRate,_bufferSize);
>
>
>         AudioIOConfig cfgInLeft;
>         cfgInLeft.SetDevice("default:default");
>         cfgInLeft.SetChannelID(0);
>         cfgInLeft.SetFrameSize(_bufferSize);
>         cfgInLeft.SetSampleRate(_sampleRate);
>
>         AudioIn inLeft(cfgInLeft);
>
>         audioManager.Start();
>
>         inLeft.Start();
>
>         do
>         {
>
>             inLeft.Do();
>
>         }
>         while (i<100);
>
>
> My System:
> Ubuntu Studio (8.04) on a Intel Core Duo machine and Intel HDA sound.
>
>
> Perhaps i'm missing something in my code to prevent the dropouts. I've
> worked through some of the examples, but couldn't get wiser on this...
>
> thx in advance & greets
>
> Patrock

-- 
David García Garzón
(Work) dgarcia at iua dot upf anotherdot es
http://www.iua.upf.edu/~dgarcia





More information about the clam-users mailing list