Commit 0e675165 authored by Jörg Höhle's avatar Jörg Höhle Committed by Alexandre Julliard

mciseq: Play returns MCIERR_OUTOFRANGE as required.

parent 4dbceec8
...@@ -1170,17 +1170,19 @@ static DWORD MIDI_mciPlay(WINE_MCIMIDI* wmm, DWORD dwFlags, LPMCI_PLAY_PARMS lpP ...@@ -1170,17 +1170,19 @@ static DWORD MIDI_mciPlay(WINE_MCIMIDI* wmm, DWORD dwFlags, LPMCI_PLAY_PARMS lpP
return MCI_SendCommandAsync(wmm->wDevID, MCI_PLAY, dwFlags, (DWORD_PTR)lpParms, sizeof(MCI_PLAY_PARMS)); return MCI_SendCommandAsync(wmm->wDevID, MCI_PLAY, dwFlags, (DWORD_PTR)lpParms, sizeof(MCI_PLAY_PARMS));
} }
if (lpParms && (dwFlags & MCI_TO)) {
dwEndMS = MIDI_ConvertTimeFormatToMS(wmm, lpParms->dwTo);
/* FIXME: if (dwEndMS > length) return MCIERR_OUTOFRANGE; */
} else {
dwEndMS = 0xFFFFFFFFul; /* FIXME: dwEndMS = length; */
}
if (lpParms && (dwFlags & MCI_FROM)) { if (lpParms && (dwFlags & MCI_FROM)) {
dwStartMS = MIDI_ConvertTimeFormatToMS(wmm, lpParms->dwFrom); dwStartMS = MIDI_ConvertTimeFormatToMS(wmm, lpParms->dwFrom);
} else { } else {
dwStartMS = wmm->dwPositionMS; dwStartMS = wmm->dwPositionMS;
} }
if (dwEndMS < dwStartMS)
if (lpParms && (dwFlags & MCI_TO)) { return MCIERR_OUTOFRANGE;
dwEndMS = MIDI_ConvertTimeFormatToMS(wmm, lpParms->dwTo);
} else {
dwEndMS = 0xFFFFFFFFul;
}
TRACE("Playing from %u to %u\n", dwStartMS, dwEndMS); TRACE("Playing from %u to %u\n", dwStartMS, dwEndMS);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment