#include <nnsys/snd.h>
BOOL NNS_SndLockChannel( u32 chBitFlag );
Locks specified channel(s). The locked channel will become unusable in the library.
The channel to lock is designated with chBitFlag
. Channel 0, channel 1, channel 2, etc. are displayed in order from the lower bit, and all channels with a bit set are locked at the same time. For example, when locking channel 2 and channel 5, specify (1<<2) | (1<<5), or 0x0024.
If the designated channel is in use by sequence playback, forcibly stopping the currently playing sound will make the lock succeed. The function will fail if there is any attempt to lock a channel that is in use by any other stream playback, etc. When attempting to lock multiple channels, if even one lock fails, all the locks will fail.
Call the NNS_SndUnlockChannel
function to unlock a channel.
There are 16 channels. The features of the channels differ depending on the channel number, as indicated below:
Table: Use of each channel and its functionality
Channel Number | Function |
---|---|
0, 2 | Can playback PCM/ADPCM. Output from these channels can also be used for sound capture input. |
1, 3 | Can playback PCM/ADPCM. Because sound capture and the timer are shared, these channels can be used only for sound capture output when sound capture is used. |
4 ~ 7 | Can playback PCM/ADPCM. These channels are used preferentially when playing back waveform data on sequence playback. |
8 ~ 13 | Can playback PCM/ADPCM and PSG rectangular waveforms. |
14, 15 | Can playback PCM/ADPCM and white noise. |
2004/10/25 Initial version.
CONFIDENTIAL