[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
Wed Oct 17 03:36:51 CDT 2012
Hi,
[unmodifed, except the context diff touches a line modified by patch 20]
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.
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: 3169 bytes
Desc: 0002-mciseq-Remain-responsive-while-processing-large-del.patch
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20121017/d5d290d1/attachment.obj>
More information about the wine-patches
mailing list