Audio is not resuming after the phone call
Audio is not resuming after the phone call
- Subject: Audio is not resuming after the phone call
- From: Sasikumar JP <email@hidden>
- Date: Mon, 05 Dec 2011 10:30:54 +0530
Hi,
I have a stream radio application in appstore. i am receiving complaint from many users that application's audio is not resuming after the phone call.
I have registered the interruption listener and when i receive the interruption begin, i am stopping the AUGraph and when i receive the end Interruption i am setting the AudioSession active and starting AUGraph.
More frequently i am getting the following error message, so i unable to resume the audio playback after the interruption.
10:11:10.276 <0x3f514ce8> AUIOClient_StartIO failed (-12985)
AUGraphStart failure error: -12985 FFFFCD47 ˇˇÕG
- (void)handleInterruptionListenerWithState:(UInt32)inInterruptionState
{
if (inInterruptionState == kAudioSessionBeginInterruption) {
[self pause];
} else if (inInterruptionState == kAudioSessionEndInterruption) {
[self resume];
} else {
NSLog(@"Interruption state %ld",inInterruptionState);
}
}
- (void)pause
{
if (self.playerState == kStreamPlayerEngine_Playing ||
self.playerState == kStreamPlayerEngine_Buffering ||
self.playerState == kStreamPlayerEngine_Init) {
[self stopAUGraph];
self.playerState = kStreamPlayerEngine_Pause;
}
}
- (void)resume
{
if (self.playerState == kStreamPlayerEngine_Pause) {
AudioSessionSetActive(true);
[self startAUGraph];
[self stop];
[self play];
}
}
- (void)play
{
[self initializeNetworkType];
if (self.isPaused) {
[self resume];
} else if (!_settings.wifiOnly &&
(_networkType == kINDRadio_NetworkTypeWIFI ||
_networkType == kINDRadio_NetworkTypeCell)) {
dispatch_async(_streamQueue, ^{
[self startInternalThread];
});
} else if (_settings.wifiOnly &&
_networkType == kINDRadio_NetworkTypeWIFI) {
dispatch_async(_streamQueue, ^{
[self startInternalThread];
});
} else {
self.playerState = kStreamPlayerEngine_NetworkNotAvailable;
}
}
Any help is highly appreciated to resolve this issue.
Thanks
Sasikumar JP
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden