From d10526fb3a83659c3f5ac9caf6d17a8fe8a6c410 Mon Sep 17 00:00:00 2001 From: David Reid Date: Fri, 26 Dec 2025 19:04:10 +1000 Subject: [PATCH] Core Audio: Stop double-posting stop callbacks. --- miniaudio.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/miniaudio.h b/miniaudio.h index e4fae1f9..8e131759 100644 --- a/miniaudio.h +++ b/miniaudio.h @@ -36290,7 +36290,7 @@ static void ma_on_start_stop__coreaudio(void* pUserData, AudioUnit audioUnit, Au Audio APIs in the callback when the device has been stopped or uninitialized. */ if (ma_device_get_status(pDevice) == ma_device_status_uninitialized || ma_device_get_status(pDevice) == ma_device_status_stopping || ma_device_get_status(pDevice) == ma_device_status_stopped) { - ma_device_post_notification_stopped(pDevice); + /* Device not started. Do nothing. See note just above ^. */ } else { UInt32 isRunning; UInt32 isRunningSize = sizeof(isRunning); @@ -36330,9 +36330,6 @@ static void ma_on_start_stop__coreaudio(void* pUserData, AudioUnit audioUnit, Au */ goto done; } - - /* Getting here means we need to stop the device. */ - ma_device_post_notification_stopped(pDevice); } }