NW > Sound > Wave File (FWAV)

This file contains wave sound data. It is usually stored in a wave archive.

This page describes version 0x10100 and 0x10200 of the file format.

Block idDescription
0x7000Info block
0x7001Data block

Info Block

OffsetSizeDescription
0x04Identifier ("INFO")
0x44Block size
0x81Sample format
0x91Is looped
0xA2Padding
0xC4Sample rate
0x104Loop start sample
0x144Number of samples
0x184Version 0x10100: Reserved (always 0)
Version 0x10200: Adjusted loop start sample (see below)
0x1C4Number of channels (up to 2)
0x20References to channel info (0x7100), relative to 'number of channels' field.

The adjusted loop start sample is always less than the real loop start sample. If the adjusted loop start sample is X less than the real loop start sample, the last X samples of the wave file are skipped when the wave file is looped.

Sample Format

ValueDescription
08-bit
116-bit
2ADPCM

Channel Info

OffsetSizeDescription
0x08Reference into data block (0x1F00)
0x88Reference to DSP ADPCM info (0x0300)
0x104Unused (always 0)

DSP ADPCM Info

OffsetSizeDescription
0x016 * 2ADPCM coefficients
0x206ADPCM context (main)
0x266ADPCM context (loop)
0x282Unused (always 0)

ADPCM Context

OffsetSizeDescription
0x02Initial header byte
0x22Initial hist 1
0x42Initial hist 2

Data Block

This block contains the actual sound data.

In version 0x10100, the sound data is aligned to 32 bytes. In version 0x10200, it is aligned to 64 bytes.

OffsetSizeDescription
0x04Identifier ("DATA")
0x44Block size
0x8Sound data