[Bug 29602] Sound stops after first sound/audio output in Age of Empires 2.

wine-bugs at winehq.org wine-bugs at winehq.org
Wed Jan 25 10:10:01 CST 2012


--- Comment #14 from Andrew Eikum <aeikum at codeweavers.com> 2012-01-25 10:10:01 CST ---
Another AudioQueue bug, it seems.

AudioQueueEnqueueWithParameters() returns the time in samples since device
start when the given buffer will begin playing. In theory, AudioQueueGetTime()
will return the same value when that buffer starts playing through the

Instead, AudioQueueEnqueueWithParameters() returns a value which is basically
the sum of all written samples (that is, ignoring underruns).
AudioQueueGetTime() returns the clock time since the queue started, in samples
(including underruns).


Enqueue(100) -> start_time = 0
Enqueue(200) -> start_time = 100
GetCurrentTime() -> ~150 or something reasonable
Sleep(5 seconds)
Enqueue(300) -> start_time = 300 = 100 + 200
GetCurrentTime() -> 50000 (that is, 5 seconds in terms of samples)

I'm trying to tweak our usage of the API so it turns out the right numbers.

Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.

More information about the wine-bugs mailing list