1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html xmlns="http://www.w3.org/1999/xhtml"> 3<head> 4<meta http-equiv="Content-Type" content="text/html; charset=windows-1252" /> 5<meta http-equiv="Content-Style-Type" content="text/css" /> 6<title>DSP_StartSampling</title> 7<link rel="stylesheet" href="../../css/nitro.css" type="text/css" /> 8</head> 9<body> 10 11<h1>DSP_StartSampling <IMG src="../../image/TWL.gif" align="middle"></H1> 12<H2>Syntax</H2> 13 14<pre><code> 15void DSP_StartSampling(void *buffer, u32 length); 16</code></pre> 17 18<h2>Arguments</h2> 19<table style="width:100%"> 20<tbody> 21<tr> 22<td style="width:13%"><em><strong>buffer</strong></em></td> 23<td style="width:87%">Ring buffer that stores the sampling data.<br />It must be 16-bit aligned.</td> 24</tr> 25<tr> 26<td style="width:13%"><em><strong>len</strong></em></td> 27<td style="width:87%">Size of the ring buffer.<br />It must be an integer in multiples of 16 bits.</td> 28</tr> 29</tbody> 30</table> 31 32<h2>Return Values</h2> 33<p>None.</p> 34 35<h2>Description</h2> 36<p>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.</p> 37<p>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 <code><a href="DSP_SyncSamplingBuffer.html">DSP_SyncSamplingBuffer</a></code> 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 <code><a href="DSP_GetLastSamplingAddress.html">DSP_GetLastSamplingAddress</a></code> function.</p> 38 39<h2>See Also</h2> 40<p><code><a href="DSP_StopSampling.html">DSP_StopSampling</a> <a href="DSP_SyncSamplingBuffer.html">DSP_SyncSamplingBuffer</a> <a href="DSP_GetLastSamplingAddress.html">DSP_GetLastSamplingAddress</a></code></p> 41 42<h2>Revision History</h2> 43<p> 442008/06/13 Initial version. 45</p> 46<hr><p>CONFIDENTIAL</p></body> 47</html> 48