[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    Re: winecoreaudio.drv: Improve underrun handling
From:       Andrew Eikum <aeikum () codeweavers ! com>
Date:       2012-01-30 19:08:54
Message-ID: 20120130190854.GH32753 () foghorn ! codeweavers ! com
[Download RAW message or body]

On Mon, Jan 30, 2012 at 06:52:36PM +0100, Joerg-Cyril.Hoehle@t-systems.com wrote:
> Andre Eikum wrote:
> >>> +        sc = AudioQueueEnqueueBufferWithParameters(This->aqueue,
> >>> +                This->public_buffer, 0, NULL, 0, 0, 0, NULL, 
> >>> + &req_time, &start_time);
> >> 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
> 
> What "this" do you mean exactly?
> a) like dmix, silently skip over megabytes of submitted frames
>    should they happen to be late w.r.t. wall time?
> b) Play any submitted frames ASAP to the speaker?
>    You said in #29585 that OSS4 does this.
> 
> What mmdevapi needs is b). It does not appear to care about underruns
> and has no dmix-like notion of trying to catch up.
> 

Yes. AudioQueue does (a), which I'm trying to work around by telling
the queue to play the buffer at any time after the queue's current
time when we detect an underrun (although detecting when the queue is
empty needs some work, as Ken pointed out).

In ALSA, we use snd_pcm_recover() after underruns, but AudioQueue
doesn't seem to have an analogous function that works well.

Andrew


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic