Hi,
Is there someway to play synthesized audio when the app moves to background by pressing the home button?
I am able to consistently reproduce this issue in a “Hello World” application that I have written for testing FliteController and openearsextras. I am happy to share this with in case anyone wants to try.
I’ve tried all of the following:
1.) Changed plist to indicate that app plays audio in background.
2.) Added the following line. I don’t think this should make any difference.
[[UIApplication sharedApplication] beginReceivingRemoteControlEvents];
3.) I’ve also tried changing the category of audio sesson to Playback in my app.
AVAudioSession* sessionInst = [AVAudioSession sharedInstance];
BOOL succ = [sessionInst setCategory:AVAudioSessionCategoryPlayback error:&error];
if(error || !succ) {
NSLog(@”Unable to set AVAudioSessionCategoryPlayback”);
}
NSError* outError = nil;
succ = [sessionInst setActive:YES error:&outError];
if(outError || !succ) {
NSLog(@”Unable to setActive”);
}
Thanks,
–MB.