I am using AudioSessionGetProperty to check 'audioIsAlreadyPlaying'. Xcode says: 'AudioSessionGetProperty' is deprecated: first deprecated in iOS 7.0
Please could someone tell me what I should use instead, to get the audioIsAlreadyPlaying property.
AudioSessionGetProperty(kAudioSessionProperty_OtherAudioIsPlaying,
&propertySize,
&audioIsAlreadyPlaying);
return audioIsAlreadyPlaying;
Trying using the AVAudioSession
's otherAudioPlaying
property on iOS 6.0 or higher.
[[AVAudioSession sharedInstance] isOtherAudioPlaying]
The AVAudioSession class replaces deprecated AudioSession APIs. For what you're doing, see the otherAudioPlaying property.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With