AVAudioPlayer stutters the game when changing song
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?
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?
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| AVAudioPlayer returning -43 | FlamingHairball | 4 | 6,270 |
Aug 31, 2011 10:29 AM Last Post: FlamingHairball |
|
| AVAudioPlayer | kae_ | 8 | 7,389 |
Aug 10, 2010 04:13 AM Last Post: kae_ |
|
| performance bug in AVAudioPlayer | captainfreedom | 2 | 3,519 |
Aug 4, 2010 12:03 PM Last Post: captainfreedom |
|
| OpenAL and AVAudioPlayer in the Simulator | AkumaStreak | 4 | 5,328 |
Jul 12, 2009 11:05 AM Last Post: Madrayken |
|
| AVAudioPlayer | captainfreedom | 5 | 3,838 |
Jun 4, 2009 07:24 AM Last Post: captainfreedom |
|

