Least Cpu Intensive Music Format?


thebooboo

Still Fresh
Joined
Mar 1, 2006
Messages
51
Location
London, UK
Website
www.timsrecordlabel.com
Hello my GP2X friends!

Making my shoot-em-up for GP2X using C++/SDL, it runs nice and smooth with graphics only, acceptably smooth with sound effects, but when I play an ogg vorbis file for music it slows down too much. The music needs to be played as "proper" audio (ie: not chip music or a looped 10-second wav etc.) as I'm using the game to promote music on my label.

So my question is: does anyone know what the least CPU-intensive way to play music in-game is? Is there a certain format/compression setting for ogg that uses less power to decode on the fly? What about MP3s, are they less demanding? Is mono better than stereo (stupid question??)?? I need to use a small buffer size in the mixer as it's playing sound effects.

Any info would be much appreciated. Also, has anyone got any good games that aren't in the GP2X file archive at http://archive.gp2x.de/cgi-bin/cfiles.cgi ? Or is there any other sites that host other GP2X games?

The Booboo
 
thebooboo posted on Mar 1 2006 at 03:34 AM said:
Hello my GP2X friends!

Making my shoot-em-up for GP2X using C++/SDL, it runs nice and smooth with graphics only, acceptably smooth with sound effects, but when I play an ogg vorbis file for music it slows down too much. The music needs to be played as "proper" audio (ie: not chip music or a looped 10-second wav etc.) as I'm using the game to promote music on my label.

So my question is: does anyone know what the least CPU-intensive way to play music in-game is? Is there a certain format/compression setting for ogg that uses less power to decode on the fly? What about MP3s, are they less demanding? Is mono better than stereo (stupid question??)?? I need to use a small buffer size in the mixer as it's playing sound effects.

Any info would be much appreciated. Also, has anyone got any good games that aren't in the GP2X file archive at http://archive.gp2x.de/cgi-bin/cfiles.cgi ? Or is there any other sites that host other GP2X games?

The Booboo

mp3s definitely require less computation than oggs. dunno about mono but i'm guessing it'd be quicker to decode by some amount. sound effects should probably be uncompressed wavs (if you need smaller files you can usually get away with a sampling rate of 22or even 11kHz).

edit: as you mention sfx separately you're probably using wavs for those anyway. my apologies :)

also most things end up on the gp2x.de archives eventually, unless they are betas and that sort of thing. the gp32 section has a subsection with mods for doom and beats of rage.
 
Last edited by a moderator:
thebooboo posted on Mar 1 2006 at 10:34 AM said:
Hello my GP2X friends!

Making my shoot-em-up for GP2X using C++/SDL, it runs nice and smooth with graphics only, acceptably smooth with sound effects, but when I play an ogg vorbis file for music it slows down too much. The music needs to be played as "proper" audio (ie: not chip music or a looped 10-second wav etc.) as I'm using the game to promote music on my label.


So my question is: does anyone know what the least CPU-intensive way to play music in-game is? Is there a certain format/compression setting for ogg that uses less power to decode on the fly? What about MP3s, are they less demanding? Is mono better than stereo (stupid question??)?? I need to use a small buffer size in the mixer as it's playing sound effects.

The MP3 is certainly less cpu intensive than ogg. It should not impose too much perfomance hit. But if you want fastest method I suggest using plain 22050KHz/8 bit format. For in a game music it's sufficient and even with stereo you will fit over 20 seconds in just 1MB.

Remember also that you don't have to load all your music at once. Reloading 2-5 megabytes from SD card from time to time should not take too much time.
 
Last edited by a moderator:
First of all, make sure that the OGG decoding your SDL library uses is based on Tremor, the fixed point implementation. Floats are slow on the GP2x. And perhaps you can get the OGG decoding code to work on the second core.

Good luck :)
 
Mono is definitely a lot faster than stereo: back when I had a shitty PC that could barely run Win98, I used to disable stereo mode on Winamp to get noticeably better performance out of it.

Decoding 1 channel instead of 2 obviously halves the work load.
 
Back
Top