mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-11 17:05:41 +00:00
coreaudio: Patched to compile on iOS.
This commit is contained in:
parent
a74722ed74
commit
62ea296894
1 changed files with 2 additions and 1 deletions
|
|
@ -598,7 +598,7 @@ static void COREAUDIO_CloseDevice(SDL_AudioDevice *device)
|
|||
if (device->hidden->interruption_listener) {
|
||||
SDLInterruptionListener *listener = (SDLInterruptionListener *)CFBridgingRelease(device->hidden->interruption_listener);
|
||||
device->hidden->interruption_listener = nil;
|
||||
[center removeObserver:listener];
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:listener];
|
||||
@synchronized(listener) {
|
||||
listener.device = NULL;
|
||||
}
|
||||
|
|
@ -977,6 +977,7 @@ static bool COREAUDIO_OpenDevice(SDL_AudioDevice *device)
|
|||
}
|
||||
|
||||
#ifndef MACOSX_COREAUDIO
|
||||
NSNotificationCenter *center = [NSNotificationCenter defaultCenter];
|
||||
SDLInterruptionListener *listener = [SDLInterruptionListener new];
|
||||
listener.device = device;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue