Major mmdevapi and winmm audio bugs

Andrew Eikum aeikum at codeweavers.com
Tue Feb 28 09:27:26 CST 2012


On Tue, Feb 28, 2012 at 08:24:37AM -0600, Andrew Eikum wrote:
> I'm investigating native TimerQueue's operation now. If it turns out
> that TimerQueue isn't sufficient, we'll probably just switch over to
> using poll() like winmm's timer stuff does.
> 

And, not too surprisingly, TimerQueue isn't sufficient. I've attached
my tests here. The tests ask to execute the callback every 12 ms. On
my Windows 7 VM, I found that it executed with intervals like:
20, 10, 10, 10, 10, 20, 10, 10, 10, 10, ...
With an 11 occasionally interspersed.

So, forget that.

Winmm's timer functions use poll() with a timeout value, subtracting
the time elapsed curing the callback. This works quite well in dsound.

The Win32 API also provides the SetTimer API. But that depends on a
message queue, which is a hassle I don't know if we want to bother
with in the drivers (plus, it may be no more reliable than the
TimerQueues).

Since we're already using poll() in winmm and it seems to work well,
that would be my suggestion.

Any thoughts?

Andrew
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0012-INCOMPLETE-kernel32-tests-Test-timer-interval-consis.patch
Type: text/x-diff
Size: 2802 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20120228/5b3f72ae/attachment.patch>


More information about the wine-devel mailing list