Sound in background mode with the default audio session?

118 views Asked by At

if i use play sound in device from any method than [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error:nil]; will effect on the sound that i was playing or it will work only if play sound using AVAudioPlayer

1

There are 1 answers

1
M David On

No! AVAudioSession is a singleton class which can be used to set the audio context for your app. it is not specified for AVAudioPlayer. #reference https://developer.apple.com/library/ios/documentation/AVFoundation/Reference/AVAudioSession_ClassReference/