#include <nnsys/snd.h>BOOL NNS_SndStrmAllocChannel( NNSSndStrm* stream, int numChannels, const u8 chNoList[] );
stream |
Pointer to a stream structure. |
numChannels |
The number of channels to allocate. Takes a value between 1 and 16. |
chNoList[] |
An array of channel numbers. |
This function allocates the channels that are used when a stream is played. Before playing a stream, you must use this function to allocate channels.
The channel number array chNoList[] must contain as many elements as the number of channels, numChannels. Each element specifies a channel number. Although you can specify channel numbers from 0 - 15, different channel numbers are used for different features. Therefore you must consider cooperation with other uses when specifying. For example, the channel number 14 or 15 may not be the best choice if noise is going to be used for the sequence playback.
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. |
To free an allocated channel, call NNS_SndStrmFreeChannel.
08/10/2004 Initial version.
CONFIDENTIAL