Music and RAM usage
IsabelleK
Member, Sous Chef Posts: 2,807
Hello, I have a problem with my music file. It's a OGG file (but I also have MP3), its weight is about 3.5 MB, and it is about 3 minutes long.
When I run a simple app (which contains only one actor playing this music file) in GS Viewer on iPhone 3G, the other RAM usage is near 20 MB.
I tried to change this file to 22/mono, but RAM usage is almost the same. Is there any other way to decrease the RAM usage for this file (but not cropping it)?
Thank you.
When I run a simple app (which contains only one actor playing this music file) in GS Viewer on iPhone 3G, the other RAM usage is near 20 MB.
I tried to change this file to 22/mono, but RAM usage is almost the same. Is there any other way to decrease the RAM usage for this file (but not cropping it)?
Thank you.
Comments
afconvert -f caff -d 'aac ' -c 1 -l Mono $f
Well, maybe not really super aggressive, but definitely helps knock down the file sizes for me. ^_^
This command is entered from the Terminal app on every Mac OSX in the right location etc... Not quite the easiest thing to teach for people who are not familiar with using the command line in Mac OSX, but I'm planning to do a tutorial if possible. ^_^
All of the background music files in my games are over 3 minutes long and weigh in at less than 250K each.
1. Download Audacity.
2. Open your mp3 or .ogg file in Audacity.
3. Make all your music Mono instead of Stereo. Under the tracks menu, select 'Stereo Track to Mono'.
4. In the lower left corner, change your Project Rate to 22050 Hz.
5. Then use File/Export... to export the file as .m4a
6. Play with the export settings to get the lowest quality that still sounds good.
7. Do the same thing for .ogg files for sound FX, just use the ogg vorbis export options.
Now that of course, is for a game that is graphics, or game-logic heavy.
If you are making a music app, perhaps keep the stereo and up the quality to .caf files.
You have to pick your battles. You have very limited RAM to work with. If your game is more about graphics or gameplay, I would allocate more of the RAM for those. If your game is more about the audio, I would smash down the graphics instead.
Personally I think both are important, and I smash both down as much as possible. I would love stereo music in my games, but I cannot afford it memory-wise.
Still sounds good though
QS
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
EDIT: Nope, it helped Thank you.
EDIT 2: OMG, I think I cut off some graphics. Quality of my music is terrible now, and I paid too much for it, to make it sooooo low quality.
Start with the absolute lowest setting and keep increasing it until it sounds good.