diff options
author | Chris Robinson <[email protected]> | 2023-06-03 21:26:05 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2023-06-03 21:26:05 -0700 |
commit | 045a4ff1448d1b8069ccc20d0f38edcbffbb8321 (patch) | |
tree | 38e475d251a9e73ca4a87577c1208bd4ef48f261 /alc/backends | |
parent | 4c9906284e2b47f79ebbacb6098ac7f619f2fc0f (diff) |
Use the correct IID for the interface we use
Diffstat (limited to 'alc/backends')
-rw-r--r-- | alc/backends/wasapi.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/alc/backends/wasapi.cpp b/alc/backends/wasapi.cpp index 155f0413..391976c8 100644 --- a/alc/backends/wasapi.cpp +++ b/alc/backends/wasapi.cpp @@ -426,15 +426,15 @@ struct DeviceHelper final : private IMMNotificationClient } #if !defined(ALSOFT_UWP) - static HRESULT ActivateAudioClient(_In_ DeviceHandle& device, void **ppv) - { return device->Activate(__uuidof(IAudioClient3), CLSCTX_INPROC_SERVER, nullptr, ppv); } + static HRESULT activateAudioClient(_In_ DeviceHandle& device, REFIID iid, void **ppv) + { return device->Activate(iid, CLSCTX_INPROC_SERVER, nullptr, ppv); } #else - HRESULT ActivateAudioClient(_In_ DeviceHandle& device, void **ppv) + HRESULT activateAudioClient(_In_ DeviceHandle& device, _In_ REFIID iid, void **ppv) { ComPtr<IActivateAudioInterfaceAsyncOperation> asyncOp; mPPV = ppv; - HRESULT hr{ActivateAudioInterfaceAsync(device.value->Id->Data(), __uuidof(IAudioClient3), - nullptr, this, al::out_ptr(asyncOp))}; + HRESULT hr{ActivateAudioInterfaceAsync(device.value->Id->Data(), iid, nullptr, this, + al::out_ptr(asyncOp))}; if(FAILED(hr)) return hr; asyncOp = nullptr; @@ -1156,7 +1156,8 @@ bool WasapiPlayback::reset() HRESULT WasapiPlayback::resetProxy() { mClient = nullptr; - HRESULT hr{sDeviceHelper->ActivateAudioClient(mMMDev, al::out_ptr(mClient))}; + HRESULT hr{sDeviceHelper->activateAudioClient(mMMDev, __uuidof(IAudioClient), + al::out_ptr(mClient))}; if(FAILED(hr)) { ERR("Failed to reactivate audio client: 0x%08lx\n", hr); @@ -1797,7 +1798,8 @@ HRESULT WasapiCapture::resetProxy() { mClient = nullptr; - HRESULT hr{sDeviceHelper->ActivateAudioClient(mMMDev, al::out_ptr(mClient))}; + HRESULT hr{sDeviceHelper->activateAudioClient(mMMDev, __uuidof(IAudioClient), + al::out_ptr(mClient))}; if(FAILED(hr)) { ERR("Failed to reactivate audio client: 0x%08lx\n", hr); |