Commit 20a50f30 authored by Paul Vriens's avatar Paul Vriens Committed by Alexandre Julliard

mmdevapi/tests: Fix a test failure on Vista+ with no soundcard present.

parent 62bb1eb2
......@@ -55,15 +55,18 @@ START_TEST(dependency)
if (FAILED(hr))
{
skip("mmdevapi not available: 0x%08x\n", hr);
return;
goto cleanup;
}
hr = IMMDeviceEnumerator_GetDefaultAudioEndpoint(mme, eRender, eMultimedia, &dev);
ok(hr == S_OK, "GetDefaultAudioEndpoint failed: 0x%08x\n", hr);
ok(hr == S_OK || hr == E_NOTFOUND, "GetDefaultAudioEndpoint failed: 0x%08x\n", hr);
if (hr != S_OK)
{
skip("GetDefaultAudioEndpoint returns 0x%08x, skipping tests\n", hr);
return;
if (hr == E_NOTFOUND)
skip("No sound card available\n");
else
skip("GetDefaultAudioEndpoint returns 0x%08x\n", hr);
goto cleanup;
}
ok(!GetModuleHandle("dsound.dll"), "dsound.dll was already loaded!\n");
......@@ -94,8 +97,14 @@ START_TEST(dependency)
ok(IsEqualCLSID(&clsid, &CLSID_DSoundRender), "Wrong class id %s", dump_guid(&clsid));
}
}
cleanup:
if (bf)
IUnknown_Release(bf);
if (dev)
IUnknown_Release(dev);
if (mme)
IUnknown_Release(mme);
IUnknown_Release(mme);
CoUninitialize();
}
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