diff --git a/dlls/winmm/tests/midi.c b/dlls/winmm/tests/midi.c index 091a500db79..fe3cc5c8767 100644 --- a/dlls/winmm/tests/midi.c +++ b/dlls/winmm/tests/midi.c @@ -893,7 +893,7 @@ static void test_midiStream(UINT udev, HWND hwnd) expected = 250; /* = 12 ticks in 120 BPM */ ret = get_position(hm, TIME_MS); - todo_wine ok(ret >= expected - MARGIN && ret <= expected + MARGIN, + ok(ret >= expected - MARGIN && ret <= expected + MARGIN, "expected greater than %ums, got %ums\n", expected, ret); trace("after playing, got %ums\n", ret); @@ -914,7 +914,7 @@ static void test_midiStream(UINT udev, HWND hwnd) So, the second event happens at dwDeltaTime(250ms) + 100ms after the first event. */ expected = 250 + 100; diff = records.time_stamp[1] - records.time_stamp[0]; - todo_wine ok(diff >= expected - MARGIN && diff <= expected + MARGIN, + ok(diff >= expected - MARGIN && diff <= expected + MARGIN, "expected %u ~ %ums, got %ums (dev=%d)\n", expected - MARGIN, expected + MARGIN, diff, udev); rc = midiOutUnprepareHeader((HMIDIOUT)hm, &mhdr, sizeof(mhdr)); diff --git a/dlls/winmm/winmm.c b/dlls/winmm/winmm.c index 2031c79d1c7..ef7dcdfc9a6 100644 --- a/dlls/winmm/winmm.c +++ b/dlls/winmm/winmm.c @@ -1197,6 +1197,8 @@ start_header: goto start_header; } } + /* reset dwToGo because dwStartTicks might be updated */ + dwToGo = lpMidiStrm->dwStartTicks + lpMidiStrm->dwPositionMS; } else { /* timeout, so me->dwDeltaTime is elapsed, can break the while loop */ break;