Re: alsa-lib: snd_pcm_delay and friends do not account for a write being currently in progress

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

 



On Thu, 2010-06-03 at 19:03 +0200, Clemens Ladisch wrote:
> John Lindgren wrote:
> > I understand that snd_pcm_delay and snd_pcm_writei currently "interfere
> > with each other" in that snd_pcm_delay returns wrong values if called
> > during snd_pcm_writei.  That is the problem my patch tries to correct.
> 
> These values are not wrong; the problem is that your program does not
> have enough information to interpret it correctly.

Same thing.

> > What would be the cleanest way to interrupt snd_pcm_wait when we need to
> > stop the stream?  Will snd_pcm_drop work?
> 
> *sigh*
> This will _not_ work.
> 
> You have to use poll so that you can send your loop a message (through
> a pipe/eventfd/whatever) that tells it to stop.

Ugh.  It seems you are determined to avoid complexity in ALSA at the
expense of complexity in programs that use it.

At any rate, at least I know what needs to be done now, so thanks for
that.

John Lindgren

_______________________________________________
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