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