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 />
61      <table class="arguments">
62        <thead>
63          <tr>
64<th>Value</th>
65<td>Description</td>
66          </tr>
67        </thead>
68        <tr>
69<th><CODE>ResultSuccess</CODE></th>
70<td>Process succeeded.</td>
71        </tr>
72        <tr>
73<th><CODE>ResultNotInitialized</CODE></th>
74<td>The memory region has not been allocated.</td>
75        </tr>
76        <tr>
77<th><CODE>ResultMisalignedSize</CODE></th>
78<td>The specified <SPAN class="argument">offset</SPAN> or <SPAN class="argument">size</SPAN> is not a multiple of 2.</td>
79        </tr>
80        <tr>
81<th><CODE>ResultOutOfMemory</CODE></th>
82<td>The sum of the specified <SPAN class="argument">offset</SPAN> and <SPAN class="argument">size</SPAN> is larger than the allocated memory region.</td>
83        </tr>
84        <tr>
85<th><CODE>ResultShellClose</CODE></th>
86<td>Cannot start sampling because the system is closed.</td>
87        </tr>
88      </table> </div>
89<h2>Description</h2>
90    <div class="section">
91<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>
92<h2>Revision History</h2>
93    <div class="section">
94      <dl class="history">
95        <dt>2010/12/18</dt>
96<dd>Revised the description of the return values.
97        </dd>
98        <dt>2010/06/23</dt>
99<dd>Added that <CODE>GetSamplingBufferSize</CODE> should be used to specify <SPAN class="argument">size</SPAN>.<br />
100        </dd>
101        <dt>2010/01/07</dt>
102<dd>Initial version.<br />
103        </dd>
104      </dl>
105    </div>
106  <hr><p>CONFIDENTIAL</p></body>
107</html>