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.

Coding > format parameter for setGenericSound *solved*

#137124 - SaruCoder - Wed Aug 08, 2007 4:07 am

Hey guys,

I'm looking at setGenericSound in nds/arm9/sound.h, and what are the values for the format parameter?

Code:

void setGenericSound( u32 rate, u8 vol, u8 pan, u8 format);


Last edited by SaruCoder on Thu Aug 09, 2007 3:03 am; edited 1 time in total

#137126 - ThousandKnives - Wed Aug 08, 2007 4:43 am

"format" refers to whether the sample is 8-bit or 16-bit. The value should be either 0 or 1.
I believe that 0 is for 8-bit and 1 is for 16-bit.

#137134 - NeX - Wed Aug 08, 2007 9:32 am

You are correct.
_________________
Strummer or Drummer?.
Or maybe you would rather play with sand? Sandscape is for you in that case.