Commit e358e72f authored by David Reid's avatar David Reid

Core Audio: Fix a possible deadlock when uninitializing a device.

parent 43f2e28c
...@@ -26556,6 +26556,8 @@ static ma_result ma_context__uninit_device_tracking__coreaudio(ma_context* pCont ...@@ -26556,6 +26556,8 @@ static ma_result ma_context__uninit_device_tracking__coreaudio(ma_context* pCont
/* At this point there should be no tracked devices. If not there's an error somewhere. */ /* At this point there should be no tracked devices. If not there's an error somewhere. */
if (g_ppTrackedDevices_CoreAudio != NULL) { if (g_ppTrackedDevices_CoreAudio != NULL) {
ma_context_post_error(pContext, NULL, MA_LOG_LEVEL_WARNING, "You have uninitialized all contexts while an associated device is still active.", MA_INVALID_OPERATION); ma_context_post_error(pContext, NULL, MA_LOG_LEVEL_WARNING, "You have uninitialized all contexts while an associated device is still active.", MA_INVALID_OPERATION);
ma_spinlock_unlock(&g_DeviceTrackingInitLock_CoreAudio);
return MA_INVALID_OPERATION;
} }
ma_mutex_uninit(&g_DeviceTrackingMutex_CoreAudio); ma_mutex_uninit(&g_DeviceTrackingMutex_CoreAudio);
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