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