Commit 300b542d authored by Oliver Collyer's avatar Oliver Collyer

Fixed iOS crash in route change handler under ARC

parent 2b6a2e7d
...@@ -20038,7 +20038,7 @@ void ma_device_uninit__coreaudio(ma_device* pDevice) ...@@ -20038,7 +20038,7 @@ void ma_device_uninit__coreaudio(ma_device* pDevice)
#endif #endif
#if defined(MA_APPLE_MOBILE) #if defined(MA_APPLE_MOBILE)
if (pDevice->coreaudio.pRouteChangeHandler != NULL) { if (pDevice->coreaudio.pRouteChangeHandler != NULL) {
ma_router_change_handler* pRouteChangeHandler = (__bridge ma_router_change_handler*)pDevice->coreaudio.pRouteChangeHandler; ma_router_change_handler* pRouteChangeHandler = (__bridge_transfer ma_router_change_handler*)pDevice->coreaudio.pRouteChangeHandler;
[pRouteChangeHandler remove_handler]; [pRouteChangeHandler remove_handler];
} }
#endif #endif
...@@ -20695,7 +20695,7 @@ ma_result ma_device_init__coreaudio(ma_context* pContext, const ma_device_config ...@@ -20695,7 +20695,7 @@ ma_result ma_device_init__coreaudio(ma_context* pContext, const ma_device_config
differently on non-Desktop Apple platforms. differently on non-Desktop Apple platforms.
*/ */
#if defined(MA_APPLE_MOBILE) #if defined(MA_APPLE_MOBILE)
pDevice->coreaudio.pRouteChangeHandler = (__bridge void*)[[ma_router_change_handler alloc] init:pDevice]; pDevice->coreaudio.pRouteChangeHandler = (__bridge_retained void*)[[ma_router_change_handler alloc] init:pDevice];
#endif #endif
return MA_SUCCESS; return MA_SUCCESS;
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