Re: XRUN happens too often.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 
> ALSA does not generate threads for you like this.  I was referring to
> your application's audio thread, assuming that your app is indeed
> multithreaded.
> 
> The duration probably varies because the call to snd_pcm_writei() will
> block until there is enough space in the ALSA ringbuffer to receive
> your data.
> 
> Lee
> 

I found that there will be a thread generated after calling snd_pcm_open().
I use command 'ps' to check it.
Due to this I guess snd_pcm_writei() only put the data into the buffer of the 
thread 'pcm'.

This thread then schedules of mixes the audio data, and put it into the buffer 
of ALSA driver.
ALSA ringbuffer only belongs to ALSA library, and ALSA driver uses anoother 
buffer in kernel.
Thus, there must be a thread that can put the data in ALSA ringbuffer into the 
buffer of ALSA driver.



_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux