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
Sound in background mode with the default audio session?
126 views Asked by Ghanshyam Tomar At
1
No!
AVAudioSession
is a singleton class which can be used to set the audio context for your app. it is not specified forAVAudioPlayer
. #reference https://developer.apple.com/library/ios/documentation/AVFoundation/Reference/AVAudioSession_ClassReference/