AudioStreamer
AudioStreamer copied to clipboard
Audio route change causes AS_GET_AUDIO_TIME_FAILED error
When there is an audio route change, an "audio queue get current time failed" error (alert) is thrown. Adding an kAudioSessionProperty_AudioRouteChange doesn't seem help.
The audio time failed error is present out-of-the-box.
I'd added handling of the "audio queue stopped error" in the progress method. I'll close this bug when I'm sure that's enough.
That fixes the problem ... the nice thing is the playback continues from the same point on the new audio output. I am not 100% how that happens though. The only interruption handler seems to pause the player on both begin and end interruption:
- (void)handleInterruptionChangeToState:(AudioQueuePropertyID)inInterruptionState { if (inInterruptionState == kAudioSessionBeginInterruption) { [self pause]; } else if (inInterruptionState == kAudioSessionEndInterruption) { AudioSessionSetActive( true ); [self pause]; // Shouldn't this be start?? } }
The streamer works beautifully, so who am I to argue. Thank you for taking care of this as promptly as you've.