[PATCH 21/25] mciseq: Remain responsive while processing large delays.

Joerg-Cyril.Hoehle at t-systems.com Joerg-Cyril.Hoehle at t-systems.com
Fri Oct 5 04:47:58 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: 0021-mciseq-Remain-responsive-while-processing-large-del.patch
Type: application/octet-stream
Size: 3322 bytes
Desc: 0021-mciseq-Remain-responsive-while-processing-large-del.patch
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20121005/19018530/attachment.obj>


More information about the wine-patches mailing list