DSP (File Format): Difference between revisions
→Header: adding types
>Aruki m (Removing filedone template. Should we keep that template around so we can have a category for fully documented formats?) |
>Aruki (→Header: adding types) |
||
Line 9: | Line 9: | ||
{| class="wikitable" | {| class="wikitable" | ||
! Offset | ! Offset | ||
! Type | |||
! Size | ! Size | ||
! Description | ! Description | ||
|- | |- | ||
| 0x0 | | 0x0 | ||
| u32 | |||
| 4 | | 4 | ||
| '''Sample count''' | | '''Sample count''' | ||
|- | |- | ||
| 0x4 | | 0x4 | ||
| u32 | |||
| 4 | | 4 | ||
| '''ADPCM nibble count'''; includes frame headers | | '''ADPCM nibble count'''; includes frame headers | ||
|- | |- | ||
| 0x8 | | 0x8 | ||
| u32 | |||
| 4 | | 4 | ||
| '''Sample rate''' | | '''Sample rate''' | ||
|- | |- | ||
| 0xC | | 0xC | ||
| u16 | |||
| 2 | | 2 | ||
| '''Loop flag'''; 1 means looped, 0 means not looped | | '''Loop flag'''; 1 means looped, 0 means not looped | ||
|- | |- | ||
| 0xE | | 0xE | ||
| u16 | |||
| 2 | | 2 | ||
| '''Format'''; always 0 | | '''Format'''; always 0 | ||
|- | |- | ||
| 0x10 | | 0x10 | ||
| u32 | |||
| 4 | | 4 | ||
| '''Loop start offset''' | | '''Loop start offset''' | ||
|- | |- | ||
| 0x14 | | 0x14 | ||
| u32 | |||
| 4 | | 4 | ||
| '''Loop end offset''' | | '''Loop end offset''' | ||
|- | |- | ||
| 0x18 | | 0x18 | ||
| u32 | |||
| 4 | | 4 | ||
| '''Current address'''; always 0 | | '''Current address'''; always 0 | ||
|- | |- | ||
| 0x1C | | 0x1C | ||
| s16[16] | |||
| 2 × 16 | | 2 × 16 | ||
| '''Decode coefficients'''; this is 8 pairs of signed 16-bit values | | '''Decode coefficients'''; this is 8 pairs of signed 16-bit values | ||
|- | |- | ||
| 0x3C | | 0x3C | ||
| u16 | |||
| 2 | | 2 | ||
| '''Gain'''; always 0 | | '''Gain'''; always 0 | ||
|- | |- | ||
| 0x3E | | 0x3E | ||
| u16 | |||
| 2 | | 2 | ||
| '''Initial predictor/scale'''; always matches first frame header | | '''Initial predictor/scale'''; always matches first frame header | ||
|- | |- | ||
| 0x40 | | 0x40 | ||
| s16 | |||
| 2 | | 2 | ||
| '''Initial sample history 1''' | | '''Initial sample history 1''' | ||
|- | |- | ||
| 0x42 | | 0x42 | ||
| s16 | |||
| 2 | | 2 | ||
| '''Initial sample history 2''' | | '''Initial sample history 2''' | ||
|- | |- | ||
| 0x44 | | 0x44 | ||
| u16 | |||
| 2 | | 2 | ||
| '''Loop context predictor/scale''' | | '''Loop context predictor/scale''' | ||
|- | |- | ||
| 0x46 | | 0x46 | ||
| s16 | |||
| 2 | | 2 | ||
| '''Loop context sample history 1''' | | '''Loop context sample history 1''' | ||
|- | |- | ||
| 0x48 | | 0x48 | ||
| s16 | |||
| 2 | | 2 | ||
| '''Loop context sample history 2''' | | '''Loop context sample history 2''' | ||
|- | |- | ||
| 0x4A | | 0x4A | ||
| u16[11] | |||
| 2 × 11 | | 2 × 11 | ||
| '''Reserved''' | | '''Reserved''' |