CSND Shared Memory: Difference between revisions
No edit summary |
No edit summary |
||
Line 361: | Line 361: | ||
| 0x14 | | 0x14 | ||
| 4 | | 4 | ||
| Physical address for the audio data | | Physical address for the beginning of the audio data. | ||
|- | |- | ||
| 0x18 | | 0x18 | ||
| 4 | | 4 | ||
| Physical address for the | | 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). | 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 | ||
| ? | | ? | ||
|- | |- | ||
| | | 10 | ||
| | | 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 | ||
| ? | | 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 |