mciseq: Play returns MCIERR_OUTOFRANGE as required.

This commit is contained in:
Jörg Höhle 2011-03-01 21:35:23 +01:00 committed by Alexandre Julliard
parent 4dbceec8f9
commit 0e675165f1
1 changed files with 8 additions and 6 deletions

View File

@ -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));
}
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)) {
dwStartMS = MIDI_ConvertTimeFormatToMS(wmm, lpParms->dwFrom);
} else {
dwStartMS = wmm->dwPositionMS;
}
if (lpParms && (dwFlags & MCI_TO)) {
dwEndMS = MIDI_ConvertTimeFormatToMS(wmm, lpParms->dwTo);
} else {
dwEndMS = 0xFFFFFFFFul;
}
if (dwEndMS < dwStartMS)
return MCIERR_OUTOFRANGE;
TRACE("Playing from %u to %u\n", dwStartMS, dwEndMS);