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

winmm: midiStreamPosition can select an alternative MMTIME format.

parent ebd55d98
......@@ -1872,6 +1872,12 @@ MMRESULT WINAPI midiStreamPosition(HMIDISTRM hMidiStrm, LPMMTIME lpMMT, UINT cbm
ret = MMSYSERR_INVALPARAM;
} else {
switch (lpMMT->wType) {
default:
FIXME("Unsupported time type %x\n", lpMMT->wType);
case TIME_BYTES:
case TIME_SAMPLES:
lpMMT->wType = TIME_MS;
/* fall through to alternative format */
case TIME_MS:
lpMMT->u.ms = lpMidiStrm->dwPositionMS;
TRACE("=> %d ms\n", lpMMT->u.ms);
......@@ -1880,11 +1886,6 @@ MMRESULT WINAPI midiStreamPosition(HMIDISTRM hMidiStrm, LPMMTIME lpMMT, UINT cbm
lpMMT->u.ticks = lpMidiStrm->dwPulses;
TRACE("=> %d ticks\n", lpMMT->u.ticks);
break;
default:
WARN("Unsupported time type %d\n", lpMMT->wType);
lpMMT->wType = TIME_MS;
ret = MMSYSERR_INVALPARAM;
break;
}
}
return ret;
......
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