winmm: Fix default time division value in MIDI stream.

Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Akihiro Sagawa 2018-05-08 22:02:10 +09:00 committed by Alexandre Julliard
parent 339d9e3a6a
commit 1d49939618
2 changed files with 3 additions and 3 deletions

View File

@ -565,7 +565,7 @@ static void test_midiStream(UINT udev, HWND hwnd)
midiprop.tdiv.cbStruct = sizeof(midiprop.tdiv);
rc = midiStreamProperty(hm, (void*)&midiprop, MIDIPROP_GET|MIDIPROP_TIMEDIV);
ok(!rc, "midiStreamProperty TIMEDIV rc=%s\n", mmsys_error(rc));
todo_wine ok(24==LOWORD(midiprop.tdiv.dwTimeDiv), "default stream time division %u\n", midiprop.tdiv.dwTimeDiv);
ok(24==LOWORD(midiprop.tdiv.dwTimeDiv), "default stream time division %u\n", midiprop.tdiv.dwTimeDiv);
memset(&mhdr, 0, sizeof(mhdr));
mhdr.dwUser = 0x56FA552C;

View File

@ -1277,8 +1277,8 @@ MMRESULT WINAPI midiStreamOpen(HMIDISTRM* lphMidiStrm, LPUINT lpuDeviceID,
if (!lpMidiStrm)
return MMSYSERR_NOMEM;
lpMidiStrm->dwTempo = 500000;
lpMidiStrm->dwTimeDiv = 480; /* 480 is 120 quarter notes per minute *//* FIXME ??*/
lpMidiStrm->dwTempo = 500000; /* micro seconds per quarter note, i.e. 120 BPM */
lpMidiStrm->dwTimeDiv = 24; /* ticks per quarter note */
lpMidiStrm->dwPositionMS = 0;
mosm.dwStreamID = (DWORD)lpMidiStrm;