1
0
mirror of https://github.com/wine-mirror/wine synced 2024-06-29 06:14:34 +00:00

xaudio2/tests: Fix test failures with xaudio2_8 in test_submix().

This commit is contained in:
Paul Gofman 2024-05-14 11:18:02 -06:00 committed by Alexandre Julliard
parent 2294bf6c1e
commit 921e79c2b5

View File

@ -859,10 +859,18 @@ static void test_submix(IXAudio2 *xa)
hr = IXAudio2_CreateSubmixVoice(xa, &sub2, 2, 44100, 0, 0, NULL, NULL);
ok(hr == S_OK, "CreateSubmixVoice failed: %08lx\n", hr);
send_desc.pOutputVoice = (IXAudio2Voice *)sub2;
hr = IXAudio2SubmixVoice_SetOutputVoices(sub, &sends);
ok(hr == S_OK, "CreateSubmixVoice failed: %08lx\n", hr);
ok(hr == S_OK || (XAUDIO2_VER >= 8 && hr == XAUDIO2_E_INVALID_CALL), "CreateSubmixVoice failed: %08lx\n", hr);
if (hr == XAUDIO2_E_INVALID_CALL)
{
IXAudio2SubmixVoice_DestroyVoice(sub2);
hr = IXAudio2_CreateSubmixVoice(xa, &sub2, 2, 44100, 0, 1, NULL, NULL);
ok(hr == S_OK, "CreateSubmixVoice failed: %08lx\n", hr);
send_desc.pOutputVoice = (IXAudio2Voice *)sub2;
hr = IXAudio2SubmixVoice_SetOutputVoices(sub, &sends);
ok(hr == S_OK, "CreateSubmixVoice failed: %08lx\n", hr);
}
IXAudio2SubmixVoice_DestroyVoice(sub2);
/* The voice is not destroyed. */
@ -873,7 +881,13 @@ static void test_submix(IXAudio2 *xa)
sends.SendCount = 0;
hr = IXAudio2SubmixVoice_SetOutputVoices(sub, &sends);
ok(hr == S_OK, "CreateSubmixVoice failed: %08lx\n", hr);
ok(hr == S_OK || (XAUDIO2_VER >= 8 && hr == XAUDIO2_E_INVALID_CALL), "SetOutputVoices failed: %08lx\n", hr);
if (hr == XAUDIO2_E_INVALID_CALL)
{
sends.pSends = NULL;
hr = IXAudio2SubmixVoice_SetOutputVoices(sub, &sends);
ok(hr == S_OK, "SetOutputVoices failed: %08lx\n", hr);
}
IXAudio2SubmixVoice_DestroyVoice(sub2);
if (0)