Skip to content
Browse files

AVAudioPlayer bug fix: audioPlayerDidFinishPlaying shouldn't be calle…

…d on stop
  • Loading branch information...
1 parent 606504c commit 868aa65bd4de93953ae86615c681b6b810691d38 @hpique hpique committed Mar 31, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 AVFoundation/Classes/AVAudioPlayer.m
View
6 AVFoundation/Classes/AVAudioPlayer.m
@@ -176,8 +176,10 @@ - (void)sound:(NSSound *)sound didFinishPlaying:(BOOL)finishedPlaying
} else if (notifyDelegate) {
[_delegate audioPlayerDidFinishPlaying:self successfully:YES];
}
- } else {
- [_delegate audioPlayerDidFinishPlaying:self successfully:NO];
+// According to the docs audioPlayerDidFinishPlaying should only be called if the audio finished playing
+// See: http://developer.apple.com/library/mac/#documentation/AVFoundation/Reference/AVAudioPlayerDelegateProtocolReference/Reference/Reference.html#//apple_ref/doc/uid/TP40008068
+// } else {
+// [_delegate audioPlayerDidFinishPlaying:self successfully:NO];
}
}
}

0 comments on commit 868aa65

Please sign in to comment.
Something went wrong with that request. Please try again.