From: Anton Baskanov baskanov@gmail.com
--- dlls/dmime/performance.c | 2 +- dlls/dmime/tests/dmime.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/dlls/dmime/performance.c b/dlls/dmime/performance.c index 10f4f795432..0e780e8fe8c 100644 --- a/dlls/dmime/performance.c +++ b/dlls/dmime/performance.c @@ -2072,7 +2072,7 @@ static HRESULT WINAPI performance_tool_ProcessPMsg(IDirectMusicTool *iface, if (note->mtDuration) { msg->mtTime -= note->nOffset; - msg->mtTime += note->mtDuration; + msg->mtTime += max(1, note->mtDuration - 1); if (FAILED(hr = IDirectMusicPerformance8_MusicToReferenceTime(performance, msg->mtTime, &msg->rtTime))) return hr; note->bFlags &= ~DMUS_NOTEF_NOTEON; diff --git a/dlls/dmime/tests/dmime.c b/dlls/dmime/tests/dmime.c index 4edab18c283..4d61798f417 100644 --- a/dlls/dmime/tests/dmime.c +++ b/dlls/dmime/tests/dmime.c @@ -2634,9 +2634,9 @@ static void test_performance_tool(void) *note = note60; hr = IDirectMusicTool_ProcessPMsg(tool, performance, (DMUS_PMSG *)note); ok(hr == DMUS_S_REQUEUE, "got %#lx\n", hr); - todo_wine ok(fabs(note->rtTime - note60.rtTime - scale_music_time(999, 120.0)) < 10.0, + ok(fabs(note->rtTime - note60.rtTime - scale_music_time(999, 120.0)) < 10.0, "got %I64d\n", note->rtTime - note60.rtTime); - todo_wine ok(note->mtTime - note60.mtTime == 999, "got %ld\n", note->mtTime - note60.mtTime); + ok(note->mtTime - note60.mtTime == 999, "got %ld\n", note->mtTime - note60.mtTime); check_dmus_note_pmsg(note, note60.mtTime + 999, 0, 1000, 60, 127, 0, FALSE, FALSE);
hr = IDirectMusicPerformance_GetTime(performance, NULL, ¬e60.mtTime); @@ -2648,9 +2648,9 @@ static void test_performance_tool(void) note->nOffset = 1000; hr = IDirectMusicTool_ProcessPMsg(tool, performance, (DMUS_PMSG *)note); ok(hr == DMUS_S_REQUEUE, "got %#lx\n", hr); - todo_wine ok(fabs(note->rtTime - note60.rtTime - scale_music_time(999, 120.0)) < 10.0, + ok(fabs(note->rtTime - note60.rtTime - scale_music_time(999, 120.0)) < 10.0, "got %I64d\n", note->rtTime - note60.rtTime); - todo_wine ok(note->mtTime - note60.mtTime == 999, "got %ld\n", note->mtTime - note60.mtTime); + ok(note->mtTime - note60.mtTime == 999, "got %ld\n", note->mtTime - note60.mtTime); check_dmus_note_pmsg(note, note60.mtTime + 999, 0, 1000, 60, 127, 0, FALSE, FALSE);
hr = IDirectMusicPerformance_GetTime(performance, NULL, ¬e60.mtTime); @@ -2662,9 +2662,9 @@ static void test_performance_tool(void) note->mtDuration = 2; hr = IDirectMusicTool_ProcessPMsg(tool, performance, (DMUS_PMSG *)note); ok(hr == DMUS_S_REQUEUE, "got %#lx\n", hr); - todo_wine ok(fabs(note->rtTime - note60.rtTime - scale_music_time(1, 120.0)) < 10.0, + ok(fabs(note->rtTime - note60.rtTime - scale_music_time(1, 120.0)) < 10.0, "got %I64d\n", note->rtTime - note60.rtTime); - todo_wine ok(note->mtTime - note60.mtTime == 1, "got %ld\n", note->mtTime - note60.mtTime); + ok(note->mtTime - note60.mtTime == 1, "got %ld\n", note->mtTime - note60.mtTime); check_dmus_note_pmsg(note, note60.mtTime + 1, 0, 2, 60, 127, 0, FALSE, FALSE);
hr = IDirectMusicPerformance_GetTime(performance, NULL, ¬e60.mtTime);