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><a href="../../../../nn/Overview.html">nn</a>::<a href="../../../../nn/snd/Overview.html">snd</a>::<a href="../../../../nn/snd/CTR/Overview.html">CTR</a>::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 <a href="../../../../nn/snd/CTR/AllocVoice.html"><CODE>nn::snd::CTR::AllocVoice</CODE></a> 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">Buffer Operations</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 <td width="100"> </td> 90 <th> 91<a href="../../../../nn/snd/CTR/Voice/DeleteWaveBuffer.html">DeleteWaveBuffer</a> 92 </th> 93<td>Deletes buffer information appended to a voice.</td> 94 </tr> 95 <tr> 96 <td width="100"> </td> 97 <th> 98<a href="../../../../nn/snd/CTR/Voice/UpdateWaveBuffer.html"><CODE>UpdateWaveBuffer</CODE></a> 99 </th> 100<td>This updates buffer information appended to a voice.</td> 101 </tr> 102 <tr> 103<th class="category" colspan="3">Setting Parameters</th> 104 </tr> 105 <tr> 106 <td width="100"> </td> 107 <th> 108<a href="../../../../nn/snd/CTR/Voice/SetChannelCount.html"><CODE>SetChannelCount</CODE></a> 109 </th> 110<td>Sets the number of voice channels.</td> 111 </tr> 112 <tr> 113 <td width="100"> </td> 114 <th> 115<a href="../../../../nn/snd/CTR/Voice/SetSampleFormat.html"><CODE>SetSampleFormat</CODE></a> 116 </th> 117<td>Sets the format of the samples to link to a voice.</td> 118 </tr> 119 <tr> 120 <td width="100"> </td> 121 <th> 122<a href="../../../../nn/snd/CTR/Voice/SetFrontBypassFlag.html"><CODE>SetFrontBypassFlag</CODE></a> 123 </th> 124<td>Sets whether to bypass the front channels when 3D surround sound is enabled.</td> 125 </tr> 126 <tr> 127 <td width="100"> </td> 128 <th> 129<a href="../../../../nn/snd/CTR/Voice/SetStartFrameFadeInFlag.html"><CODE>SetStartFrameFadeInFlag</CODE></a> 130 </th> 131<td>Specifies whether to use a short fade-in starting at volume 0 when playback starts.</td> 132 </tr> 133 <tr> 134 <td width="100"> </td> 135 <th> 136<a href="../../../../nn/snd/CTR/Voice/SetSampleRate.html"><CODE>SetSampleRate</CODE></a> 137 </th> 138<td>Sets the sampling rate of a voice.</td> 139 </tr> 140 <tr> 141 <td width="100"> </td> 142 <th> 143<a href="../../../../nn/snd/CTR/Voice/SetPitch.html"><CODE>SetPitch</CODE></a> 144 </th> 145<td>Sets the pitch of a voice.</td> 146 </tr> 147 <tr> 148 <td width="100"> </td> 149 <th> 150<a href="../../../../nn/snd/CTR/Voice/SetAdpcmParam.html"><CODE>SetAdpcmParam</CODE></a> 151 </th> 152<td>Sets ADPCM coefficients.</td> 153 </tr> 154 <tr> 155 <td width="100"> </td> 156 <th> 157<a href="../../../../nn/snd/CTR/Voice/SetPriority.html"><CODE>SetPriority</CODE></a> 158 </th> 159<td>Sets the priority of a voice.</td> 160 </tr> 161 <tr> 162 <td width="100"> </td> 163 <th> 164<a href="../../../../nn/snd/CTR/Voice/SetState.html"><CODE>SetState</CODE></a> 165 </th> 166<td>Sets the current state of a voice.</td> 167 </tr> 168 <tr> 169 <td width="100"> </td> 170 <th> 171<a href="../../../../nn/snd/CTR/Voice/SetMixParam.html"><CODE>SetMixParam</CODE></a> 172 </th> 173<td>Sets the gain for each voice channel.</td> 174 </tr> 175 <tr> 176 <td width="100"> </td> 177 <th> 178<a href="../../../../nn/snd/CTR/Voice/SetVolume.html"><CODE>SetVolume</CODE></a> 179 </th> 180<td>Sets the volume of a voice.</td> 181 </tr> 182 <tr> 183 <td width="100"> </td> 184 <th> 185<a href="../../../../nn/snd/CTR/Voice/SetInterpolationType.html"><CODE>SetInterpolationType</CODE></a> 186 </th> 187<td>Sets the interpolation method of a voice.</td> 188 </tr> 189 <tr> 190 <td width="100"> </td> 191 <th> 192<a href="../../../../nn/snd/CTR/Voice/SetFilterType.html"><CODE>SetFilterType</CODE></a> 193 </th> 194<td>Sets the filter type.</td> 195 </tr> 196 <tr> 197 <td width="100"> </td> 198 <th> 199<a href="../../../../nn/snd/CTR/Voice/EnableMonoFilter.html"><CODE>EnableMonoFilter</CODE></a> 200 </th> 201<td>Enables/disables the monopole filter.</td> 202 </tr> 203 <tr> 204 <td width="100"> </td> 205 <th> 206<a href="../../../../nn/snd/CTR/Voice/SetMonoFilterCoefficients.html"><CODE>SetMonoFilterCoefficients</CODE></a> 207 </th> 208<td>Sets the coefficients for a monopole filter.</td> 209 </tr> 210 <tr> 211 <td width="100"> </td> 212 <th> 213<a href="../../../../nn/snd/CTR/Voice/EnableBiquadFilter.html"><CODE>EnableBiquadFilter</CODE></a> 214 </th> 215<td>Enables/disables the biquad filter.</td> 216 </tr> 217 <tr> 218 <td width="100"> </td> 219 <th> 220<a href="../../../../nn/snd/CTR/Voice/SetBiquadFilterCoefficients.html"><CODE>SetBiquadFilterCoefficients</CODE></a> 221 </th> 222<td>Sets the coefficients for a biquad filter.</td> 223 </tr> 224 <tr> 225<th class="category" colspan="3">Get parameters</th> 226 </tr> 227 <tr> 228 <td width="100"> </td> 229 <th> 230<a href="../../../../nn/snd/CTR/Voice/GetPitch.html"><CODE>GetPitch</CODE></a> 231 </th> 232<td>Gets the pitch of a voice.</td> 233 </tr> 234 <tr> 235 <td width="100"> </td> 236 <th> 237<a href="../../../../nn/snd/CTR/Voice/GetPriority.html"><CODE>GetPriority</CODE></a> 238 </th> 239<td>Gets the priority of a voice.</td> 240 </tr> 241 <tr> 242 <td width="100"> </td> 243 <th> 244<a href="../../../../nn/snd/CTR/Voice/GetState.html"><CODE>GetState</CODE></a> 245 </th> 246<td>Gets the state of a voice.</td> 247 </tr> 248 <tr> 249 <td width="100"> </td> 250 <th> 251<a href="../../../../nn/snd/CTR/Voice/GetMixParam.html"><CODE>GetMixParam</CODE></a> 252 </th> 253<td>Gets the gain for each voice channel.</td> 254 </tr> 255 <tr> 256 <td width="100"> </td> 257 <th> 258<a href="../../../../nn/snd/CTR/Voice/GetVolume.html"><CODE>GetVolume</CODE></a> 259 </th> 260<td>Gets the volume of a voice.</td> 261 </tr> 262 <tr> 263 <td width="100"> </td> 264 <th> 265<a href="../../../../nn/snd/CTR/Voice/GetInterpolationType.html"><CODE>GetInterpolationType</CODE></a> 266 </th> 267<td>Gets the interpolation method of a voice.</td> 268 </tr> 269 <tr> 270 <td width="100"> </td> 271 <th> 272<a href="../../../../nn/snd/CTR/Voice/GetFilterType.html"><CODE>GetFilterType</CODE></a> 273 </th> 274<td>Gets the usage status of a filter.</td> 275 </tr> 276 <tr> 277 <td width="100"> </td> 278 <th> 279<a href="../../../../nn/snd/CTR/Voice/GetMonoFilterCoefficients.html"><CODE>GetMonoFilterCoefficients</CODE></a> 280 </th> 281<td>Gets the coefficients for a monopole filter.</td> 282 </tr> 283 <tr> 284 <td width="100"> </td> 285 <th> 286<a href="../../../../nn/snd/CTR/Voice/GetBiquadFilterCoefficients.html"><CODE>GetBiquadFilterCoefficients</CODE></a> 287 </th> 288<td>Gets the coefficients for a biquad filter.</td> 289 </tr> 290 <tr> 291<th class="category" colspan="3">Getting the Playback Status</th> 292 </tr> 293 <tr> 294 <td width="100"> </td> 295 <th> 296<a href="../../../../nn/snd/CTR/Voice/GetPlayPosition.html"><CODE>GetPlayPosition</CODE></a> 297 </th> 298<td>Gets the playback position within the buffer that is currently in use.</td> 299 </tr> 300 <tr> 301 <td width="100"> </td> 302 <th> 303<a href="../../../../nn/snd/CTR/Voice/IsPlaying.html"><CODE>IsPlaying</CODE></a> 304 </th> 305<td>Gets the playback state of a voice.</td> 306 </tr> 307 <tr> 308<th class="category" colspan="3">Bcwav-related</th> 309 </tr> 310 <tr> 311 <td width="100"> </td> 312 <th> 313<a href="../../../../nn/snd/CTR/Voice/SetupBcwav.html"><CODE>SetupBcwav</CODE></a> 314 </th> 315<td>Parses a <a href="../../../../nn/snd/CTR/Bcwav/Overview.html">BCWAV</a> file and prepares for playback.</td> 316 </tr> </table> 317 </div> 318 </a> 319<h2>Revision History</h2> 320 <div class="section"> 321 <dl class="history"> 322 <dt>2011/06/06</dt> 323<dd>Added <CODE><a href="../../../../nn/snd/CTR/Voice/DeleteWaveBuffer.html">nn::snd::CTR::Voice::DeleteWaveBuffer</a></CODE> and <CODE><a href="../../../../nn/snd/CTR/Voice/UpdateWaveBuffer.html">nn::snd::CTR::Voice::UpdateWaveBuffer</a></CODE>.<br /> 324 </dd> 325 <dt>2011/05/26</dt> 326<dd>Removed from public release those arguments that are pointers from the functions <CODE><a href="../../../../nn/snd/CTR/Voice/SetMonoFilterCoefficients.html">nn::snd::CTR::Voice::SetMonoFilterCoefficients</a></CODE>, <CODE><a href="../../../../nn/snd/CTR/Voice/SetBiquadFilterCoefficients.html">nn::snd::CTR::Voice::SetBiquadFilterCoefficients</a></CODE>, <CODE><a href="../../../../nn/snd/CTR/Voice/GetMonoFilterCoefficients.html">nn::snd::CTR::Voice::GetMonoFilterCoefficients</a></CODE> and <CODE><a href="../../../../nn/snd/CTR/Voice/GetBiquadFilterCoefficients.html">nn::snd::CTR::Voice::GetBiquadFilterCoefficients</a></CODE>. 327 </dd> 328 <dt>2010/10/21</dt> 329<dd>Added information related to thread safety. 330 </dd> 331 <dt>2010/01/29</dt> 332<dd>Initial version.<br /> 333 </dd> 334 </dl> 335 </div> 336 <hr><p>CONFIDENTIAL</p></body> 337</html> 338