Line 280:
Line 280:
This command is used for initializing IMA-ADPCM state(when IMA-ADPCM encoding is used), prior to using command 0xE. [[CSND]] <nowiki>channelslotregister+0x18 = (u16)cmdword[3] | ((cmdword[4] & 0xFF)<<16)</nowiki>. [[CSND]] channelslotregister+0x1C = 0.
This command is used for initializing IMA-ADPCM state(when IMA-ADPCM encoding is used), prior to using command 0xE. [[CSND]] <nowiki>channelslotregister+0x18 = (u16)cmdword[3] | ((cmdword[4] & 0xFF)<<16)</nowiki>. [[CSND]] channelslotregister+0x1C = 0.
+
+
=Command 0xC=
+
{| class="wikitable" border="1"
+
|-
+
! Index Byte
+
! Size
+
! Description
+
|-
+
| 0x2
+
| 2
+
| CmdID 0xB
+
|-
+
| 0xC
+
| 2
+
| User processes set this to: [https://github.com/3dshax/ctr/blob/master/ctrtool/cwav.h cwav_imaadpcminfo.loopdata]
+
|-
+
| 0x10
+
| 1
+
| User processes set this to: [https://github.com/3dshax/ctr/blob/master/ctrtool/cwav.h cwav_imaadpcminfo.looptableindex]
+
|-
+
| 0x11
+
| 0xF
+
| Unused, all-zero.
+
|}
+
+
This is used for initializing looping state for IMA-ADPCM encoding. <nowiki>channelslotregister+0x18 = (1<<31) | (u16)cmdword[3] | ((cmdword[4] & 0xFF)<<16)</nowiki>.
=Command 0xE=
=Command 0xE=