In terms of other optimization, you can remove the call to TIME_MMTimeStart in most of the places, except for a timer creation. The other places rely on it to get WINMM_SysTimeMS updated, but since you killed it...
Good point.
I'd mainly like to get rid of the poor anti-race scheme that's implemented (we can do better than that).
Done.
But maybe we should start with this patch (and deal with the bugs it introduces <grin>), and I can mark a FIXME to make that improvement in the future.
Done.
Full patch attached; change from patch2 attached as well; if this looks clean, I'll submit it formally.
Cheers,
Jeremy