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>LockSoundThread</title> 8 </head> 9 <body> 10 <h1><CODE><a href="../../../nw/Overview.html">nw</a>::<a href="../../../nw/snd/Overview.html">snd</a>::<a href="../../../nw/snd/SoundSystem/Overview.html">SoundSystem</a>::LockSoundThread</CODE> Member Function</h1> 11 <h2>Syntax</h2> 12 <div class="section"> 13 <pre class="definition">#include <nw/snd/snd_SoundSystem.h> 14static void LockSoundThread(); 15</pre> 16 </div> 17 <h2>Arguments</h2> 18 <div class="section"> 19 <p>None.</p> 20 </div> 21 <h2>Return Values</h2> 22 <div class="section"> 23 None. 24 </div> 25 <h2>Description</h2> 26 <div class="section"> 27 <p>Locks sound threads.</p><p>When the nn::snd::AllocVoice, nn::snd::FreeVoice, or nn::snd::Voice functions in the CTR_SDK are called, be sure to lock the sound thread with this function.</p><p>However, when the above function is called in the callback registered with the RegisterSoundFrameUserCallback function while the sound thread is being operated by the application core, there is no need to lock.</p><p>When calling the above function from outside the callback or when the sound thread is being run by the system core, it must be locked with this function.</p><p>After using the above function, use <a href="../../../nw/snd/SoundSystem/UnlockSoundThread.html">UnlockSoundThread</a> to release the lock.</p><p>If the thread is locked for an extended period of time, the nwsnd sound processing may stagnate, the sound may skip, or some other negative impact may be experienced.</p><p>Also see the demos/snd/withSdk sample demo.</p></div> 28 <h2>See Also</h2> 29 <div class="section"> 30 <p class="reference"><a href="../../../nw/snd/SoundSystem/UnlockSoundThread.html">UnlockSoundThread</a><br /> </p> 31 </div> 32 <h2>Revision History</h2> 33 <div class="section"> 34 <dl class="history"> 35 <dt>2010/10/27</dt> 36 <dd>Initial version.<br /> 37 </dd> 38 </dl> 39 </div> 40 <hr><p>CONFIDENTIAL</p></body> 41</html> 42