Disable setCategory on macOS

This commit is contained in:
Ryan Heise 2020-08-07 04:08:02 +10:00
parent e89417119c
commit 122a90b4fb
6 changed files with 50 additions and 31 deletions

View file

@ -7,6 +7,7 @@
#import "ClippingAudioSource.h"
#import <AVFoundation/AVFoundation.h>
#import <stdlib.h>
#include <TargetConditionals.h>
// TODO: Check for and report invalid state transitions.
// TODO: Apply Apple's guidance on seeking: https://developer.apple.com/library/archive/qa/qa1820/_index.html
@ -865,9 +866,11 @@
_playResult = result;
}
_playing = YES;
#if TARGET_OS_IPHONE
if (_configuredSession) {
[[AVAudioSession sharedInstance] setActive:YES error:nil];
}
#endif
[_player play];
[self updatePosition];
if (@available(macOS 10.12, iOS 10.0, *)) {}