Fixed AudioPlayer not calling the didEncounterError: method when an error occured

This commit is contained in:
terryso 2013-08-01 10:12:19 +08:00
parent 8da9ea9545
commit cf14a035f6
1 changed files with 5 additions and 0 deletions

View File

@ -1097,6 +1097,11 @@ static void AudioQueueIsRunningCallbackProc(void* userData, AudioQueueRef audioQ
{
errorCode = errorCodeIn;
self.internalState = AudioPlayerInternalStateError;
dispatch_async(dispatch_get_main_queue(), ^
{
[self.delegate audioPlayer:self didEncounterError:errorCode];
});
}
-(void) createAudioQueue