For all I know the iPhone only has hardware support to play one compressed-audio-file at a time. (i.e. mp3)
I use an AVAudioplayer to play mp3 music only when the iPod is currently not playing any other music. So for me, using AVAudioPlayer means no performance difference, as long as one makes sure only one mp3 is currently playing. Starting a second AVAudioPlayer means the second song gets decoded by the software, which is computation-intensive. (Remember the users iPod App may be playing in the background when your app is started).
For Effects I use "AudioServicesPlaySystemSound" which doesn't interfere with performance either, but the effects then need to be uncompressed and less then 5 secs. A nice file format for uncompressed audio files seems to be "caf" which can be made from a wav but is considerably smaller even without compression.
|