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

Joerg-Cyril.Hoehle at t-systems.com Joerg-Cyril.Hoehle at t-systems.com
Fri Oct 12 04:18:42 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.
My notes mention that at least one application is affected by this.

We could have waited for an event in such a case, however
- the currently used Sleep has little overhead whereas
- 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 and that won't allow a zero wmm->nDivision.

Now hopefully we'll see all 25 MIDI patches in wine-1.5.15.

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: 3173 bytes
Desc: 0002-mciseq-Remain-responsive-while-processing-large-del.patch
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20121012/eba3edd9/attachment-0001.obj>


More information about the wine-patches mailing list