From f1373d57c1e2c464c7c99e9fa85c24288e0127b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20H=C3=B6hle?= Date: Sat, 30 Jan 2010 10:07:59 +0100 Subject: [PATCH] winmm: midiStreamPosition can select an alternative MMTIME format. --- dlls/winmm/winmm.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/dlls/winmm/winmm.c b/dlls/winmm/winmm.c index 1a1fdad2629..4a03209c092 100644 --- a/dlls/winmm/winmm.c +++ b/dlls/winmm/winmm.c @@ -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;