iPod Touch 2g audio performance is pretty terrible

I was trying to find some sort of list of supported devices for Corona SDK to see if the iPod 2G is even officially supported because I have really bad audio problems with my background music. It will play fine for about 30 seconds, then start stuttering.

backgroundMusic = audio.loadStream(backgroundMusicFile)  
 if (audio.isChannelPlaying( 1 ) == false) then  
 audio.play( backgroundMusic, { channel=1, loops=-1, fadein=2000 } )  
 end  

This is obviously not ideal, but is this to be expected from a 2g? It works fine on my Droid Incredible. My wife just got an iPhone 4S today, so I’m hoping to try my game on it as soon as she lets me play with it. :slight_smile:

Dave [import]uid: 80784 topic_id: 16407 reply_id: 316407[/import]

It’s not expected. I just tested on an original iPhone (2G) with 3.1.2. The test you describe performs fine on it (build 639). However, you should re-read:
http://developer.anscamobile.com/partner/audionotes
which contains information about performance tuning.

A few quickies: use lower sampling rates and maybe use aac/.mp4 as your encoding/file format to utilize the hardware decoder. Or try IMA4 or WAV if that doesn’t work.

Also be aware that the screen lock/sleep stops the music on iOS by default (which might be connected to the 30 second thing you mentioned). But when you unlock the screen, the music should resume where it left off.
[import]uid: 7563 topic_id: 16407 reply_id: 61273[/import]

I tried lowering sampling rates, used the aac format, and nothing worked – until I used a wav. That has worked beautifully. The only problem is that my mp3 was only 480kb, and my wav is 10mb! It more than doubled the size of my app…

Anyway, thanks for the help. I’ll probably just include the wav with the iOS version and the mp3 with the android version.

Dave [import]uid: 80784 topic_id: 16407 reply_id: 61897[/import]

Try m4v format :slight_smile: [import]uid: 84637 topic_id: 16407 reply_id: 61915[/import]