AVAudioPlayer prepareToPlay callback on iPhone

Can I find out when AVAudioPlayerready after a call prepareToPlay?

If not, is there another class that provides this functionality?

I would like to implement something like this:

- (void) prepare {
    [audioPlayer prepareToPlay];
    // Update UI to indicate that the audio is being prepared
}

- (void) onAudioReady {
    // Update UI to indicate that the audio is ready
}
+5
source share
1 answer

This class can help initialize the audio and then instantly play it in the onAudioReady method.

https://github.com/nicklockwood/SoundManager

with reference to this post: fooobar.com/questions/58760 / ...

OR

BOOL [audioPlayer prepareToPlay], , . , .

prepareToPlay , .

  • (BOOL) prepareToPlay YES .

, , .

.

0

All Articles