From da0572e6b820465691f4c7de435291774c5e5751 Mon Sep 17 00:00:00 2001 From: David Reid Date: Thu, 9 Nov 2023 15:01:03 +1000 Subject: [PATCH] Fix a compilation error with iOS. Public issue https://github.com/mackron/miniaudio/issues/770 --- CHANGES.md | 1 + miniaudio.h | 25 ++++++++++++------------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 9c976563..344f76e0 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,7 @@ v0.11.20 - TBD ===================== * Fix an error when dynamically linking libraries when forcing the UWP build on desktop. +* Fix a compilation error with iOS. v0.11.19 - 2023-11-04 diff --git a/miniaudio.h b/miniaudio.h index ca46c50c..f6d01645 100644 --- a/miniaudio.h +++ b/miniaudio.h @@ -18668,19 +18668,6 @@ static void ma_device__on_notification_rerouted(ma_device* pDevice) } #endif -/* Interruptions are only used on some platforms. */ -#if defined(MA_APPLE_MOBILE) -static void ma_device__on_notification_interruption_began(ma_device* pDevice) -{ - ma_device__on_notification(ma_device_notification_init(pDevice, ma_device_notification_type_interruption_began)); -} - -static void ma_device__on_notification_interruption_ended(ma_device* pDevice) -{ - ma_device__on_notification(ma_device_notification_init(pDevice, ma_device_notification_type_interruption_ended)); -} -#endif - static void ma_device__on_data_inner(ma_device* pDevice, void* pFramesOut, const void* pFramesIn, ma_uint32 frameCount) { @@ -31882,6 +31869,18 @@ size, allocate a block of memory of that size and then call AudioObjectGetProper AudioDeviceID's so just do "dataSize/sizeof(AudioDeviceID)" to know the device count. */ +#if defined(MA_APPLE_MOBILE) +static void ma_device__on_notification_interruption_began(ma_device* pDevice) +{ + ma_device__on_notification(ma_device_notification_init(pDevice, ma_device_notification_type_interruption_began)); +} + +static void ma_device__on_notification_interruption_ended(ma_device* pDevice) +{ + ma_device__on_notification(ma_device_notification_init(pDevice, ma_device_notification_type_interruption_ended)); +} +#endif + static ma_result ma_result_from_OSStatus(OSStatus status) { switch (status)