AVAudioPlayer stutters the game when changing song

Posts: 29
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
  AVAudioPlayer returning -43 FlamingHairball 4 7,697 Aug 31, 2011 10:29 AM
Last Post: FlamingHairball
  AVAudioPlayer kae_ 8 9,486 Aug 10, 2010 04:13 AM
Last Post: kae_
  performance bug in AVAudioPlayer captainfreedom 2 4,247 Aug 4, 2010 12:03 PM
Last Post: captainfreedom
  OpenAL and AVAudioPlayer in the Simulator AkumaStreak 4 6,316 Jul 12, 2009 11:05 AM
Last Post: Madrayken
  AVAudioPlayer captainfreedom 5 4,499 Jun 4, 2009 07:24 AM
Last Post: captainfreedom