ios game audio file size - Social Sound Design most recent 30 from http://socialsounddesign.com 2013-05-24T07:54:50Z http://socialsounddesign.com/feeds/question/14728 http://www.creativecommons.org/licenses/by-nc/2.5/rdf http://socialsounddesign.com/questions/14728/ios-game-audio-file-size ios game audio file size anonymous 2012-07-21T02:28:13Z 2012-07-21T16:23:02Z <p>Hey guys, I am in the process of making sounds for my first game. The project is for an iOS game app and given the 20mb size limit, my audio files have to be really small. As such I would like to deliver some of the shorter sounds at a 24khz sample rate. However, using Logic Pro, I can't seem to figure out how to do that! Obviously when I bounce the file and just simply change the sample rate from 44 to 24, the file is played back twice as fast. How do I make this not happen?</p> <p>On a related note, how should the files be delivered? Apple seems to stress that the sounds should be in Linear PCM or IMA4 codec, but these files are huge. If you use the bash script afconvert to put them in a smaller file format, it always leads to some awful aliasing. Why would I not just deliver it as an mp3 or AAC? On the other hand, even if I did that, don't the more compressed formats like mp3 require more work for the CPU to encode them on the iPhone? </p> <p>Sorry for the large amount of questions, if you can answer any one of them, I would be very grateful.</p> http://socialsounddesign.com/questions/14728/ios-game-audio-file-size/14732#14732 Answer by David_EchoicAudio for ios game audio file size David_EchoicAudio 2012-07-21T09:06:03Z 2012-07-21T09:06:03Z <p>Hi there. I use Logic 9 and save PCM Wav at 22050hz and play back is fine. I'm not sure why you're getting problems with the speed?</p> <p>20mb goes a long way if you use it efficiently. Keep files sizes low by saving as mono, keep SFX to &lt;0.5sec. Loop SFX for longer instances. Use pitch changes to create variations. </p> http://socialsounddesign.com/questions/14728/ios-game-audio-file-size/14734#14734 Answer by Andrew for ios game audio file size Andrew 2012-07-21T10:39:37Z 2012-07-21T10:39:37Z <p>First of all what game engine are you using? </p> <p>If its something like Unity then generally for SFX you would use wav and for large sound files use mp3 or ogg (although you would use ogg for seamless loops).</p> http://socialsounddesign.com/questions/14728/ios-game-audio-file-size/14735#14735 Answer by Internet Human for ios game audio file size Internet Human 2012-07-21T14:48:26Z 2012-07-21T16:23:02Z <p>It's playing back too fast because a program or the hardware is resampling the sound file to 44.1 or 48kHz sample rate without compensating for the original file length, which leads to doubling its playback speed. In other words, the file might be 22.5/24kHz, but you're playing it back at 44.1/48kHz. Usually resampling algorithms do compensate by default and software/hardware adjusts to the correct sample rate. Otherwise you would use the terms pitch- or timestretching (or -compression) to describe the software process. So the application/hardware (your sound card or playback software) is set up wrong or you're feeding it wrong formats.</p> <p>You should consider your game engine's or SDK's manual for the supported audio formats on the target platform. Ogg Vorbis is widely supported and highly recommended for games, but it all depends on whether it's supported or not. Otherwise MP3 for most sounds and WAV/AIFF for everything that needs looping (i.e. BG tracks), unless there are other options.</p> <p>You would be putting a lot of simultaneous sound to make CPU use of any concern, and application perfomance is mainly the developer's problem, so don't worry about it too much, other than going for the most efficient formats that you can use. This applies to sound in all game development.</p>