1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xml:lang="en-US" lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
3  <head>
4    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5    <meta http-equiv="Content-Style-Type" content="text/css" />
6    <link rel="stylesheet" href="../../../css/manpage.css" type="text/css" />
7<title>StartSampling</title>
8  </head>
9  <body>
10<h1><CODE>nn::mic::CTR::StartSampling</CODE> Function</h1>
11<h2>Syntax</h2>
12    <div class="section">
13      <pre class="definition">
14<a href="../../../nn/Result/Overview.html">Result</a> StartSampling(
15     <a href="../../../nn/mic/CTR/SamplingType.html">SamplingType</a> type,
16     <a href="../../../nn/mic/CTR/SamplingRate.html">SamplingRate</a> rate,
17     s32                 offset,
18     size_t size,
19     bool loop
20);
21</pre>
22    </div>
23<h2>Arguments</h2>
24    <div class="section">
25      <table class="arguments">
26        <thead>
27          <tr>
28            <td width="15" />
29<th>Name</th>
30<td>Description</td>
31          </tr>
32        </thead>
33        <tr>
34<td>in</td>
35<th>type</th>
36<td>Specifies the sampling type.</td>
37        </tr>
38        <tr>
39<td>in</td>
40<th>rate</th>
41<td>Specifies the sampling frequency.</td>
42        </tr>
43        <tr>
44<td>in</td>
45<th>offset</th>
46<td>Position from the start of the memory region where the first of the sampling results are stored. You must specify a position (in bytes) that is a multiple of two.</td>
47        </tr>
48        <tr>
49<td>in</td>
50<th>size</th>
51<td>The size within the memory region where the sampling results will be stored. Specify a size less than or equal to the value obtained using <CODE><a href="../../../nn/mic/CTR/GetSamplingBufferSize.html">nn::mic::CTR::GetSamplingBufferSize</a></CODE>.<br />You must specify a size that is a multiple of two.</td>
52        </tr>
53        <tr>
54<td>in</td>
55<th>loop</th>
56<td>Flag that specifies whether or not to reuse (loop through) the memory region after sampling <SPAN class="argument">size</SPAN> bytes.<br />If <CODE>true</CODE>, sampling continues and loops through the region. After <SPAN class="argument">size</SPAN> bytes have been sampled, sampling loops back to the <SPAN class="argument">offset</SPAN> position and there continues from where it left off.<br />If <CODE>false</CODE>, sampling stops automatically after <SPAN class="argument">size</SPAN> bytes have been sampled.</td>
57        </tr> </table>
58    </div>
59<h2>Return Values</h2>
60<div class="section">Returns the result of the operation.<br /><CODE>LEVEL_SUCCESS:SUMMARY_SUCCESS:MODULE_COMMON:DESCRIPTION_SUCCESS</CODE>: Success.<br /><CODE>LEVEL_PERMANENT:SUMMARY_NOTHING_HAPPENED:MODULE_NN_MIC:DESCRIPTION_NOT_INITIALIZED</CODE>: The memory region has not been allocated.<br /><CODE>LEVEL_USAGE:SUMMARY_NOTHING_HAPPENED:MODULE_NN_MIC:DESCRIPTION_MISALIGNED_SIZE</CODE>: The <SPAN class="argument">offset</SPAN> or <SPAN class="argument">size</SPAN> value specified is not a multiple of two. <CODE>LEVEL_USAGE:SUMMARY_NOTHING_HAPPENED:MODULE_NN_MIC:DESCRIPTION_OUT_OF_MEMORY </CODE>: The sum of the specified offset and size values exceeds the size of the memory region that has been allocated. </div>
61<h2>Description</h2>
62    <div class="section">
63<p>Starts microphone auto-sampling.</p><p>If microphone auto-sampling has already been started, this function stops the active sampling session and starts a new one.</p><!-- write here --></div>
64<h2>Revision History</h2>
65    <div class="section">
66      <dl class="history">
67        <dt>2010/06/23</dt>
68<dd>Added that <CODE>GetSamplingBufferSize</CODE> should be used to specify <SPAN class="argument">size</SPAN>.<br />
69        </dd>
70        <dt>2010/01/07</dt>
71<dd>Initial version.<br />
72        </dd>
73      </dl>
74    </div>
75  <hr><p>CONFIDENTIAL</p></body>
76</html>