winmm: Allow new sounds to interrupt previous PlaySound invocations.

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


Hi,

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
http://source.winehq.org/git/wine.git/commitdiff/15ad749eced53e0c33454970bfc2bdb58b64f92b

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.

Regards,
 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: <http://www.winehq.org/pipermail/wine-patches/attachments/20120216/31bfde0a/attachment-0001.obj>


More information about the wine-patches mailing list