Commit 92959b31 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

dmime/tests: Test tempo track GetParam with GUID_TempoParam.

parent 7a9e45ac
......@@ -3933,6 +3933,7 @@ static void test_tempo_track_play(void)
{.lTime = 4000, .dblTempo = 50},
};
IDirectMusicPerformance *performance;
MUSIC_TIME next_time;
IDirectMusicSegment *segment;
IDirectMusicGraph *graph;
IDirectMusicTrack *track;
......@@ -4015,6 +4016,49 @@ static void test_tempo_track_play(void)
ok(hr == S_OK, "got %#lx\n", hr);
IDirectMusicTrack_Release(track);
hr = IDirectMusicSegment_GetParam(segment, &GUID_TempoParam, -1, DMUS_SEG_ALLTRACKS, 0, NULL, NULL);
ok(hr == E_POINTER, "got %#lx\n", hr);
hr = IDirectMusicSegment_GetParam(segment, &GUID_TempoParam, -1, DMUS_SEG_ALLTRACKS, 0, NULL, &param);
todo_wine ok(hr == S_OK, "got %#lx\n", hr);
memset(&param, 0xcd, sizeof(param));
next_time = 0xdeadbeef;
hr = IDirectMusicSegment_GetParam(segment, &GUID_TempoParam, -1, DMUS_SEG_ALLTRACKS, 0, &next_time, &param);
todo_wine ok(hr == S_OK, "got %#lx\n", hr);
todo_wine ok(next_time == 100, "got next_time %lu\n", next_time);
todo_wine ok(param.mtTime == 100, "got mtTime %ld\n", param.mtTime);
todo_wine ok(param.dblTempo == 80, "got dblTempo %f\n", param.dblTempo);
hr = IDirectMusicSegment_GetParam(segment, &GUID_TempoParam, -1, DMUS_SEG_ALLTRACKS, 100, &next_time, &param);
todo_wine ok(hr == S_OK, "got %#lx\n", hr);
todo_wine ok(next_time == 200, "got next_time %lu\n", next_time);
ok(param.mtTime == 0, "got mtTime %ld\n", param.mtTime);
todo_wine ok(param.dblTempo == 80, "got dblTempo %f\n", param.dblTempo);
hr = IDirectMusicSegment_GetParam(segment, &GUID_TempoParam, -1, DMUS_SEG_ALLTRACKS, 199, &next_time, &param);
todo_wine ok(hr == S_OK, "got %#lx\n", hr);
todo_wine ok(next_time == 101, "got next_time %lu\n", next_time);
todo_wine ok(param.mtTime == -99, "got mtTime %ld\n", param.mtTime);
todo_wine ok(param.dblTempo == 80, "got dblTempo %f\n", param.dblTempo);
hr = IDirectMusicSegment_GetParam(segment, &GUID_TempoParam, -1, DMUS_SEG_ALLTRACKS, 200, &next_time, &param);
todo_wine ok(hr == S_OK, "got %#lx\n", hr);
todo_wine ok(next_time == 100, "got next_time %lu\n", next_time);
todo_wine ok(param.mtTime == -100, "got mtTime %ld\n", param.mtTime);
todo_wine ok(param.dblTempo == 80, "got dblTempo %f\n", param.dblTempo);
hr = IDirectMusicSegment_GetParam(segment, &GUID_TempoParam, -1, DMUS_SEG_ALLTRACKS, 299, &next_time, &param);
todo_wine ok(hr == S_OK, "got %#lx\n", hr);
todo_wine ok(next_time == 1, "got next_time %lu\n", next_time);
todo_wine ok(param.mtTime == -199, "got mtTime %ld\n", param.mtTime);
todo_wine ok(param.dblTempo == 80, "got dblTempo %f\n", param.dblTempo);
hr = IDirectMusicSegment_GetParam(segment, &GUID_TempoParam, -1, DMUS_SEG_ALLTRACKS, 300, &next_time, &param);
todo_wine ok(hr == S_OK, "got %#lx\n", hr);
todo_wine ok(next_time == 3700, "got next_time %lu\n", next_time);
todo_wine ok(param.mtTime == -100, "got mtTime %ld\n", param.mtTime);
todo_wine ok(param.dblTempo == 20, "got dblTempo %f\n", param.dblTempo);
hr = IDirectMusicSegment_GetParam(segment, &GUID_TempoParam, -1, DMUS_SEG_ALLTRACKS, 5000, &next_time, &param);
todo_wine ok(hr == S_OK, "got %#lx\n", hr);
ok(next_time == 0, "got next_time %lu\n", next_time);
todo_wine ok(param.mtTime == -1000, "got mtTime %ld\n", param.mtTime);
todo_wine ok(param.dblTempo == 50, "got dblTempo %f\n", param.dblTempo);
/* now play the segment, and check produced messages */
......
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