summaryrefslogtreecommitdiff
path: root/src/ios.m
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-08-17 07:06:07 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-08-17 07:06:07 +0300
commitc4fa62d07dac1c3855dae4ed5108ab0f3eb43ceb (patch)
tree9d54ab1bd73a0ec33ace5b88be0589f2b692f0f9 /src/ios.m
parent2e572484f7b91125551f7d9a7ffa67aee9589035 (diff)
iOS: Setting the audio session category
Diffstat (limited to 'src/ios.m')
-rw-r--r--src/ios.m3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ios.m b/src/ios.m
index b82d54a7..c493e4f9 100644
--- a/src/ios.m
+++ b/src/ios.m
@@ -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
492void deinit_AVFAudioPlayer(iAVFAudioPlayer *d) { 493void deinit_AVFAudioPlayer(iAVFAudioPlayer *d) {