Browse files

Merge pull request #88 from robotmedia/pull_request

AVAudioPlayer bug fix: audioPlayerDidFinishPlaying shouldn't be called on stop
  • Loading branch information...
2 parents 3e46441 + 868aa65 commit 7894f26ff366a8abbb82556dfb6b625c6e5c7cbf @BigZaphod committed Jul 16, 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 7894f26

Please sign in to comment.