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.

DS development > Sound stuff

#167139 - iainprice - Tue Mar 03, 2009 10:32 am

Is there a limit to the length of a sound file? My raw keeps looping far too early....

[code]soundPlaySample(main_raw, SoundFormat_8Bit, main_raw_size, 11025, 127, 64, true, 0);
[/code]

The tune is about 2 and a half mins long but it loops after 15 seconds or so... any ideas?

#167140 - sverx - Tue Mar 03, 2009 10:51 am

iainprice wrote:
Is there a limit to the length of a sound file?


Loop length can be up to 16MB... so if it's looping too early check your main_raw_size parameter, you should specify length in bytes...

#167141 - iainprice - Tue Mar 03, 2009 11:29 am

its auto generated, the raw file is in the arm9 build dir and the compiler generated main_raw.h and main_raw.o files.... so the size should be ok..... it's not the name is it? main being reserved...... but its main_raw.....

#167147 - sverx - Tue Mar 03, 2009 6:47 pm

is it around 1.6 MB? Quite big... aren't you running out of memory?

#167149 - iainprice - Tue Mar 03, 2009 7:43 pm

that might be it.... should try converting it to streaming....

#167164 - sverx - Wed Mar 04, 2009 10:40 am

iainprice wrote:
that might be it.... should try converting it to streaming....


a 2 minutes and a half tune... IMHO it would be better if it was a module (MOD/XM/IT etc...)