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    <style type="text/css"><!--
8      span.static_style
9      {
10        font-size			: 8pt;
11        color				: white;
12        font-weight			: bold;
13        background			: #44f;
14        border-left			: solid 1px #aaf;
15        border-top			: solid 1px #aaf;
16        border-right		: solid 1px #00c;
17        border-bottom		: solid 1px #00c;
18        padding-left		: 2px;
19        padding-right		: 2px;
20      }
21      span.virtual_style
22      {
23        font-size			 : 8pt;
24        color				 : white;
25        font-weight			: bold;
26        background			: #0a0;
27        border-left			: solid 1px #0f0;
28        border-top			: solid 1px #0f0;
29        border-right		: solid 1px #060;
30        border-bottom		: solid 1px #060;
31        padding-left		: 2px;
32        padding-right		: 2px;
33      }
34      span.protected_style
35      {
36        font-size			 : 8pt;
37        color				 : white;
38        font-weight			: bold;
39        background			: #444;
40        border-left			: solid 1px #ccc;
41        border-top			: solid 1px #ccc;
42        border-right		: solid 1px #222;
43        border-bottom		: solid 1px #222;
44        padding-left		: 2px;
45        padding-right		: 2px;
46      }
47        --></style>
48<title>nn::snd::CTR::Voice</title>
49  </head>
50  <body>
51<h1><CODE>nn::snd::CTR::Voice</CODE> Class</h1>
52<h2>Syntax</h2>
53    <div class="section">
54      <pre class="definition">class Voice</pre>
55    </div>
56<h2>Description</h2>
57    <div class="section">
58<p>A class used to control <a href="../../../../nn/snd/CTR/Voice/Overview.html"><CODE>Voice</CODE></a> objects.</p><p>Use this to control valid voice objects obtained with the <CODE>nn::snd::CTR::AllocVoice</CODE> function. Behavior is not guaranteed if you attempt to control any other voice object.
59      </p><p>
60Since not all of the functions that control <CODE>Voice</CODE> objects are thread-safe, exclusive control is necessary using functions like <CODE><a href="../../../../nn/os/CriticalSection/Overview.html">nn::os::CriticalSection</a></CODE> when calling those functions in threads other than threads (sound threads) that are calling the <CODE><a href="../../../../nn/snd/CTR/WaitForDspSync.html">nn::snd::CTR::WaitForDspSync</a></CODE> and <CODE><a href="../../../../nn/snd/CTR/SendParameterToDsp.html">nn::snd::CTR::SendParameterToDsp</a></CODE> functions. However, the <CODE><a href="../../../../nn/snd/CTR/AllocVoice.html">nn::snd::CTR::AllocVoice</a></CODE> and <CODE><a href="../../../../nn/snd/CTR/FreeVoice.html">nn::snd::CTR::FreeVoice</a></CODE> functions are thread-safe and can be called safely outside of sound threads.
61      </p></div>
62    <a name="enum" id="enum">
63<h2>Enumerated Types</h2>
64      <div class="section">
65        <table class="members">
66          <tr>
67            <td width="100"> </td>
68            <th>
69<a href="../../../../nn/snd/CTR/Voice/State.html"><CODE>State</CODE></a>
70            </th>
71<td>Enumerated type that indicates the voice states.</td>
72          </tr> </table>
73      </div>
74    </a> <a name="function" id="function">
75<h2>Member Functions</h2>
76      <div class="section">
77        <table class="members">
78          <tr>
79<th class="category" colspan="3">Adding Buffers</th>
80          </tr>
81          <tr>
82            <td width="100">  </td>
83            <th>
84<a href="../../../../nn/snd/CTR/Voice/AppendWaveBuffer.html"><CODE>AppendWaveBuffer</CODE></a>
85            </th>
86<td>Appends sample data information corresponding to a voice.</td>
87          </tr>
88          <tr>
89<th class="category" colspan="3">Setting Parameters</th>
90          </tr>
91          <tr>
92            <td width="100">  </td>
93            <th>
94<a href="../../../../nn/snd/CTR/Voice/SetChannelCount.html"><CODE>SetChannelCount</CODE></a>
95            </th>
96<td>Sets the number of voice channels.</td>
97          </tr>
98          <tr>
99            <td width="100">  </td>
100            <th>
101<a href="../../../../nn/snd/CTR/Voice/SetSampleFormat.html"><CODE>SetSampleFormat</CODE></a>
102            </th>
103<td>Sets the format of the samples to link to a voice.</td>
104          </tr>
105          <tr>
106            <td width="100">  </td>
107            <th>
108<a href="../../../../nn/snd/CTR/Voice/SetFrontBypassFlag.html"><CODE>SetFrontBypassFlag</CODE></a>
109            </th>
110<td>Sets whether to bypass the front channels when 3D surround sound is enabled.</td>
111          </tr>
112          <tr>
113            <td width="100">  </td>
114            <th>
115<a href="../../../../nn/snd/CTR/Voice/SetStartFrameFadeInFlag.html"><CODE>SetStartFrameFadeInFlag</CODE></a>
116            </th>
117<td>Specifies whether to use a short fade-in starting at volume 0 when playback starts.</td>
118          </tr>
119          <tr>
120            <td width="100">  </td>
121            <th>
122<a href="../../../../nn/snd/CTR/Voice/SetSampleRate.html"><CODE>SetSampleRate</CODE></a>
123            </th>
124<td>Sets the sampling rate of a voice.</td>
125          </tr>
126          <tr>
127            <td width="100">  </td>
128            <th>
129<a href="../../../../nn/snd/CTR/Voice/SetPitch.html"><CODE>SetPitch</CODE></a>
130            </th>
131<td>Sets the pitch of a voice.</td>
132          </tr>
133          <tr>
134            <td width="100">  </td>
135            <th>
136<a href="../../../../nn/snd/CTR/Voice/SetAdpcmParam.html"><CODE>SetAdpcmParam</CODE></a>
137            </th>
138<td>Sets ADPCM coefficients.</td>
139          </tr>
140          <tr>
141            <td width="100">  </td>
142            <th>
143<a href="../../../../nn/snd/CTR/Voice/SetPriority.html"><CODE>SetPriority</CODE></a>
144            </th>
145<td>Sets the priority of a voice.</td>
146          </tr>
147          <tr>
148            <td width="100">  </td>
149            <th>
150<a href="../../../../nn/snd/CTR/Voice/SetState.html"><CODE>SetState</CODE></a>
151            </th>
152<td>Sets the current state of a voice.</td>
153          </tr>
154          <tr>
155            <td width="100">  </td>
156            <th>
157<a href="../../../../nn/snd/CTR/Voice/SetMixParam.html"><CODE>SetMixParam</CODE></a>
158            </th>
159<td>Sets the gain for each voice channel.</td>
160          </tr>
161          <tr>
162            <td width="100">  </td>
163            <th>
164<a href="../../../../nn/snd/CTR/Voice/SetVolume.html"><CODE>SetVolume</CODE></a>
165            </th>
166<td>Sets the volume of a voice.</td>
167          </tr>
168          <tr>
169            <td width="100">  </td>
170            <th>
171<a href="../../../../nn/snd/CTR/Voice/SetInterpolationType.html"><CODE>SetInterpolationType</CODE></a>
172            </th>
173<td>Sets the interpolation method of a voice.</td>
174          </tr>
175          <tr>
176            <td width="100">  </td>
177            <th>
178<a href="../../../../nn/snd/CTR/Voice/SetFilterType.html"><CODE>SetFilterType</CODE></a>
179            </th>
180<td>Sets the filter type.</td>
181          </tr>
182          <tr>
183            <td width="100">  </td>
184            <th>
185<a href="../../../../nn/snd/CTR/Voice/EnableMonoFilter.html">EnableMonoFilter</a>
186            </th>
187<td>Enables/disables the monopole filter.</td>
188          </tr>
189          <tr>
190            <td width="100">  </td>
191            <th>
192<a href="../../../../nn/snd/CTR/Voice/SetMonoFilterCoefficients.html"><CODE>SetMonoFilterCoefficients</CODE></a>
193            </th>
194<td>Sets the coefficients for a monopole filter.</td>
195          </tr>
196          <tr>
197            <td width="100">  </td>
198            <th>
199<a href="../../../../nn/snd/CTR/Voice/EnableBiquadFilter.html">EnableBiquadFilter</a>
200            </th>
201<td>Enables/disables the biquad filter.</td>
202          </tr>
203          <tr>
204            <td width="100">  </td>
205            <th>
206<a href="../../../../nn/snd/CTR/Voice/SetBiquadFilterCoefficients.html"><CODE>SetBiquadFilterCoefficients</CODE></a>
207            </th>
208<td>Sets the coefficients for a biquad filter.</td>
209          </tr>
210          <tr>
211<th class="category" colspan="3">Get parameters</th>
212          </tr>
213          <tr>
214            <td width="100">  </td>
215            <th>
216<a href="../../../../nn/snd/CTR/Voice/GetPitch.html"><CODE>GetPitch</CODE></a>
217            </th>
218<td>Gets the pitch of a voice.</td>
219          </tr>
220          <tr>
221            <td width="100">  </td>
222            <th>
223<a href="../../../../nn/snd/CTR/Voice/GetPriority.html"><CODE>GetPriority</CODE></a>
224            </th>
225<td>Gets the priority of a voice.</td>
226          </tr>
227          <tr>
228            <td width="100">  </td>
229            <th>
230<a href="../../../../nn/snd/CTR/Voice/GetState.html"><CODE>GetState</CODE></a>
231            </th>
232<td>Gets the state of a voice.</td>
233          </tr>
234          <tr>
235            <td width="100">  </td>
236            <th>
237<a href="../../../../nn/snd/CTR/Voice/GetMixParam.html"><CODE>GetMixParam</CODE></a>
238            </th>
239<td>Gets the gain for each voice channel.</td>
240          </tr>
241          <tr>
242            <td width="100">  </td>
243            <th>
244<a href="../../../../nn/snd/CTR/Voice/GetVolume.html"><CODE>GetVolume</CODE></a>
245            </th>
246<td>Gets the volume of a voice.</td>
247          </tr>
248          <tr>
249            <td width="100">  </td>
250            <th>
251<a href="../../../../nn/snd/CTR/Voice/GetInterpolationType.html"><CODE>GetInterpolationType</CODE></a>
252            </th>
253<td>Gets the interpolation method of a voice.</td>
254          </tr>
255          <tr>
256            <td width="100">  </td>
257            <th>
258<a href="../../../../nn/snd/CTR/Voice/GetFilterType.html"><CODE>GetFilterType</CODE></a>
259            </th>
260<td>Gets the usage status of a filter.</td>
261          </tr>
262          <tr>
263            <td width="100">  </td>
264            <th>
265<a href="../../../../nn/snd/CTR/Voice/GetMonoFilterCoefficients.html"><CODE>GetMonoFilterCoefficients</CODE></a>
266            </th>
267<td>Gets the coefficients for a monopole filter.</td>
268          </tr>
269          <tr>
270            <td width="100">  </td>
271            <th>
272<a href="../../../../nn/snd/CTR/Voice/GetBiquadFilterCoefficients.html"><CODE>GetBiquadFilterCoefficients</CODE></a>
273            </th>
274<td>Gets the coefficients for a biquad filter.</td>
275          </tr>
276          <tr>
277<th class="category" colspan="3">Getting the Playback Status</th>
278          </tr>
279          <tr>
280            <td width="100">  </td>
281            <th>
282<a href="../../../../nn/snd/CTR/Voice/GetPlayPosition.html"><CODE>GetPlayPosition</CODE></a>
283            </th>
284<td>Gets the playback position within the buffer that is currently in use.</td>
285          </tr>
286          <tr>
287            <td width="100">  </td>
288            <th>
289<a href="../../../../nn/snd/CTR/Voice/IsPlaying.html"><CODE>IsPlaying</CODE></a>
290            </th>
291<td>Gets the playback state of a voice.</td>
292          </tr>
293          <tr>
294<th class="category" colspan="3">Bcwav-related</th>
295          </tr>
296          <tr>
297            <td width="100">  </td>
298            <th>
299<a href="../../../../nn/snd/CTR/Voice/SetupBcwav.html"><CODE>SetupBcwav</CODE></a>
300            </th>
301<td>Parses a <a href="../../../../nn/snd/CTR/Bcwav/Overview.html">BCWAV</a> file and prepares for playback.</td>
302          </tr> </table>
303      </div>
304    </a>
305<h2>Revision History</h2>
306    <div class="section">
307      <dl class="history">
308        <dt>2010/10/21</dt>
309<dd>Added information related to thread safety.
310        </dd>
311        <dt>2010/01/29</dt>
312<dd>Initial version.<br />
313        </dd>
314      </dl>
315    </div>
316  <hr><p>CONFIDENTIAL</p></body>
317</html>
318