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>nw::snd::SoundHandle</title>
49  </head>
50  <body>
51    <h1><CODE><a href="../../../nw/Overview.html">nw</a>::<a href="../../../nw/snd/Overview.html">snd</a>::SoundHandle</CODE> Class</h1>
52    <div class="section">
53      <b>Header file: </b>nw/snd/snd_SoundHandle.h</div>
54    <h2>Syntax</h2>
55    <div class="section">
56      <pre class="definition">class SoundHandle</pre>
57    </div>
58    <h2>Description</h2>
59    <div class="section">
60      <p>A handle class used to control sounds that are played back.</p><p>To associate a sound handle with a sound, call <a href="../../../nw/snd/SoundStartable/PrepareSound.html"><CODE>SoundArchivePlayer::PrepareSound</CODE></a> or <a href="../../../nw/snd/SoundStartable/StartSound.html"><CODE>SoundArchivePlayer::StartSound</CODE></a>.</p><p>If the handle is already associated with another sound, this association is removed, and it is newly associated with the sound to be played back.</p><p>The association between the handle and the sound is removed, and that handle can no longer control that sound in the following situations:</p><p>- Playback stops at the end of the sound. <br />- <a href="../../../nw/snd/SoundHandle/Stop.html"><CODE>Stop</CODE></a> is called at fade frame 0. <br />- <a href="../../../nw/snd/SoundHandle/Stop.html"><CODE>Stop</CODE></a> is called when one or more fade frames have been specified and playback stops after only that number of frames has elapsed. <br />- <a href="../../../nw/snd/SoundHandle/DetachSound.html"><CODE>SoundHandle::DetachSound</CODE></a> is called explicitly.</p><p>As a result, you can check whether a sound has stopped after being played through to the end by monitoring <a href="../../../nw/snd/SoundHandle/IsAttachedSound.html"><CODE>IsAttachedSound</CODE></a> each frame. However, you must take into consideration the effect of sounds that were stopped by calls to <a href="../../../nw/snd/SoundHandle/Stop.html"><CODE>Stop</CODE></a>, explicit calls to <a href="../../../nw/snd/SoundHandle/DetachSound.html"><CODE>DetachSound</CODE></a>, or determinations made about player priorities.</p><p>For determinations made about player priorities, refer to the &quot;Priority Operations&quot; chapter of the <I>Sound System Manual</I>.</p><p>There are three types of sounds: sequence sounds, stream sounds, and wave sounds. The <a href="../../../nw/snd/SoundHandle/Overview.html"><CODE>SoundHandle</CODE></a> class can be used to handle operations that are common to all these sounds.</p><p>The <a href="../../../nw/snd/SequenceSoundHandle/Overview.html"><CODE>SequenceSoundHandle</CODE></a>, <a href="../../../nw/snd/StreamSoundHandle/Overview.html"><CODE>StreamSoundHandle</CODE></a>, and <a href="../../../nw/snd/WaveSoundHandle/Overview.html"><CODE>WaveSoundHandle</CODE></a> classes provide operations specific to each sound type that cannot be handled with the <a href="../../../nw/snd/SoundHandle/Overview.html"><CODE>SoundHandle</CODE></a> class.</p></div>
61    <a name="function" id="function">
62      <h2>Member Functions</h2>
63      <div class="section">
64        <table class="members">
65          <tr>
66            <th class="category" colspan="3">Constructors/Destructors</th>
67          </tr>
68          <tr>
69            <td width="100">  </td>
70            <th>
71              <a href="../../../nw/snd/SoundHandle/SoundHandle.html">SoundHandle</a>
72            </th>
73            <td>Constructor.</td>
74          </tr>
75          <tr>
76            <td width="100">  </td>
77            <th>
78              <a href="../../../nw/snd/SoundHandle/~SoundHandle.html">~SoundHandle</a>
79            </th>
80            <td>Destructor.</td>
81          </tr>
82          <tr>
83            <th class="category" colspan="3">Play, Stop, Pause, Resume</th>
84          </tr>
85          <tr>
86            <td width="100">  </td>
87            <th>
88              <a href="../../../nw/snd/SoundHandle/StartPrepared.html">StartPrepared</a>
89            </th>
90            <td>Plays the sound whose preparation for playback has completed.</td>
91          </tr>
92          <tr>
93            <td width="100">  </td>
94            <th>
95              <a href="../../../nw/snd/SoundHandle/Stop.html"><CODE>Stop</CODE></a>
96            </th>
97            <td>Stops the sound.</td>
98          </tr>
99          <tr>
100            <td width="100">  </td>
101            <th>
102              <a href="../../../nw/snd/SoundHandle/Pause.html">Pause</a>
103            </th>
104            <td>Pauses or restarts a sound.</td>
105          </tr>
106          <tr>
107            <td width="100">  </td>
108            <th>
109              <a href="../../../nw/snd/SoundHandle/IsPrepared.html">IsPrepared</a>
110            </th>
111            <td>Checks whether preparation for sound playback is complete.</td>
112          </tr>
113          <tr>
114            <td width="100">  </td>
115            <th>
116              <a href="../../../nw/snd/SoundHandle/IsPause.html">IsPause</a>
117            </th>
118            <td>Checks whether the sound is currently paused.</td>
119          </tr>
120          <tr>
121            <td width="100">  </td>
122            <th>
123              <a href="../../../nw/snd/SoundHandle/FadeIn.html">FadeIn</a>
124            </th>
125            <td>Fades in the sound when playback starts.</td>
126          </tr>
127          <tr>
128            <td width="100">  </td>
129            <th>
130              <a href="../../../nw/snd/SoundHandle/GetRemainingFadeFrames.html">GetRemainingFadeFrames</a>
131            </th>
132            <td>Obtains the number of frames that remain until the fade-in or fade-out completes.</td>
133          </tr>
134          <tr>
135            <td width="100">  </td>
136            <th>
137              <a href="../../../nw/snd/SoundHandle/GetRemainingPauseFadeFrames.html">GetRemainingPauseFadeFrames</a>
138            </th>
139            <td>Obtains the number of remaining frames until the fade completes when the system is paused.</td>
140          </tr>
141          <tr>
142            <th class="category" colspan="3">Parameters</th>
143          </tr>
144          <tr>
145            <td width="100">  </td>
146            <th>
147              <a href="../../../nw/snd/SoundHandle/SetVolume.html">SetVolume</a>
148            </th>
149            <td>Changes the volume of the sound.</td>
150          </tr>
151          <tr>
152            <td width="100">  </td>
153            <th>
154              <a href="../../../nw/snd/SoundHandle/SetPitch.html">SetPitch</a>
155            </th>
156            <td>Changes the pitch of the sound.</td>
157          </tr>
158          <tr>
159            <td width="100">  </td>
160            <th>
161              <a href="../../../nw/snd/SoundHandle/SetPan.html">SetPan</a>
162            </th>
163            <td>Changes the pan (right/left location) of the sound.</td>
164          </tr>
165          <tr>
166            <td width="100">  </td>
167            <th>
168              <a href="../../../nw/snd/SoundHandle/SetSurroundPan.html">SetSurroundPan</a>
169            </th>
170            <td>Changes the surround pan (front-to-back location) of the sound.</td>
171          </tr>
172          <tr>
173            <td width="100">  </td>
174            <th>
175              <a href="../../../nw/snd/SoundHandle/SetLpfFreq.html">SetLpfFreq</a>
176            </th>
177            <td>Changes the low pass filter cutoff value of the sound.</td>
178          </tr>
179          <tr>
180            <td width="100">  </td>
181            <th>
182              <a href="../../../nw/snd/SoundHandle/SetBiquadFilter.html">SetBiquadFilter</a>
183            </th>
184            <td>Changes the biquad filter setting for sound.</td>
185          </tr>
186          <tr>
187            <td width="100">  </td>
188            <th>
189              <a href="../../../nw/snd/SoundHandle/SetPlayerPriority.html">SetPlayerPriority</a>
190            </th>
191            <td>Changes the player priority.</td>
192          </tr>
193          <tr>
194            <th class="category" colspan="3">Output Parameters</th>
195          </tr>
196          <tr>
197            <td width="100">  </td>
198            <th>
199              <a href="../../../nw/snd/SoundHandle/SetMainSend.html">SetMainSend</a>
200            </th>
201            <td>Changes the main send volume of the sound.</td>
202          </tr>
203          <tr>
204            <td width="100">  </td>
205            <th>
206              <a href="../../../nw/snd/SoundHandle/SetFxSend.html">SetFxSend</a>
207            </th>
208            <td>Changes the effect send volume of the sound.</td>
209          </tr>
210          <tr>
211            <th class="category" colspan="3">Handle Operations</th>
212          </tr>
213          <tr>
214            <td width="100">  </td>
215            <th>
216              <a href="../../../nw/snd/SoundHandle/IsAttachedSound.html">IsAttachedSound</a>
217            </th>
218            <td>Checks whether there is a sound associated with the handle.</td>
219          </tr>
220          <tr>
221            <td width="100">  </td>
222            <th>
223              <a href="../../../nw/snd/SoundHandle/DetachSound.html">DetachSound</a>
224            </th>
225            <td>Frees sounds from handles.</td>
226          </tr>
227          <tr>
228            <td width="100">  </td>
229            <th>
230              <a href="../../../nw/snd/SoundHandle/SetId.html">SetId</a>
231            </th>
232            <td>Sets the ID of a sound.</td>
233          </tr>
234          <tr>
235            <td width="100">  </td>
236            <th>
237              <a href="../../../nw/snd/SoundHandle/GetId.html"><CODE>GetId</CODE></a>
238            </th>
239            <td>Obtains the ID of a sound.</td>
240          </tr> </table>
241      </div>
242    </a>
243    <h2>See Also</h2>
244    <div class="section">
245      <p class="reference"><a href="../../../nw/snd/SoundArchivePlayer/Overview.html"><CODE>SoundArchivePlayer</CODE></a> Class<br /><a href="../../../nw/snd/SequenceSoundHandle/Overview.html"><CODE>SequenceSoundHandle</CODE></a> Class<br /><a href="../../../nw/snd/StreamSoundHandle/Overview.html"><CODE>StreamSoundHandle</CODE></a> Class<br /><a href="../../../nw/snd/WaveSoundHandle/Overview.html"><CODE>WaveSoundHandle</CODE></a> Class<br /> </p>
246    </div>
247    <h2>Revision History</h2>
248    <div class="section">
249      <dl class="history">
250        <dt>2010/04/28</dt>
251        <dd>Added the conditions under which handles and sounds will cease to be associated. Added information about how to determine if a sound has played through to completion.<br />
252        </dd>
253        <dt>2010/01/25</dt>
254        <dd>Added information about the <CODE>SequenceSoundHandle</CODE>, <CODE>StreamSoundHandle</CODE>, and <CODE>WaveSoundHandle</CODE> classes.<br />
255        </dd>
256        <dt>2010/01/15</dt>
257        <dd>Initial version.<br />
258        </dd>
259      </dl>
260    </div>
261  <hr><p>CONFIDENTIAL</p></body>
262</html>
263