AVAudioPlayer stutters the game when changing song

Posts: 30
Joined: 2008.10
Post: #1
I'm developing a game that feautures background music that changes everytime the current track changes. I'm using AVAudioPlayer for this but i'm experiencing some issues.
Here's how i do it: Load all the tracks with a separate AVAudioPlayer object, pre play them and start only one track at any moment. If the current track has finished playing pause it and set the current time to 0. Now play the next track. At transitioning i experience fps drops and the game stutters for a little while. What can i do to improve this?
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  openAL won't play a second song justking14 1 2,551 Jul 31, 2015 01:44 PM
Last Post: justking14
  AVAudioPlayer returning -43 FlamingHairball 4 10,191 Aug 31, 2011 10:29 AM
Last Post: FlamingHairball
  AVAudioPlayer kae_ 8 13,104 Aug 10, 2010 04:13 AM
Last Post: kae_
  performance bug in AVAudioPlayer captainfreedom 2 5,701 Aug 4, 2010 12:03 PM
Last Post: captainfreedom
  OpenAL and AVAudioPlayer in the Simulator AkumaStreak 4 8,026 Jul 12, 2009 11:05 AM
Last Post: Madrayken