-
Notifications
You must be signed in to change notification settings - Fork 1
SOUND
Jocelyn Beedie edited this page Mar 10, 2021
·
2 revisions
Sound files have the "SOUND" type, and often end with ".WAV". These files contain ADPCM data in a similar format to Nintendo's DSPADPCM. This format has a 92 byte header.
uint8_t unknown0; // Always 0
char junk0[3]; // Junk data
uint32_t sample_rate; // In Hz
char junk1[4]; // More junk data
uint32_t data_length; // Number of bytes of data contained in this file. Always a multiple of 8 (all ADPCM frames are 8 bytes)
uint32_t unknown1; // Always 0
uint32_t unknown2; // Always 2
uint32_t num_adpcm_nibbles; // Number of used ADPCM nibbles, including frame headers. Always less than or equal to (data_length / 2).
uint32_t unknown3; // Always 2
uint32_t unknown4; // Equals 1.3653 * sample_rate
uint32_t unknown5; // Always 0
uint32_t unknown6; // Always 0
uint16_t unknown7; // Always 0
int16_t coef[16]; // ADPCM coefficients
uint16_t unknown8; // Always 0
int16_t first_header; // Equivalent to the first ADPCM frame header
uint16_t unknown9; // Always 0
uint32_t unknown10; // Unknown value between 0 and 255
uint32_t unknown11; // Unknown
uint8_t data[data_length]; // ADPCM data
It is very likely that some of the unknown data relates to DSPADPCM's loop feature, but this feature is never used in any known games, so data relating to looping is zeroed out.