Changes

6 bytes removed ,  20:08, 2 January 2015
no edit summary
Line 361: Line 361:  
| 0x14
 
| 0x14
 
| 4
 
| 4
| Physical address for the audio data, for the main channel.
+
| Physical address for the beginning of the audio data.
 
|-
 
|-
 
| 0x18
 
| 0x18
 
| 4
 
| 4
| Physical address for the audio data, for the second channel(only needs set if a flag is set which enables using this address).
+
| Physical address for the loop point of the sample.
 
|-
 
|-
 
| 0x1C
 
| 0x1C
 
| 4
 
| 4
| Total byte-size for the audio data.
+
| Total byte-size for the audio data (one-shot), for the looped section (looped)
 
|}
 
|}
   −
This initializes the [[CSND]] channel registers located at: 0x1EC03400 + (channel_index*0x20). Whether mono/stereo audio is used is determined via an unknown flag. When looping is used, audio playback initially begins with playing from the first physical address(using the byte-size from the channel register when audio playback was triggered). Once looping begins after the initial audio playback finishes, the second physical address is used for the beginning of the audio data instead(using the same byte-size used with the initial audio playback).
+
This initializes the [[CSND]] channel registers located at: 0x1EC03400 + (channel_index*0x20). It is unknown how to use stereo samples. When looping is enabled, audio playback initially begins with playing from the first physical address (its length depends on bit14 of parameter 0x8, see below). Once the initial audio playback finishes, the looped section begins at the second physical address. The length of the loop is the byte-size specified at 0x1C.
    
===Parameter word 0x8===
 
===Parameter word 0x8===
Line 384: Line 384:  
|-
 
|-
 
| 6
 
| 6
| 0 = disable linear interpolation, 1 = enable linear interpolation
+
| 0 = disable linear interpolation, 1 = enable linear interpolation.
 
|-
 
|-
 
| 9-7
 
| 9-7
 
| ?
 
| ?
 
|-
 
|-
| 11-10
+
| 10
| 1 = enable looping, 2 = disable looping.
+
| 0 = disable looping (one-shot sample), 1 = enable looping.
 +
|-
 +
| 11
 +
| ?
 
|-
 
|-
 
| 13-12
 
| 13-12
 
| This sets the encoding, some of the names for the following encodings are from [https://github.com/3dshax/ctr/blob/master/ctrtool/cwav.h here]. 0 = PCM8, 1 = PCM16, 2 = IMA-ADPCM. 3 = PSG, similar to DS.
 
| This sets the encoding, some of the names for the following encodings are from [https://github.com/3dshax/ctr/blob/master/ctrtool/cwav.h here]. 0 = PCM8, 1 = PCM16, 2 = IMA-ADPCM. 3 = PSG, similar to DS.
 
|-
 
|-
| 15-14
+
| 14
| ? (set this to 1 for proper looping)
+
| 0 = the non-looped section has the same length as the looped section, 1 = the non-looped section has length address2 - address1
 +
|-
 +
| 15
 +
| ?
 
|-
 
|-
 
| 31-16
 
| 31-16