Skip to content

Commit

Permalink
Fix a compilation error with iOS.
Browse files Browse the repository at this point in the history
Public issue mackron#770
  • Loading branch information
mackron committed Nov 9, 2023
1 parent eb0ce6f commit da0572e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
25 changes: 12 additions & 13 deletions miniaudio.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit da0572e

Please sign in to comment.