winmm: Allow new sounds to interrupt previous PlaySound invocations.

Joerg-Cyril.Hoehle at Joerg-Cyril.Hoehle at
Thu Feb 16 03:10:09 CST 2012


this fixes bug #28413.

You may object to the use of waveOutReset from within winmm_CS. Until now,
winmm_CS has been used by unrelated entities such as winmm:time, MCI and MMIO to
protect short iterations across independent linked lists such as MCIDrivers.
waveOutReset may take more time. Fortunately the current WINMM_Reset is much
more straightforward than the old pre-mmdevapi one.

Note that before I reverted Vedran's code one year ago, waveOutReset had been
used within winmm_cs from 2007 to 2011

A later solution may be to give each of these 4 entities their own CS.  However it will be
mind-boggling to assess whether a unique CS had the nice benefit of allowing one thread
to enter all 4 sections, e.g. from within a timer callback thread call whatever winmm
function that closes an MCI devices and starts a PlaySound that uses MMIO...

In the Lemmix game, even at release rate 99, animation was continuous and the sound effects
ok, esp. the many interrupted "yippie!" as well as the nuclear explosion. I have not compared
with native behaviour.

 Jörg Höhle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-winmm-Allow-new-sounds-to-interrupt-previous-PlaySo.patch
Type: application/octet-stream
Size: 4419 bytes
Desc: 0002-winmm-Allow-new-sounds-to-interrupt-previous-PlaySo.patch
URL: <>

More information about the wine-patches mailing list