Changes

Jump to navigation Jump to search
702 bytes added ,  09:52, 5 January 2015
Line 12: Line 12:  
=== Format ===
 
=== Format ===
   −
The structure is very similar to the CWAV, except these notable differences :
+
=== CSTM Header ===
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 19: Line 19:  
|-
 
|-
 
| 0x000 || 4 || MAGIC "CSTM"
 
| 0x000 || 4 || MAGIC "CSTM"
 +
|}
 +
 +
=== INFO Header ===
 +
 +
{| class="wikitable" border="1"
 
|-
 
|-
 +
! OFFSET !! SIZE !!  DESCRIPTION
 +
|-
 +
| 0x000 || 4 || Magic "INFO"
 +
|-
 +
| 0x004 || 4 || Length
 +
|-
 +
| 0x020 || 1 || Type (00 = PCM8, 01 = PCM16, 02 = DSPADPCM)
 +
|-
 +
| 0x021 || 1 || Loop Flag
 +
|-
 +
| 0x022 || 2 || Total Channels
 +
|-
 +
| 0x024 || 4 || Sample Rate
 +
|-
 +
| 0x028 || 4 || Unknown
 +
|-
 +
| 0x02C || 4 || Total samples
 +
|-
 +
| 0x030 || X || The Channels' Data Pointers
 +
|-
 +
| X || X || The Channels' Data
 +
|}
 +
 +
=== DATA Header ===
 +
 +
{| class="wikitable" border="1"
 +
|-
 +
! OFFSET !! SIZE !!  DESCRIPTION
 +
|-
 +
| 0x000 || 4 || Magic "DATA"
 +
|-
 +
| 0x004 || 4 || Length
 +
|-
 +
| 0x020 || X || Start of Channel Data
 
|}
 
|}
 +
 +
Unlike CWAV, if there are 2 channels in a CSTM they alternate every 0x2000 bytes of the DATA partition starting at 0x20.
    
Additionally it introduces a new partition called SEEK which comes right before DATA, so a CSTM would be ordered like this:
 
Additionally it introduces a new partition called SEEK which comes right before DATA, so a CSTM would be ordered like this:
Line 29: Line 70:  
* DATA Partition
 
* DATA Partition
   −
By default this means that 0x24-0x2B in the CSTM Partition is the SEEK position and length respectively, and DATA position and length follows it. (in a CWAV 0x24-0x2B is usually the DATA position and length)
+
By default this means that 0x24-0x2B in the CSTM Partition is the SEEK position and length respectively, and DATA position and length follows it (in a CWAV 0x24-0x2B is usually the DATA position and length).
    
=== SEEK ===
 
=== SEEK ===
9

edits

Navigation menu