winecoreaudio.drv: Improve underrun handling

Andrew Eikum aeikum at codeweavers.com
Mon Jan 30 11:18:48 CST 2012


On Mon, Jan 30, 2012 at 11:03:52AM +0100, Joerg-Cyril.Hoehle at t-systems.com wrote:
> +        sc = AudioQueueEnqueueBufferWithParameters(This->aqueue,
> +                This->public_buffer, 0, NULL, 0, 0, 0, NULL, &req_time, &start_time);
> I advise against setting req_time.  This can only fragilize the
> system.  What if req_time is miscomputed or there's a delay?
> NULL=ASAP is exactly what we want.  We don't want ALSA/dmix behavior,
> where it'll silently skip over late frames in order to catch up
> (dunno if MacOSX does this but in my eyes that doesn't matter).

The AudioQueue API does do this, and that's the behavior I was trying
to work around. See bug 29602. Other options like AudioQueueReset() or
AudioQueueFlush() don't seem to do what we want, so this is the best
solution I found. What do you mean by it doesn't matter?

> >if(list_count(...) == 0)
> I once wrote a patch to turn such a pattern into if(list_empty(...))
> 

Oops, I forgot that existed. I'll fix that in the next version.

Andrew



More information about the wine-devel mailing list