#include <nitro/snd.h>
void SND_SetChannelTimer( u32 chBitMask, int timer );
chBitMask |
The channel bit mask. It specifies which channels to control. |
timer |
The timer. Takes a value between 0x10 and 0xffff. |
Changes the channel timer.
The channel bit mask chBitMask
specifies which channels to control. The channels are represented in order, with the lowest bit representing channel 0. Only channels whose representative bits are standing are controlled.
timer
specifies the number of clock ticks for outputting one sample. The number of ticks per second is approximately 16.757 MHz with SND_TIMER_CLOCK
. Thus, if you want to play the waveform data without changing the pitch and the sampling rate is rate
Hz, then you calculate timer
as follows:
timer
= SND_TIMER_CLOCK /rate
This function is an ARM7 reserved function. After this function is called, processing occurs only after the command is issued with the SND_FlushCommand
function.
When it is necessary to synchronize something with the completion of the process, first use SND_GetCurrentCommandTag
to obtain the command tag immediately after calling this function. After the command is issued, use the command tag and call either the SND_IsFinishedCommandTag
or SND_WaitForCommandProc
function to confirm that the process has finished or to wait for it to complete.
SND_FlushCommand, SND_GetCurrentCommandTag, SND_IsFinishedCommandTag, SND_WaitForCommandProc
02/17/2005 Added a note about ARM7 command processing
07/20/2004 Initial version