NNS_SndPlayerSetTrackAllocatableChannel

Syntax

#include <nnsys/snd.h>
void NNS_SndPlayerSetTrackAllocatableChannel(
        NNSSndHandle* handle,
        u16 trackBitMask,
        u32 chBitFlag );

Arguments

handle The sound handle pointer.
trackBitMask This is the track bit mask.
chBitFlag This is an allocatable channel bit flag.

Return Values

None.

Description

Updates the allocatable channels of the sequence track.

Changes the allocable channel of a sequence bound to the sound handle, handle. This function does not perform any action if the sound handle is invalid.

Use trackBitMask to specify the tracks to be set. Indicates tracks 0, 1, 2, and so on in the order from the lowest bit, and changes the allocable channel for all tracks with active bits. For example, if you want to change the allocable channels for tracks 2 and 5, designate trackBitMask to be (1<<2)|(1<<5), or 0x0024.

chBitFlag configures the allocatable channels with a bit flag. It represents channel 0, channel 1, channel 2 in order from the lowest bit, and only allows for allocation from channels that have active bits. If the value is 0, none of the channels can be allocated.

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 Features
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.

Note

Calling this function will overwrite the value configured with the NNS_SndPlayerSetAllocatableChannel function.

See Also

NNS_SndPlayerSetAllocatableChannel

Revision History

2007/10/30 Corrected a mistake.
2005/11/07 Corrected explanation of the channel bit flag when the value is 0.
2005/01/05 Initial version.


CONFIDENTIAL