Changes

Jump to navigation Jump to search
1,829 bytes added ,  22:57, 29 April 2017
m
→‎HEAD chunk part 1: Fix variable name
All the offsets are absolute (from beginning of file), except where mentioned.<br/>
All the sizes are in bytes, except where mentioned.<br/>
Each chunk is padded to a multiple of 0x20.<br/>
=== BRSTM header ===
| 0x0030
| 4
| Bits Bytes per sample? (0x04 for 4-bit ADPCM)entry in the ADPC table
|}
==== HEAD chunk part 2 ====
There are at least 2 known types of this part:===== Header =====
{| class="wikitable"
|-
! TypeOffset! MarkerSize
! Description
|-
| 0x0000
| 1
| Number of tracks
|-
| 0x0001
| 1
| 0x01000000 | Used in Super Smash Bros. BrawlTrack Description Type
|-
| 0x0002
| 2
| 0x01010000| Used in other games.Padding? (0x00)
|}
===== Header Offset table =====The header contains one of this structure for each track
{| class="wikitable"
|-
|-
| 0x0000
| 1
| 0x01
|-
| 0x0001
| 1
| Track description type
|-
| 0x0002
| 2
| Padding? (0x00)
|-
| 0x0004
| 4
| MarkerOffset to track description
|}
===== Offset table Track Descriptions =====The file contains one There are at least 2 known types of this structure for each trackdescriptions: 
{| class="wikitable"
|-
! Offset! SizeType
! Description
|-
| 0x00000 | 4| MarkerUsed in Super Smash Bros. Brawl
|-
| 0x00041| 4| Offset to track descriptionUsed in other games.
|}
The header contains one track description for each track ====== Track Description Type 1 0 ======The file contains one of this structure for each track
{| class="wikitable"
|-
|}
====== Track Description Type 2 1 ======The file contains one of this structure for each track
{| class="wikitable"
|-
===== Offset table =====
The file header contains one of this structure for each channel
{| class="wikitable"
|-
===== ADPCM Channel Information =====
The file header contains one of this structure for each channel.
{| class="wikitable"
|-
| 0x002C
| 2
| History sample 1(Sample - 1)
|-
| 0x002E
| 2
| History sample 2(Sample - 2)
|-
| 0x0030
| 2
| Loop predictor/scale<br/>If BRSTM doesn't loop, these will be the same as the initial predictor/scale and history.
|-
| 0x0032
| 2
| Loop History sample 1(Sample - 1)
|-
| 0x0034
| 2
| Loop History sample 2(Sample - 2)
|-
| 0x0036
=== ADPC chunk ===
The ADPC chunk contains 2 PCM history samples per channel for every entry in the table.<br/>The number of samples per entry is typically 1216 bytes longspecified in the HEAD chunk.<br/>It seems to contain some other ADPCM Each entry in the tablecontains the final two samples from the preceding block.<br/>The first entry in the table contains the history samples contained in part 3 of the HEAD chunk. ==== Header ==== {| class="wikitable"|-! Offset! Size! Description|-| 0x0000| 4| "ADPC" (0x41445043)|-| 0x0004| 4| Length of entire ADPC section.|} ==== ADPC table entry====The size of each entry is the channel count * 4{| class="wikitable"|-! Offset! Size! Description|-| 0x0000| 2| Channel 0 History sample 1|-| 0x0002| 2| Channel 0 History sample 2|-| 0x0004| 2| Channel 1 History sample 1|-| 0x0006| 2| Channel 1 History sample 2|-| ...| 2| Channel N History sample 1|-| ...| 2| Channel N History sample 2|}
=== DATA chunk ===
The DATA chunk contains ADPCM sound data.
 
==== Header ====
{| class="wikitable"
|-
! Offset
! Size
! Description
|-
| 0x0000
| 4
| "DATA" (0x44415441)
|-
| 0x0004
| 4
| Length of entire DATA section.
|-
| 0x0008
| 4
| Number of padding samples between header and ADPCM data? Always 0x18
|-
| 0x000C
| 0x14
| Padding (0x00)
|}
 
==== ADPCM Data ====
The ADPCM audio data is interlaced per channel according to the block sizes specified in the header.
 
{| class="wikitable"
|-
! Description
! Size
|-
| Channel 0 block 0
| Block size
|-
| Channel 1 block 0
| Block size
|-
| Channel 0 block 1
| Block size
|-
| Channel 1 block 1
| Block size
|-
| ...
|
|-
| Channel 0 final block
| Final block size
|-
| Channel 1 final block
| Final block size
|}
[[Category:File formats]]

Navigation menu