DSP_StartSampling

Syntax


void DSP_StartSampling(void *buffer, u32 length);

Arguments

buffer Ring buffer that stores the sampling data.
It must be 16-bit aligned.
len Size of the ring buffer.
It must be an integer in multiples of 16 bits.

Return Values

None.

Description

Begins automatic sampling of signed 16-bit values using the DSP's internal microphone input circuit. The sampling frequency for the input wave data will depend on the sound circuit's frequency at runtime and may be either 32 or 48 kHz. This function can be used at any time when any of the DSP components have been loaded.

The DSP has a ring buffer that can hold 4,096 monaural samples and will automatically collect samples in the background. As a result, up to 83.3 ms (5 rendering frame cycles) of input wave data can be stored without placing a load on the ARM9. Applications must call the DSP_SyncSamplingBuffer function within this interval to periodically save input wave data from the DSP's internal buffer to the ARM9 ring buffer. You can access the state of the saved sampling data with the DSP_GetLastSamplingAddress function.

See Also

DSP_StopSampling DSP_SyncSamplingBuffer DSP_GetLastSamplingAddress

Revision History

2008/06/13 Initial version.


CONFIDENTIAL