★ FAQ ★ SGL programming relatedslCDDAOn function → SGL reference manual
However, in order to execute this function, it is necessary to execute the slInitSound function in advance.
If the slSynch function is executed in the loop of the main program, it is possible to switch between stereo and monaural with the above function even during CD-DA playback.
(example)
Uint8 sndctrl;
sndctrl = (* ((volatile Uint8 *) (0x25a00483)));
sndctrl & = 0x7f;
if (stereo) {
sndctrl | = 0x80;
}
(* ((volatile Uint8 *) (0x25a00483))) = (Uint8) sndctrl;
| STEREO | 16 Bit | 1 sound | Number of sound sources used 4 |
| STEREO | 8 Bit | 2 sounds | Number of sound sources used 2 |
| MONORAL | 16 Bit | 2 sounds | Number of sound sources used 2 |
| MONORAL | 8 Bit | 4 sounds | Number of sound sources used 1 |
It will be.
If the number of sound sources used exceeds 4, slPCMOn returns error status -2 (channel over).
Therefore, by combining the types of PCM sounds described above, it is possible to reproduce 1 to 4 PCM data.
--------------------------------------- BGM song data: Sequence data 0 SE song data: Sequence data 1 BGM tone data: Tone bank data 0 SE tone data: Tone bank data 1 Delay effect: DSP program 0 Reverb effect: DSP program 1 : DSP work area ---------------------------------------
Unfortunately, there is no SGL sample program that deals with effects yet.
★ FAQ ★ SGL programming related