Commit 3400e41d authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

dmime/tests: Test performance Init with a created port.

Final Fantasy VIII does this, more or less, and needs Init to succeed.
parent de27d59a
......@@ -1895,6 +1895,12 @@ static void test_parsedescriptor(void)
static void test_performance_InitAudio(void)
{
DMUS_PORTPARAMS params =
{
.dwSize = sizeof(params),
.dwValidParams = DMUS_PORTPARAMS_EFFECTS,
.dwEffectFlags = 1,
};
IDirectMusicPerformance8 *performance;
IDirectMusic *dmusic;
IDirectSound *dsound;
......@@ -2036,6 +2042,20 @@ static void test_performance_InitAudio(void)
ok(ref == 2, "dmusic ref count got %ld expected 2\n", ref);
destroy_performance(performance, dmusic, dsound);
/* Provided dmusic and dsound, dmusic initialized with SetDirectSound, port created and activated */
create_performance(&performance, &dmusic, &dsound, TRUE);
hr = IDirectMusic_SetDirectSound(dmusic, dsound, NULL);
ok(hr == S_OK, "SetDirectSound failed: %#lx\n", hr);
hr = IDirectMusic_CreatePort(dmusic, &CLSID_DirectMusicSynth, &params, &port, NULL);
ok(hr == S_OK, "CreatePort failed: %#lx\n", hr);
hr = IDirectMusicPort_Activate(port, TRUE);
ok(hr == S_OK, "Activate failed: %#lx\n", hr);
hr = IDirectMusicPort_SetNumChannelGroups(port, 1);
ok(hr == S_OK, "SetNumChannelGroups failed: %#lx\n", hr);
hr = IDirectMusicPerformance8_Init(performance, &dmusic, dsound, 0);
todo_wine ok(hr == S_OK, "Init failed: %#lx\n", hr);
destroy_performance(performance, dmusic, dsound);
/* InitAudio with perf channel count not a multiple of 16 rounds up */
create_performance(&performance, NULL, NULL, TRUE);
hr = IDirectMusicPerformance8_InitAudio(performance, NULL, NULL, NULL,
......
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