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</title> 49 </head> 50 <body> 51<h1><CODE>nn::snd::CTR</CODE> Namespace</h1> 52<h2>Description</h2> 53 <div class="section"> 54<p>Sound (SND) namespace. (This can also be written with "<CODE>CTR</CODE>" omitted.)</p><p> 55Sound processing is carried out while synchronizing with the DSP by sound threads that include the <a href="../../../nn/snd/CTR/WaitForDspSync.html"><CODE>nn::snd::CTR::WaitForDspSync</CODE></a> and <a href="../../../nn/snd/CTR/SendParameterToDsp.html"><CODE>nn::snd::CTR::SendParameterToDsp</CODE></a> functions. Sound operations and parameter settings are made after using the <a href="../../../nn/snd/CTR/WaitForDspSync.html"><CODE>nn::snd::CTR::WaitForDspSync</CODE></a> function to wait for an interrupt from the DSP that is generated approximately every 4.889 milliseconds, and then applying those operations and parameter settings to the DSP using the <a href="../../../nn/snd/CTR/SendParameterToDsp.html"><CODE>nn::snd::CTR::SendParameterToDsp</CODE></a> function. <a href="../../../nn/snd/CTR/WaitForDspSync.html">The <a href="../../../nn/snd/CTR/WaitForDspSync.html"><CODE>nn::snd::CTR::WaitForDspSync</CODE></a> and <a href="../../../nn/snd/CTR/SendParameterToDsp.html"><CODE>nn::snd::CTR::SendParameterToDsp</CODE></a> functions must be called alternately. 56 </p><p> 57The snd library uses an <a href="../../../nn/os/Event/Overview.html">nn::os::Event</a> object held internally to perform the above synchronization. 58</p><p>The <a href="../../../nn/dsp/CTR/Initialize.html"><CODE>nn::dsp::CTR::Initialize</CODE></a> function and functions for loading DSP components (such as the <a href="../../../nn/dsp/CTR/LoadDefaultComponent.html"><CODE>nn::dsp::CTR::LoadDefaultComponent</CODE></a> function), must be called before the <a href="../../../nn/snd/CTR/Initialize.html"><CODE>nn::snd::CTR::Initialize</CODE></a> function. 59 </p></div> 60 <a name="class" id="class"> 61<h2>Classes</h2> 62 <div class="section"> 63 <table class="members"> 64 <tr> 65 <th> 66<a href="../../../nn/snd/CTR/Bcwav/Overview.html"><CODE>nn::snd::CTR::Bcwav</CODE></a> 67 </th> 68<td>Definition of a class that handles BCWAV files.</td> 69 </tr> 70 <tr> 71 <th> 72<a href="../../../nn/snd/CTR/FxDelay/Overview.html">nn::snd::CTR::FxDelay</a> 73 </th> 74<td>The delay effect class.</td> 75 </tr> 76 <tr> 77 <th> 78<a href="../../../nn/snd/CTR/FxReverb/Overview.html">nn::snd::CTR::FxReverb</a> 79 </th> 80<td>The reverb effect class.</td> 81 </tr> 82 <tr> 83 <th> 84<a href="../../../nn/snd/CTR/OutputCapture/Overview.html">nn::snd::CTR::OutputCapture</a> 85 </th> 86<td>The class for getting the DSP's final output.</td> 87 </tr> 88 <tr> 89 <th> 90<a href="../../../nn/snd/CTR/Voice/Overview.html"><CODE>nn::snd::CTR::Voice</CODE></a> 91 </th> 92<td>A class used to control <a href="../../../../nn/snd/CTR/Voice/Overview.html"><CODE>Voice</CODE></a> objects.</td> 93 </tr> </table> 94 </div> 95 </a> <a name="struct" id="struct"> 96<h2>Structures</h2> 97 <div class="section"> 98 <table class="members"> 99 <tr> 100 <th> 101<a href="../../../nn/snd/CTR/AdpcmParam/Overview.html"><CODE>nn::snd::CTR::AdpcmParam</CODE></a> 102 </th> 103<td>A structure that stores ADPCM coefficients.</td> 104 </tr> 105 <tr> 106 <th> 107<a href="../../../nn/snd/CTR/AdpcmContext/Overview.html"><CODE>nn::snd::CTR::AdpcmContext</CODE></a> 108 </th> 109<td>A structure that stores an ADPCM context.</td> 110 </tr> 111 <tr> 112 <th> 113<a href="../../../nn/snd/CTR/MonoFilterCoefficients/Overview.html"><CODE>nn::snd::CTR::MonoFilterCoefficients</CODE></a> 114 </th> 115<td>Structure that stores monopole filter coefficients.</td> 116 </tr> 117 <tr> 118 <th> 119<a href="../../../nn/snd/CTR/BiquadFilterCoefficients/Overview.html"><CODE>nn::snd::CTR::BiquadFilterCoefficients</CODE></a> 120 </th> 121<td>Structure that stores biquad filter coefficients.</td> 122 </tr> 123 <tr> 124 <th> 125<a href="../../../nn/snd/CTR/MixParam/Overview.html"><CODE>nn::snd::CTR::MixParam</CODE></a> 126 </th> 127<td>A structure that stores the gain for each channel.</td> 128 </tr> 129 <tr> 130 <th> 131<a href="../../../nn/snd/CTR/WaveBuffer/Overview.html"><CODE>nn::snd::CTR::WaveBuffer</CODE></a> 132 </th> 133<td>Structure that stores information about a buffer storing sample data.</td> 134 </tr> 135 <tr> 136 <th> 137<a href="../../../nn/snd/CTR/AuxBusData/Overview.html"><CODE>nn::snd::CTR::AuxBusData</CODE></a> 138 </th> 139<td>Typedef for functions containing the code that processes <CODE>Aux</CODE> bus data in each sound frame.</td> 140 </tr> </table> 141 </div> 142 </a> <a name="enum" id="enum"> 143<h2>Enumerated Types</h2> 144 <div class="section"> 145 <table class="members"> 146 <tr> 147 <td width="100"> </td> 148 <th> 149<a href="../../../nn/snd/CTR/ChannelIndex.html"><CODE>ChannelIndex</CODE></a> 150 </th> 151<td>Enumerated type representing channel positions.</td> 152 </tr> 153 <tr> 154 <td width="100"> </td> 155 <th> 156<a href="../../../nn/snd/CTR/OutputMode.html"><CODE>OutputMode</CODE></a> 157 </th> 158<td>Enumerated type representing a mixer's output mode.</td> 159 </tr> 160 <tr> 161 <td width="100"> </td> 162 <th> 163<a href="../../../nn/snd/CTR/ClippingMode.html"><CODE>ClippingMode</CODE></a> 164 </th> 165<td>Enumerated type representing the clipping mode.</td> 166 </tr> 167 <tr> 168 <td width="100"> </td> 169 <th> 170<a href="../../../nn/snd/CTR/SurroundSpeakerPosition.html"><CODE>SurroundSpeakerPosition</CODE></a> 171 </th> 172<td>Enumerated type indicating the virtual speaker position for 3D surround sound.</td> 173 </tr> 174 <tr> 175 <td width="100"> </td> 176 <th> 177<a href="../../../nn/snd/CTR/InterpolationType.html"><CODE>InterpolationType</CODE></a> 178 </th> 179<td>An enumerated type representing the interpolation method.</td> 180 </tr> 181 <tr> 182 <td width="100"> </td> 183 <th> 184<a href="../../../nn/snd/CTR/FilterType.html"><CODE>FilterType</CODE></a> 185 </th> 186<td>Enumerated type representing the filter type.</td> 187 </tr> 188 <tr> 189 <td width="100"> </td> 190 <th> 191<a href="../../../nn/snd/CTR/AuxBusId.html"><CODE>AuxBusId</CODE></a> 192 </th> 193<td>Enumerated type representing the <CODE>Aux</CODE> bus ID.</td> 194 </tr> 195 <tr> 196 <td width="100"> </td> 197 <th> 198<a href="../../../nn/snd/CTR/SampleFormat.html"><CODE>SampleFormat</CODE></a> 199 </th> 200<td>Enumerated type representing sample formats.</td> 201 </tr> </table> 202 </div> 203 </a> <a name="typedef" id="typedef"> 204<h2><CODE>typedef</CODE> Definitions</h2> 205 <div class="section"> 206 <table class="members"> 207 <tr> 208 <td width="100" /> 209 <th> 210<a href="../../../nn/snd/CTR/AuxCallback.html"><CODE>AuxCallback</CODE></a> 211 </th> 212<td>Typedef for the <CODE>Aux</CODE> callback function pointer.</td> 213 </tr> 214 <tr> 215 <td width="100" /> 216 <th> 217<a href="../../../nn/snd/CTR/VoiceDropCallbackFunc.html"><CODE>VoiceDropCallbackFunc</CODE></a> 218 </th> 219<td>Typedef for the callback function to invoke when the library frees a voice.</td> 220 </tr> </table> 221 </div> 222 </a> <a name="constant" id="constant"> 223<h2>Constants</h2> 224 <div class="section"> 225 <table class="members"> 226 <tr> 227 <td width="100"> 228<span class="static_style" title="static">S</span> 229 </td> 230 <th> 231<span class="argument"><a href="../../../nn/snd/CTR/VOICE_PRIORITY_NODROP.html"><CODE>VOICE_PRIORITY_NODROP</CODE></a></span> 232 </th> 233<td>This is the highest possible priority and is also given special treatment.</td> 234 </tr> 235 <tr> 236 <td width="100"> 237<span class="static_style" title="static">S</span> 238 </td> 239 <th> 240<span class="argument"><a href="../../../nn/snd/CTR/NN_SND_DSP_MAXIMUM_CYCLES.html"><CODE>NN_SND_DSP_MAXIMUM_CYCLES</CODE></a></span> 241 </th> 242<td>Maximum number of DSP cycles per sound frame.</td> 243 </tr> </table> 244 </div> 245 </a> <a name="function" id="function"> 246<h2>Functions</h2> 247 <div class="section"> 248 <table class="members"> 249 <tr> 250<th class="category" colspan="3">Initialize/Finalize</th> 251 </tr> 252 <tr> 253 <td width="100"> </td> 254 <th> 255<a href="../../../nn/snd/CTR/Initialize.html"><CODE>Initialize</CODE></a> 256 </th> 257<td>Initializes the sound library.</td> 258 </tr> 259 <tr> 260 <td width="100"> </td> 261 <th> 262<a href="../../../nn/snd/CTR/Finalize.html"><CODE>Finalize</CODE></a> 263 </th> 264<td>Finalizes the sound library.</td> 265 </tr> 266 <tr> 267 <td width="100"> </td> 268 <th> 269<a href="../../../nn/snd/CTR/InitializeWaveBuffer.html"><CODE>InitializeWaveBuffer</CODE></a> 270 </th> 271<td>Initializes a buffer information structure.</td> 272 </tr> 273 <tr> 274<th class="category" colspan="3">Cache Operations</th> 275 </tr> 276 <tr> 277 <td width="100"> </td> 278 <th> 279<a href="../../../nn/snd/CTR/FlushDataCache.html"><CODE>FlushDataCache</CODE></a> 280 </th> 281<td>Writes data for the specified cache range back into memory and invalidates the cache.</td> 282 </tr> 283 <tr> 284<th class="category" colspan="3">Synchronous Processing</th> 285 </tr> 286 <tr> 287 <td width="100"> </td> 288 <th> 289<a href="../../../nn/snd/CTR/WaitForDspSync.html"><CODE>WaitForDspSync</CODE></a> 290 </th> 291<td>Receives the result of DSP processing.</td> 292 </tr> 293 <tr> 294 <td width="100"> </td> 295 <th> 296<a href="../../../nn/snd/CTR/SendParameterToDsp.html"><CODE>SendParameterToDsp</CODE></a> 297 </th> 298<td>Applies the configured parameters to the DSP.</td> 299 </tr> 300 <tr> 301<th class="category" colspan="3">Master Controls, Auxiliary Bus Controls</th> 302 </tr> 303 <tr> 304 <td width="100"> </td> 305 <th> 306<a href="../../../nn/snd/CTR/SetMasterVolume.html"><CODE>SetMasterVolume</CODE></a> 307 </th> 308<td>This function sets the master volume.</td> 309 </tr> 310 <tr> 311 <td width="100"> </td> 312 <th> 313<a href="../../../nn/snd/CTR/SetAuxReturnVolume.html"><CODE>SetAuxReturnVolume</CODE></a> 314 </th> 315<td>Sets the <CODE>Aux</CODE> bus volume.</td> 316 </tr> 317 <tr> 318 <td width="100"> </td> 319 <th> 320<a href="../../../nn/snd/CTR/GetAuxReturnVolume.html"><CODE>SetAuxReturnVolume</CODE></a> 321 </th> 322<td>Gets the <CODE>Aux</CODE> bus volume.</td> 323 </tr> 324 <tr> 325 <td width="100"> </td> 326 <th> 327<a href="../../../nn/snd/CTR/RegisterAuxCallback.html"><CODE>RegisterAuxCallback</CODE></a> 328 </th> 329<td>Sets the <CODE>Aux</CODE> bus callback function.</td> 330 </tr> 331 <tr> 332 <td width="100"> </td> 333 <th> 334<a href="../../../nn/snd/CTR/GetAuxCallback.html"><CODE>GetAuxCallback</CODE></a> 335 </th> 336<td>Gets the <CODE>Aux</CODE> bus callback function.</td> 337 </tr> 338 <tr> 339 <td width="100"> </td> 340 <th> 341<a href="../../../nn/snd/CTR/ClearAuxCallback.html"><CODE>ClearAuxCallback</CODE></a> 342 </th> 343<td>Clears the <CODE>Aux</CODE> bus callback function.</td> 344 </tr> 345 <tr> 346 <td width="100"> </td> 347 <th> 348<a href="../../../nn/snd/CTR/SetAuxFrontBypass.html"><CODE>SetAuxFrontBypass</CODE></a> 349 </th> 350<td>Configures whether to bypass the front channels of an Aux bus.</td> 351 </tr> 352 <tr> 353<th class="category" colspan="3">3D Surround Sound</th> 354 </tr> 355 <tr> 356 <td width="100"> </td> 357 <th> 358<a href="../../../nn/snd/CTR/SetSoundOutputMode.html"><CODE>SetSoundOutputMode</CODE></a> 359 </th> 360<td>Sets the sound output mode.</td> 361 </tr> 362 <tr> 363 <td width="100"> </td> 364 <th> 365<a href="../../../nn/snd/CTR/GetSoundOutputMode.html"><CODE>GetSoundOutputMode</CODE></a> 366 </th> 367<td>Gets the sound output mode.</td> 368 </tr> 369 <tr> 370 <td width="100"> </td> 371 <th> 372<a href="../../../nn/snd/CTR/SetClippingMode.html"><CODE>SetClippingMode</CODE></a> 373 </th> 374<td>Sets the clipping mode.</td> 375 </tr> 376 <tr> 377 <td width="100"> </td> 378 <th> 379<a href="../../../nn/snd/CTR/GetClippingMode.html"><CODE>GetClippingMode</CODE></a> 380 </th> 381<td>Gets the clipping mode.</td> 382 </tr> 383 <tr> 384 <td width="100"> </td> 385 <th> 386<a href="../../../nn/snd/CTR/SetSurroundDepth.html"><CODE>SetSurroundDepth</CODE></a> 387 </th> 388<td>Sets the surround sound depth.</td> 389 </tr> 390 <tr> 391 <td width="100"> </td> 392 <th> 393<a href="../../../nn/snd/CTR/SetSurroundSpeakerPosition.html"><CODE>SetSurroundSpeakerPosition</CODE></a> 394 </th> 395<td>Sets the virtual speaker position for 3D surround sound.</td> 396 </tr> 397 <tr> 398<th class="category" colspan="3">Get the DSP final output</th> 399 </tr> 400 <tr> 401 <td width="100"> </td> 402 <th> 403<a href="../../../nn/snd/CTR/GetMixedBusData.html"><CODE>GetMixedBusData</CODE></a> 404 </th> 405<td>Copies the <CODE>Mix</CODE> bus data to the specified buffer.</td> 406 </tr> 407 <tr> 408 <td width="100"> </td> 409 <th> 410<a href="../../../nn/snd/CTR/SetOutputCapture.html">SetOutputCapture</a> 411 </th> 412<td>Configures the capture for getting the DSP final output.</td> 413 </tr> 414 <tr> 415<th class="category" colspan="3">Dropped Processing Detection</th> 416 </tr> 417 <tr> 418 <td width="100"> </td> 419 <th> 420<a href="../../../nn/snd/CTR/GetDroppedSoundFrameCount.html"><CODE>GetDroppedSoundFrameCount</CODE></a> 421 </th> 422<td>Gets the number of dropped sound frames.</td> 423 </tr> 424 <tr> 425 <td width="100"> </td> 426 <th> 427<a href="../../../nn/snd/CTR/ClearDroppedSoundFrameCount.html"><CODE>ClearDroppedSoundFrameCount</CODE></a> 428 </th> 429<td>Initializes the number of dropped sound frames.</td> 430 </tr> 431 <tr> 432<th class="category" colspan="3">DSP-ADPCM-Related</th> 433 </tr> 434 <tr> 435 <td width="100"> </td> 436 <th> 437<a href="../../../nn/snd/CTR/EncodeAdpcmData.html"><CODE>EncodeAdpcmData</CODE></a> 438 </th> 439<td>Encodes 16-bit PCM data into DSP-ADPCM format.</td> 440 </tr> 441 <tr> 442 <td width="100"> </td> 443 <th> 444<a href="../../../nn/snd/CTR/DecodeAdpcmData.html"><CODE>DecodeAdpcmData</CODE></a> 445 </th> 446<td>Decodes DSP-ADPCM data.</td> 447 </tr> 448 <tr> 449 <td width="100"> </td> 450 <th> 451<a href="../../../nn/snd/CTR/GetAdpcmOutputBufferSize.html"><CODE>GetAdpcmOutputBufferSize</CODE></a> 452 </th> 453<td>Returns the size of the output buffer that is required during encoding.</td> 454 </tr> 455 <tr> 456 <td width="100"> </td> 457 <th> 458<a href="../../../nn/snd/CTR/ConvertAdpcmPos2Nib.html"><CODE>ConvertAdpcmPos2Nib</CODE></a> 459 </th> 460<td>Converts the sample position to a number of nibbles.</td> 461 </tr> 462 <tr> 463 <td width="100"> </td> 464 <th> 465<a href="../../../nn/snd/CTR/ConvertAdpcmNib2Pos.html"><CODE>ConvertAdpcmNib2Pos</CODE></a> 466 </th> 467<td>Converts the number of nibbles to a sample position.</td> 468 </tr> 469 <tr> 470<th class="category" colspan="3">Effect</th> 471 </tr> 472 <tr> 473 <td width="100"> </td> 474 <th> 475<a href="../../../nn/snd/CTR/SetEffect.html"><CODE>SetEffect</CODE></a> 476 </th> 477<td>Configures the delay effect.</td> 478 </tr> 479 <tr> 480 <td width="100"> </td> 481 <th> 482<a href="../../../nn/snd/CTR/ClearEffect.html">ClearEffect</a> 483 </th> 484<td>Clears an effect setting.</td> 485 </tr> 486 <tr> 487<th class="category" colspan="3">Voice Controls</th> 488 </tr> 489 <tr> 490 <td width="100"> </td> 491 <th> 492<a href="../../../nn/snd/CTR/AllocVoice.html"><CODE>AllocVoice</CODE></a> 493 </th> 494<td>Gets a voice.</td> 495 </tr> 496 <tr> 497 <td width="100"> </td> 498 <th> 499<a href="../../../nn/snd/CTR/FreeVoice.html"><CODE>FreeVoice</CODE></a> 500 </th> 501<td>Frees a voice.</td> 502 </tr> 503 <tr> 504<th class="category" colspan="3">Other</th> 505 </tr> 506 <tr> 507 <td width="100"> </td> 508 <th> 509<a href="../../../nn/snd/CTR/GetSampleLength.html"><CODE>GetSampleLength</CODE></a> 510 </th> 511<td>Gets the sample length.</td> 512 </tr> 513 <tr> 514 <td width="100"> </td> 515 <th> 516<a href="../../../nn/snd/CTR/SetMaximumDspCycles.html"><CODE>SetMaximumDspCycles</CODE></a> 517 </th> 518<td>Sets the number of DSP cycles that sound can use.</td> 519 </tr> 520 <tr> 521 <td width="100"> </td> 522 <th> 523<a href="../../../nn/snd/CTR/GetMaximumDspCycles.html"><CODE>GetMaximumDspCycles</CODE></a> 524 </th> 525<td>Gets the number of DSP cycles allocated to sound.</td> 526 </tr> 527 <tr> 528 <td width="100"> </td> 529 <th> 530<a href="../../../nn/snd/CTR/GetDspCycles.html"><CODE>GetDspCycles</CODE></a> 531 </th> 532<td>Gets the number of cycles consumed by the DSP to create the last audio frame.</td> 533 </tr> 534 <tr> 535 <td width="100"> </td> 536 <th> 537<a href="../../../nn/snd/CTR/GetHeadphoneStatus.html"><CODE>GetHeadphoneStatus</CODE></a> 538 </th> 539<td>Gets whether headphones are plugged in.</td> 540 </tr> 541 <tr> 542 <td width="100"> </td> 543 <th> 544<a href="../../../nn/snd/CTR/UpdateHeadphoneStatus.html"><CODE>UpdateHeadphoneStatus</CODE></a> 545 </th> 546<td>Updates and gets the headphone insertion state.</td> 547 </tr> </table> 548 </div> 549 </a> 550<h2>Revision History</h2> 551 <div class="section"> 552 <dl class="history"> 553 <dt>2011/02/02</dt> 554<dd>Added a note regarding the synchronization performed by sound threads and a note regarding initialization.<BR> 555 </dd> 556 <dt>2010/02/09</dt> 557<dd>Initial version.<br /> 558 </dd> 559 </dl> 560 </div> 561 <hr><p>CONFIDENTIAL</p></body> 562</html> 563