Index Byte
|
Size
|
Description
|
0x2
|
2
|
CmdID 0x3
|
0xC
|
4
|
Physical address of the first audio sample in the loop.
|
0x10
|
4
|
Total byte-size of the loop sample-data.
|
This initializes state for looping, when looping is used. This command is used immediately after command 0x8.
Index Byte
|
Size
|
Description
|
0x2
|
2
|
CmdID 0x8
|
0xC
|
4
|
s32 value = (s32)(6.7027964E+07f / ((float)samplerate * 1.0f))
|
This sets the sample rate. This command is used immediately after command 0xE.
This command is used for initializing IMA-ADPCM state(when IMA-ADPCM encoding is used), prior to using command 0xE.
Index Byte
|
Size
|
Description
|
0x2
|
2
|
CmdID 0xE
|
0x8
|
4
|
See below.
|
0xC
|
4
|
See below. Usually zero?
|
0x10
|
4
|
See below. Usually zero?
|
0x14
|
4
|
Physical address for the audio data, for the main channel.
|
0x18
|
4
|
Physical address for the audio data, for the second channel. When this address is not 0x0, this is used for stereo audio. Otherwise when 0x0, mono audio is used via the above main address.
|
0x1C
|
4
|
Total byte-size for the audio data.
|
This initializes the CSND channel registers located at: 0x1EC03400 + (channel_index*0x20).
Parameter word 0x8
Bit
|
Description
|
5-0
|
Channel index
|
9-6
|
?
|
11-10
|
1 = enable looping, 2 = disable looping.
|
13-12
|
This sets the encoding, the names for the following encodings are from here. 0 = PCM8 and DSPADPCM, 1 = PCM16, 2 = IMAADPCM.
|
15-14
|
?
|
31-16
|
Sample rate clamped to the following range(by the user process): 0x42-0xFFFF. This is the same value used with Cmd 0x8, except clamped.
|
Parameter word 0xC
Bit
|
Description
|
15-0
|
Unknown, this value is clamped to the following range(by the user process): 0x0-0x8000.
|
31-16
|
Unknown, this value is clamped to the following range(by the user process): 0x0-0x8000.
|
Parameter word 0x10
Bit
|
Description
|
15-0
|
Unknown, this value is clamped to the following range(by the user process): 0x0-0x8000.
|
31-16
|
Unknown, this value is clamped to the following range(by the user process): 0x0-0x8000.
|
Index Byte
|
Size
|
Description
|
0x2
|
2
|
CmdID 0x300
|
0x8
|
0x18
|
Unused, all-zero.
|
CSND module writes state info(including state from CSND registers) for each audio channel to shared-memory for this command.