ios7 - Why does iOS AVAudioPlayer's prepareToPlay method return false? -
i have array of audio players plays 1 of when user hits location. however, when call [preparetoplay] on player object, returns false - behaviour seems erratic , unpredictable , i'd know reasons return false.
my code looks like:
i = // loop var avaudioplayer *player = [[[myaudio getsharedaudio] audioplayers] objectatindex:i]; if (player != nil && ![[myaudio getsharedaudio] isplaying]) { if ([player preparetoplay]) { [player play]; } else { nslog(@"not prepared."); } }
Comments
Post a Comment