Line 5:
Line 5:
All the offsets are absolute (from beginning of file), except where mentioned.<br/>
All the offsets are absolute (from beginning of file), except where mentioned.<br/>
All the sizes are in bytes, 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 ===
=== BRSTM header ===
Line 429:
Line 430:
Each entry in the table contains the final two samples from the preceding block.<br/>
Each entry in the table contains 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.
The first entry in the table contains the history samples contained in part 3 of the HEAD chunk.
+
+
==== Header ====
{| class="wikitable"
{| class="wikitable"
Line 443:
Line 446:
| 4
| 4
| Length of entire ADPC section.
| Length of entire ADPC section.
−
|-
−
| 0x0008
−
| ADPC entry count * Channel count * 4
−
| ADPC entries
|}
|}
Line 473:
Line 472:
| Channel 1 History sample 2
| Channel 1 History sample 2
|-
|-
−
| 0x0008
+
| ...
| 2
| 2
| Channel N History sample 1
| Channel N History sample 1
|-
|-
−
| 0x000A
+
| ...
| 2
| 2
| Channel N History sample 2
| Channel N History sample 2
Line 485:
Line 484:
The DATA chunk contains ADPCM sound data.
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]]
[[Category:File formats]]