mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-15 08:53:07 +09:00
Fix runtime error in libcubeb
This commit is contained in:
parent
5ffe72cab3
commit
99a1d556de
1 changed files with 12 additions and 0 deletions
|
|
@ -938,6 +938,12 @@ BOOL WINAPI revert_mm_thread_characteristics_noop(HANDLE mmcss_handle)
|
|||
|
||||
HRESULT register_notification_client(cubeb_stream * stm)
|
||||
{
|
||||
#if defined(__MINGW32__)
|
||||
// MinGW builds have shown crashes in MMDevApi callback dispatch paths.
|
||||
// Skip notification registration and rely on normal stream operation.
|
||||
(void)stm;
|
||||
return S_OK;
|
||||
#else
|
||||
HRESULT hr = CoCreateInstance(__uuidof(MMDeviceEnumerator),
|
||||
NULL, CLSCTX_INPROC_SERVER,
|
||||
IID_PPV_ARGS(&stm->device_enumerator));
|
||||
|
|
@ -958,10 +964,15 @@ HRESULT register_notification_client(cubeb_stream * stm)
|
|||
}
|
||||
|
||||
return hr;
|
||||
#endif
|
||||
}
|
||||
|
||||
HRESULT unregister_notification_client(cubeb_stream * stm)
|
||||
{
|
||||
#if defined(__MINGW32__)
|
||||
(void)stm;
|
||||
return S_OK;
|
||||
#else
|
||||
XASSERT(stm);
|
||||
HRESULT hr;
|
||||
|
||||
|
|
@ -981,6 +992,7 @@ HRESULT unregister_notification_client(cubeb_stream * stm)
|
|||
SafeRelease(stm->device_enumerator);
|
||||
|
||||
return S_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
HRESULT get_endpoint(IMMDevice ** device, LPCWSTR devid)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue