Re: Broken playback

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

 



Gabriele Melia wrote:
> > Try non-blocking mode (see the snd_pcm_nonblock function). In non-
> > blocking mode, the writei call will only write as much data as can be
> > written without waiting (or returns -EAGAIN if the buffer is already
> > full at the moment).
> 
> I'm already in this case

Then the problem is not that the writei call takes too long.
An underrun can happen only when your code takes too much time between
two consecutive calls to writei.

> How to set the buffer size of the circular buffer in which i store the
> pcm that is then called by alsa?

snd_pcm_hw_params_set_buffer_size_near(), but the allowed values are
hardware dependent.  You might want to add your own circular buffer that
is bigger than ALSA's.


HTH
Clemens
_______________________________________________
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