mirror of
https://github.com/encounter/SDL.git
synced 2025-12-16 08:27:05 +00:00
Handle audio interruptions on iOS/tvOS. Fixes bugs 2569 and 2960.
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
#include <CoreServices/CoreServices.h>
|
||||
#else
|
||||
#import <AVFoundation/AVFoundation.h>
|
||||
#import <UIKit/UIApplication.h>
|
||||
#endif
|
||||
|
||||
#include <AudioToolbox/AudioToolbox.h>
|
||||
@@ -56,6 +57,9 @@ struct SDL_PrivateAudioData
|
||||
SDL_atomic_t shutdown;
|
||||
#if MACOSX_COREAUDIO
|
||||
AudioDeviceID deviceID;
|
||||
#else
|
||||
SDL_bool interrupted;
|
||||
CFTypeRef interruption_listener;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user