BWAV (File Format)

From Wexos's Wiki
Jump to navigationJump to search

BWAV (Binary WAVe) is a sound format used in Nintendo Switch games such as Super Mario Maker 2 and Ring Fit Adventure. It is located both as files and sub files into BARS files.

File Format

Header

Offset Type Description
0x00 Char[4] File magic. Always BWAV in ASCII.
0x04 UInt16 Byte-order-mark. FE FF for big endian, FF FE for little endian.
0x06 UInt16 Version number.
0x08 UInt32 Unknown.
0x0C UInt16 Audio type: 0 = stream, 1 = prefetch.
0x0E UInt16 Number of channels.

Channel Info

A list of channel infos follow the header. It is unknown why some parameters is specified for each individual channel instead of the whole stream. Each entry has the following structure:

Offset Type Description
0x00 UInt16 Unknown.
0x02 UInt16 Unknown.
0x04 UInt32 Sample rate.
0x08 UInt32 Total number of sound samples in the channel. This value corrusponds to the full stream number of sound samples, thus if audio type is prefetch, this value is incorrect.
0x0C UInt32 Total number of sound samples in the channel.
0x10 UInt16[8][2] Coefficients, used for DSP ADPCM decoding.
0x30 UInt32 Absolute channel data offset. This value corrusponds to the full stream offset, thus if audio type is prefetch, this value is incorrect.
0x34 UInt32 Absolute channel data offset.
0x38 UInt32 Unknown.
0x3C UInt32 Loop end in samples. FF FF FF FF if looping is disabled.
0x40 UInt32 Loop start in samples.
0x44 UInt32 Unknown.
0x48 UInt32 Unknown.

Version List

Version Found in
0.1

Tools

The following tools can handle BWAV files:

  • (none)