=?UTF-8?Q?J=C3=B6rg=20H=C3=B6hle=20?=: mciseq: Send MCI_PLAY notifications like w2k-w7 do.

Alexandre Julliard julliard at winehq.org
Mon Oct 8 13:39:57 CDT 2012


Module: wine
Branch: master
Commit: 310b2a5114e2c5060f75973f4ae72c696f7c1a10
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=310b2a5114e2c5060f75973f4ae72c696f7c1a10

Author: Jörg Höhle <hoehle at users.sourceforge.net>
Date:   Mon Oct  1 21:53:04 2012 +0200

mciseq: Send MCI_PLAY notifications like w2k-w7 do.

---

 dlls/mciseq/mcimidi.c |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/dlls/mciseq/mcimidi.c b/dlls/mciseq/mcimidi.c
index e6927ac..e77d3f8 100644
--- a/dlls/mciseq/mcimidi.c
+++ b/dlls/mciseq/mcimidi.c
@@ -1150,13 +1150,18 @@ static DWORD MIDI_mciPlay(WINE_MCIMIDI* wmm, DWORD dwFlags, LPMCI_PLAY_PARMS lpP
 	MIDI_mciStop(wmm, MCI_WAIT, NULL);
 	wmm->dwPositionMS = dwStartMS;
     } /* else use existing player. */
-    wmm->dwEndMS = dwEndMS;
+    if (wmm->dwEndMS != dwEndMS) {
+	oldcb = InterlockedExchangePointer(&wmm->hCallback, NULL);
+	if (oldcb) mciDriverNotify(oldcb, wmm->wDevID, MCI_NOTIFY_ABORTED);
+	wmm->dwEndMS = dwEndMS;
+    }
 
     TRACE("Playing from %u to %u\n", dwStartMS, dwEndMS);
 
-    oldcb = InterlockedExchangePointer(&wmm->hCallback,
-	(dwFlags & MCI_NOTIFY) ? HWND_32(LOWORD(lpParms->dwCallback)) : NULL);
-    if (oldcb) mciDriverNotify(oldcb, wmm->wDevID, MCI_NOTIFY_ABORTED);
+    if ((dwFlags & MCI_NOTIFY) && lpParms) {
+	oldcb = InterlockedExchangePointer(&wmm->hCallback, HWND_32(LOWORD(lpParms->dwCallback)));
+	if (oldcb) mciDriverNotify(oldcb, wmm->wDevID, MCI_NOTIFY_SUPERSEDED);
+    }
 
     dwRet = ensurePlayerThread(wmm);
 




More information about the wine-cvs mailing list