[PATCH 21/25] mciseq: Remain responsive while processing large delays. (try 2)

Joerg-Cyril.Hoehle at t-systems.com Joerg-Cyril.Hoehle at t-systems.com
Wed Oct 10 03:22:16 CDT 2012


Hi,

some MIDI initialisation files contain huge delays
(I can't remember whether KDE's silence.mid is one such file).
While sleeping and unlike native, the Wine driver was completely
unresponsive to Pause/Stop/Close.

We could have waited for an event in such a case, however
- the currently used Sleep has little overhead while
- WaitForSingleObject(hEvent, time) goes through the server,
  so I don't like it much as a time base
and I observed that w9x continues to update Status Position
(unlike w7), so I implemented somewhat compatible behaviour,
ticking once per second.

static  DWORD   MIDI_ConvertPulseToMS(WINE_MCIMIDI* wmm, DWORD pulse)
-    if (wmm->nDivision == 0) {
Since computing maxDelta corresponds to the inverse of PulseToMS,
I checked that function.  As mentioned about patch 15/25, this check has
become superfluous: you cannot call Status anymore without a valid MIDI file.

Regards,
        Jörg Höhle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-mciseq-Remain-responsive-while-processing-large-del.patch
Type: application/octet-stream
Size: 3264 bytes
Desc: 0002-mciseq-Remain-responsive-while-processing-large-del.patch
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20121010/5ef9e03a/attachment.obj>


More information about the wine-patches mailing list