NW > Sound > Sound Archive (FSAR)
A BFSAR file is an archive with all kinds of sound-related files.
Offset Size Description
0x0 8 String reference (0x1F01)
0x8 4 String size, including null terminator
This is a binary search tree to efficiently find strings in the table.
Offset Size Description
0x0 4 Root node index
0x4 4 Number of nodes
0x8 Tree nodes
Offset Size Description
0x0 2 1 if this is a leaf, 0 otherwise
0x2 2 String bit index
0x4 4 Left child index, go here when the bit is 0
0x8 4 Right child index, go here when the bit is 1
0xC 4 String table index
0x10 4 Item id
Offset Size Description
0x0 4 Number of entries
0x4 References
This structure describes a sound file (STRM/WSD/SE).
Offset Size Description
0x0 4 File index
0x4 4 Player item id
0x8 1 Initial volume
0x9 1 Remote filter
0xA 2 Padding
0xC 8 Reference to stream (0x2201), wave (0x2202) or sequence (0x2203) info
0x14 4 Flags. This field specifies which of the following fields is present.
Every optional field takes up exactly 4 bytes (if present). The user param fields can be used to store additional information that can be read by the game.
Flag Description
0x1 String table index (name)
0x2 0x0000XXYY: XX = pan curve, YY = pan mode
0x4 0x0000XXYY: XX = actor player id, YY = player priority
0x100 Offset to 3D info
0x20000 Is front bypass
0x10000000 User param 1
0x20000000 User param 2
0x40000000 User param 3
0x80000000 User param 4
Offset Size Description
0x0 4 Flags
0x4 4 Unknown float
0x8 1 Unknown
0x9 1 Unknown
Offset Size Description
0x0 2 Bitmask defining which tracks are valid
0x2 2 Number of channels (up to 16)
0x4 8 Reference to track info table (0x0101)
Offset Size Description
0x0 4 Number of entries (up to 2)
0x4 Channel indexes (one byte per entry)
Offset Size Description
0x0 4 Wave index in wave archive
0x4 4 Unknown
0x8 4 Flags. This field specifies which of the following fields is present.
Every optional field takes up exactly 4 bytes (if present).
Flag Description
0x1 0x0000XXYY: XX = Release priority fix, YY = Channel priority
Offset Size Description
0x0 8 Reference to bank id table (0x0100)
0x8 4 Bitmask defining which tracks are valid
0xC 4 Flags. This field specifies which of the following fields is present.
Every optional field takes up exactly 4 bytes (if present).
Flag Description
0x1 Start offset
0x2 0x0000XXYY: XX = Release priority fix, YY = Channel priority
Offset Size Description
0x0 4 Number of entries
0x4 Bank item ids
This structure describes a set of sound files.
Every optional field takes up exactly 4 bytes (if present).
Offset Size Description
0x0 4 Number of entries
0x4 File indices
This structure describes a bank file .
Offset Size Description
0x0 4 File index
0x4 8 Reference to wave archive table (0x0100)
0xC 4 Flags. This field specifies which of the following fields is present.
Every optional field takes up exactly 4 bytes (if present).
Offset Size Description
0x0 4 Number of entries
0x4 Wave archive item ids
This structure describes a wave archive file .
Offset Size Description
0x0 4 File index
0x4 1 Unknown
0x5 3 Padding
0x8 4 Flags. This field specifies which of the following fields is present.
Every optional field takes up exactly 4 bytes (if present).
Flag Description
0x1 String table index (name)
0x2 Number of wave files
This structure describes a group file .
Offset Size Description
0x0 4 File index
0x4 4 Flags. This field specifies which of the following fields is present.
Every optional field takes up exactly 4 bytes (if present).
This structure describes a sound player.
Offset Size Description
0x0 4 Playable sound limit
0x4 4 Flags. This field specifies which of the following fields is present.
Every optional field takes up exactly 4 bytes (if present).
Flag Description
0x1 String table index (name)
0x2 Player heap size
This structure describes a single file. A file can be stored either internally or in an external file.
If this file is stored in a group file instead of the file block , offset and filesize are set to -1.
Offset Size Description
0x0 Null-terminated filename string
This structure defines limits that are used to determine how much memory should be allocated.
Offset Size Description
0x0 2 Number of sequence sounds
0x2 2 Number of sequence tracks
0x4 2 Number of stream sounds
0x6 2 Unknown
0x8 2 Number of stream channels
0xA 2 Number of wave sounds
0xC 2 Unknown
This block contains the actual subfiles of the BFSAR file. All files are aligned to 32 bytes.
Offset Size Description
0x0 4 Identifier ("FILE")
0x4 4 Block size
0x8 Files