gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Audio > How can I put and play ".raw musics" in a game ?!

#157512 - renatobs - Mon May 26, 2008 6:55 am

Hi. I?m a brazilian guy that love games and development and I?d like to know if someone could help me ! My english isn?t very good, but I?ll try to do you understand me:
I was doing a game to GBA and I?m converting it to NDS. I?m doing 2 games, a original game ( Hayate Blade ) and a remake from a SEGA Genesis RPG game, "Shining Force 2". The graphics engine is ok, but I can?t get information about how can I put "music" in game. This always was the problem with my games. I think to do the game to PC (musics is easy), but I love "video game consoles", mainly portable like NDS, and cuz of it I need some help !!
I?d like to can a "routine" to play PCM (.raw) musics in the games. The Shining Force 2 have a CD Music call "Symphonic Suite" (beautiful musics) and I?d like put this in the game, converting to ".raw" and using it. There?s are games like "Elite Beat Agents" that have a lot of musics and with a goos quality !!
Please, I know that the game will have a good quality of graphics and AI, but I need help to put the musics there... select musics, turn the volume on and off, do fade in and out... and put special effects too...
I?m not using PAlib or ASlib, only "libnds" (DevKitPro). I prefer and like it.
Please... help me !!!!

#157546 - tepples - Mon May 26, 2008 4:56 pm

Usually if you're using recorded music, you need to compress it in order to fit a decent amount on your storage device. But you have to choose a codec that the target system can decode in real time and leave some time available for game and graphics code.

On the GBA, one of your options is GSM Player, as seen in Luminesweeper.

On the DS, there are libraries to play MP2, MP3, Ogg Vorbis, etc. The source code for MoonShell and DSOrganize is available.

And posting the same thing several times is discouraged in this board. I've deleted the duplicates. Please forgive me if I screwed up.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#157571 - silent_code - Mon May 26, 2008 9:38 pm

if you realy want to get to the metal, check out what gbatek has to say about sound hw.

happy coding.

ps: please, please, please, please, don't do pentuple posts (posting the same thing five times), it will only hurt you, not help you!
_________________
July 5th 08: "Volumetric Shadow Demo" 1.6.0 (final) source released
June 5th 08: "Zombie NDS" WIP released!
It's all on my page, just click WWW below.

#157740 - no2pencil - Wed May 28, 2008 10:34 am

@ renatobs : Do you have this project on the web anywhere? I'm looking to do a GBA to NDS conversion as well, & it's a bit overwhelming. I'm also looking at the Audio aspects.
_________________
-#2pencil