#include <nitro/snd.h>
void SND_SetupCapture( SNDCapture capture, SNDCaptureFormat format, void* buffer_p, u32 length, BOOL loopFlag, SNDCaptureIn in, SNDCaptureOut out );
capture |
The capture identifier. |
format |
The format of the capture data |
buffer_p |
Starting address of the capture buffer. Must have 4-byte alignment. |
length |
The length of the capture buffer. Expressed in units of words. Takes a value of 0 to 0xffff. |
loopFlag |
The loop flag. |
in |
The capture input. |
out |
The capture output. |
This function conducts the setup for captures.
The capture frequency is set by the timer of the corresponding channel. The corresponding channel is locked by the SND_LockChannel
function and then the timer is set by the SND_SetChannelTimer
function. Start the capture using the SND_StartTimer
function
Select from among the following values for the capture identifier capture
:
Table. SNDCapture
Label | Description |
---|---|
SND_CAPTURE_0 | Capture 0. This captures the output from the L mixer or channel 0. The timer is shared with channel 1. |
SND_CAPTURE_1 | Capture 1. This captures the output from the R mixer or channel 2. The timer is shared with channel 3. |
Select from among the following values for the capture data format format
:
Table. SNDCaptureFormat
Label | Description |
---|---|
SND_CAPTURE_FORMAT_PCM8 | 8-bit PCM |
SND_CAPTURE_FORMAT_PCM16 | 16-bit PCM |
The capture buffer's starting address buffer_p
must have 4-byte alignment.
The capture buffer length length
is specified in units of words.
If the loop flag loopFlag
is set to TRUE, the capture will continue again from the start of the buffer when the end of the buffer is reached during the capture. If loopFlag
is set to FALSE, the capture will halt automatically when the capture reaches the end of the capture buffer.
Select from among the following values for the capture input in
:
Table. SNDCaptureIn
Label | Description |
---|---|
SND_CAPTURE_IN_MIXER | Captures output from the L mixer or the R mixer. |
SND_CAPTURE_IN_CHANNEL | Captures the output from the channel adder. |
Select from among the following values for the capture output out
:
Table. SNDCaptureOut
Label | Description |
---|---|
SND_CAPTURE_OUT_NORMAL | Send channel 1 or channel 3 to normal output. |
SND_CAPTURE_OUT_CHANNEL_MIX | Sends channel 1 output or channel 3 output to the respective channel adder. (It is also sent for normal output.j |
There is a problem with the logic for capturing the channel adder output. The capture cannot be done correctly. For details, see the "NITRO Programming Manual."
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_LockChannel, SND_SetChannelTimer, SND_StartTimer, SND_FlushCommand, SND_GetCurrentCommandTag, SND_IsFinishedCommandTag, SND_WaitForCommandProc
06/13/2005 Fixes in conjunction with revisions to NITRO Programming Manual.
02/17/2005 Added cautions about ARM7 command processing.
01/06/2005 Deleted statement about TEG.
07/20/2004 Initial version