diff options
Diffstat (limited to 'src/ios.m')
-rw-r--r-- | src/ios.m | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -264,7 +264,6 @@ void setupApplication_iOS(void) { | |||
264 | selector:@selector(keyboardOffScreen:) | 264 | selector:@selector(keyboardOffScreen:) |
265 | name:UIKeyboardWillHideNotification | 265 | name:UIKeyboardWillHideNotification |
266 | object:nil]; | 266 | object:nil]; |
267 | [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error:nil]; | ||
268 | /* Media player remote controls. */ | 267 | /* Media player remote controls. */ |
269 | MPRemoteCommandCenter *commandCenter = [MPRemoteCommandCenter sharedCommandCenter]; | 268 | MPRemoteCommandCenter *commandCenter = [MPRemoteCommandCenter sharedCommandCenter]; |
270 | [[commandCenter pauseCommand] addTargetWithHandler:^MPRemoteCommandHandlerStatus(MPRemoteCommandEvent * _Nonnull event) { | 269 | [[commandCenter pauseCommand] addTargetWithHandler:^MPRemoteCommandHandlerStatus(MPRemoteCommandEvent * _Nonnull event) { |
@@ -487,6 +486,8 @@ void init_AVFAudioPlayer(iAVFAudioPlayer *d) { | |||
487 | d->player = NULL; | 486 | d->player = NULL; |
488 | d->volume = 1.0f; | 487 | d->volume = 1.0f; |
489 | d->state = initialized_AVFAudioPlayerState; | 488 | d->state = initialized_AVFAudioPlayerState; |
489 | /* Playback is imminent. */ | ||
490 | [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error:nil]; | ||
490 | } | 491 | } |
491 | 492 | ||
492 | void deinit_AVFAudioPlayer(iAVFAudioPlayer *d) { | 493 | void deinit_AVFAudioPlayer(iAVFAudioPlayer *d) { |