slCDDAOn function → SGL Reference Manual
However, in order to execute this function, you must first execute the slInitSound function.
If you execute the slSynch function in the main program loop, you can use the above function to switch between stereo and monaural while playing a CD-DA.
Change the stereo/mono bits of the sound driver.
Be sure to perform this setting after configuring the sound driver.
(example)
Uint8 sndctrl; sndctrl = (*((volatile Uint8 *)(0x25a00483))); sndctrl &= 0x7f; if (stereo) { sndctrl |= 0x80; } (*((volatile Uint8 *)(0x25a00483))) = (Uint8)sndctrl;
STEREO | 16 Bit | 1 note | 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 becomes.
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 play PCM data of 1 to 4 sounds.
--------------------------------------- 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 ---------------------------------------
First, for the "effect number" specified with "slSndEffect(Effect)", if there is only one effect, always specify "0", and if there are multiple effects, if you want to apply the above reverb, specify "1" from the above map information. To do.
Next, use "slSndMixChange(Tbank,Mixno)" to determine the target to apply the effect to. If you want to apply an effect to the BGM, specify 0 for "Tone bank number". Also, if there are multiple mixers that specify the return level and pan from the effect, set the ``mixer number'' of the parameter you want to use. The details of this mixer are also information that we receive from the production side.
Finally, "slSndMixParmChange(Effect,Level,Pan)" is used when you want to change the effect effect from the initial settings on the program side. For example, if you want to reduce the reverb effect, specify the effect you want to change in the ``DSP Effect Output Channel'' (again, get channel allocation information from the production side) and lower the ``Effect Return Level.''
"slDSPOff()" issues a command to stop and initialize the sound DSP itself, and is a function that must be executed for sound initialization and termination processing when working with effects.
Unfortunately, there are no SGL sample programs that handle effects yet.