GP32 Mp3 Player Source Code...


nerd of nerds

w00t!!!!
Joined
Feb 25, 2003
Messages
838
hello.

i am interested in working on a type of music game for the gp32 as my first real project for it and as a way to work with its sound hardware (something i haven't done before...).

this project more than likely won't get finished because i will have much less spare time in the coming weeks...but i'd at least like to get it to start...

so my question is this:

is there any well optimized mp3 player source for the gp32 that is pretty simple to use?

basically all i want to do is some simple graphic scrolling and input (maybe via chatboard so it could have hackable controls...)

i don't want to get people excited over this...because i'm not that great of a coder, but the idea is simple enough that it shouldn't be TOO hard for me...
 
I'm hacking on an OggVorbis Player for the GP32. One of the causes was that I couldn't find a good working mp3 player. Anyway, the system load for playing an Ogg (as will be for an mp3) is rather high. Not only the CPU load is "impressive", but the BUS load is also that high, that I've you do some screen output, the GP32 sound bug will appear. For game music I suggest to try a MOD-Player.

Greetings,
SvOlli
 
SvOlli posted on Aug 5 2004 at 12:29 AM said:
I'm hacking on an OggVorbis Player for the GP32. One of the causes was that I couldn't find a good working mp3 player. Anyway, the system load for playing an Ogg (as will be for an mp3) is rather high. Not only the CPU load is "impressive", but the BUS load is also that high, that I've you do some screen output, the GP32 sound bug will appear. For game music I suggest to try a MOD-Player.

Greetings,
SvOlli
any way i can convert mp3s to mods?

thanks!
 
Last edited by a moderator:
Short answer: no, forget it.

Long answer: technically yes, but don't expect a straight conversion. And it takes a lot of patience and craftsmanship. Bluntly put it are entirely different formats. Whilst MP3 is a wave-type file (ala OGG, WAV etc.) MOD files are tracker/sequencer like files (ala MIDI).
Sure, you can convert the MP3 into a WAV and use that within a MOD file, but that either yields a file too huge to use or a very low quality file, just to keep it small enough.

Your best bet is to go with original music or ask someone to make a cover of the song in MOD-format. But there's no such thing as a good straight conversion from MP3 to MOD.
 
Expect to see some crappy GamePark SDK examples for using libMAD (An int only MP3 player library) and libTremor (Unless SvOlli would like to contribute one ;)) when I get them cleaned-up and put into DevKitArm's GamePark SDK package.

I am also hacking over all the GamePark SDK examples and a few of my own and trying to write a few short tutorials on using them/the SDK/DKArm etc.

Note to Rico if he reads this ;). What’s the chance of me using your excellent tutorials as part of DKArms GP SDK package?

As people have suggested, playing MP3's, OGG's etc. in games puts a high bus load on the GP32 and is not ideal and is definitely not a quick and easy solution to your music needs.
 
I'm not particularly good at development, but how about using wav2bor from Beats of Rage? That seems to work perfectly well musically with sprites fighting on screen etc..

Maybe its possible to create a DDR / music based game just with the BoR engine alone? (You would need to get the Squidge / Juggler code though)
 
Well, there is one format that that was popular before MP3... and that was "MP2"... And if I remember correctly it does not compress as high as MP3 and it was a low bitrate (Max 64?) but say the size might be double around 8 MB / 10 min music and thats not that bad...
I remember I played MP2 format files on my Amiga030@40Mhz and that was not too bad... but finding C/C++ source's can be hard...
Hmm... Aminet... wait...
Found a MP2 encoder source... must be som decode info too somewhere...
ftp://de.aminet.net/pub/aminet/mus/misc/Pegase_SRC.lha
 
Actually CPU load for playback of mp3s is much lower than many think, and I'm sure it is easily possible to use mp3 playback alongside a game providing you are clocking it at 133Mhz and aren't already using 80%+ of the cpu.

The trick is, the lower the bitrate and frequency the less time it takes to decode. So if you are encoding in 22khz mono at 64kbps, you may find it gives you ample time to do something less boring instead.

DJWillis' examples with libmad are definitely what your after!

Upload chop chop John. ;-)
 
DJWillis posted on Aug 5 2004 at 02:39 AM said:
Expect to see some crappy GamePark SDK examples for using libMAD (An int only MP3 player library) and libTremor (Unless SvOlli would like to contribute one ;)) when I get them cleaned-up and put into DevKitArm's GamePark SDK package.

I am also hacking over all the GamePark SDK examples and a few of my own and trying to write a few short tutorials on using them/the SDK/DKArm etc.

Note to Rico if he reads this ;). What’s the chance of me using your excellent tutorials as part of DKArms GP SDK package?

As people have suggested, playing MP3's, OGG's etc. in games puts a high bus load on the GP32 and is not ideal and is definitely not a quick and easy solution to your music needs.
any chance those would (easily) work with ADS? because i like that and i hate having to f*** around with those damned makefiles...
 
Last edited by a moderator:
nerd of nerds posted on Aug 5 2004 at 06:11 PM said:
any chance those would (easily) work with ADS? because i like that and i hate having to f*** around with those damned makefiles...
Not really, DevKitArm is GCC based and there going to hopefully be part of that. No point supporting ADS.

The code should build on ADS but your on your own when it comes to building it ;).
 
Last edited by a moderator:
RobertJ posted on Aug 5 2004 at 12:24 PM said:
Actually CPU load for playback of mp3s is much lower than many think, and I'm sure it is easily possible to use mp3 playback alongside a game providing you are clocking it at 133Mhz and aren't already using 80%+ of the cpu.
hmm.. now let's assume monty is right with his estimate that vorbis decoding can take _less_ cpu power than mp3 decoding.. yay :)
 
Last edited by a moderator:
oxygene posted on Aug 6 2004 at 07:56 PM said:
hmm.. now let's assume monty is right with his estimate that vorbis decoding can take _less_ cpu power than mp3 decoding.. yay :)
I highly doubt that. GpMadMP3 can run on 66MHz, and I haven't seen one Ogg Vorbis Player that runs with less than 100MHz.

Greetings,
SvOlli
 
Last edited by a moderator:
CPU usage for libmad when clocked at 66Mhz:

96-128kbs vbr 44khz stereo mp3 uses about 65% cpu
40-96kbs vbr 32khz mono mp3 uses about 34% cpu

Up the cpu to 133Mhz and the usage falls to 36% and 16% respectively.

(Before anyone asks, gpmadmp3 has debugging code to time how long it spends doing smc, video and idle functions)
 
Back
Top