Re: snd_pcm_sw_params_set_xfer_align replacement?

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

 



Aaron J. Grier wrote:
> On Mon, Jul 21, 2008 at 10:37:09AM +0200, Clemens Ladisch wrote:
> > You get partial reads/writes only when you ask for it (by using non-
> > blocking mode) or when an error occurs.
>
> I want non-blocking behavior (return immediately if there is no data
> available), but I don't want to have to deal with partial reads.  I
> figured out a workaround using snd_pcm_avail_update(), but I'm wondering
> if there isn't a better way.

You could write your own read function that calls snd_pcm_read*()
repeatedly until you have as much data as you want, but this is probably
more complex than just checking for data before doing a blocking read.


Regards,
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