~jadedctrl/gem-xwx-moe
~jadedctrl/gem-xwx-moe/gemujo_ludo/mods.niaj/fasado/subtitles/doc/modules/Sound.html
~jadedctrl/gem-xwx-moe/gemujo_ludo/mods.niaj/fasado/subtitles/doc/modules/Sound.html
0 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" |
1 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
2 | <html> |
3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> |
4 | <head> |
5 | <title>Subtitles API Reference</title> |
6 | <link rel="stylesheet" href="../ldoc.css" type="text/css" /> |
7 | </head> |
8 | <body> |
9 |
|
10 | <div id="container"> |
11 |
|
12 | <div id="product"> |
13 | <div id="product_logo"></div> |
14 | <div id="product_name"><big><b></b></big></div> |
15 | <div id="product_description"></div> |
16 | </div> <!-- id="product" --> |
17 |
|
18 |
|
19 | <div id="main"> |
20 |
|
21 |
|
22 | <!-- Menu --> |
23 |
|
24 | <div id="navigation"> |
25 | <br/> |
26 | <h1>ldoc</h1> |
27 |
|
28 | <ul> |
29 | <li><a href="../index.html">Index</a></li> |
30 | </ul> |
31 |
|
32 | <h2>Contents</h2> |
33 | <ul> |
34 | <li><a href="#Class_Sound">Class Sound </a></li> |
35 | </ul> |
36 |
|
37 |
|
38 | <h2>Modules</h2> |
39 | <ul class="nowrap"> |
40 | <li><a href="../modules/Agent.html">Agent</a></li> |
41 | <li><a href="../modules/BaseTextSubtitleDisplay.html">BaseTextSubtitleDisplay</a></li> |
42 | <li><a href="../modules/ChatSubtitleDisplay.html">ChatSubtitleDisplay</a></li> |
43 | <li><a href="../modules/ClassicSubtitleDisplay.html">ClassicSubtitleDisplay</a></li> |
44 | <li><a href="../modules/CornerSubtitleDisplay.html">CornerSubtitleDisplay</a></li> |
45 | <li><strong>Sound</strong></li> |
46 | <li><a href="../modules/SubtitleDisplay.html">SubtitleDisplay</a></li> |
47 | <li><a href="../modules/WaypointSubtitleDisplay.html">WaypointSubtitleDisplay</a></li> |
48 | <li><a href="../modules/api.html">api</a></li> |
49 | <li><a href="../modules/chatcommands.html">chatcommands</a></li> |
50 | <li><a href="../modules/descriptions.html">descriptions</a></li> |
51 | <li><a href="../modules/init.html">init</a></li> |
52 | <li><a href="../modules/listeners.html">listeners</a></li> |
53 | <li><a href="../modules/menu.html">menu</a></li> |
54 | <li><a href="../modules/util.html">util</a></li> |
55 | </ul> |
56 |
|
57 | </div> |
58 |
|
59 | <div id="content"> |
60 |
|
61 | <h1>Module <code>Sound</code></h1> |
62 | <p>Provides the Sound class, which represents a playing sound effect.</p> |
63 | <p></p> |
64 |
|
65 |
|
66 | <h2><a href="#Class_Sound">Class Sound </a></h2> |
67 | <table class="function_list"> |
68 | <tr> |
69 | <td class="name" nowrap><a href="#subtitles.Sound:new">subtitles.Sound:new (spec, parameters, handle)</a></td> |
70 | <td class="summary">Constructor.</td> |
71 | </tr> |
72 | <tr> |
73 | <td class="name" nowrap><a href="#subtitles.Sound:get_players">subtitles.Sound:get_players ()</a></td> |
74 | <td class="summary">Checks which players the sound is audible to.</td> |
75 | </tr> |
76 | <tr> |
77 | <td class="name" nowrap><a href="#subtitles.Sound:is_in_range_of_player">subtitles.Sound:is_in_range_of_player (player)</a></td> |
78 | <td class="summary">Checks if this sound is within the player's range.</td> |
79 | </tr> |
80 | <tr> |
81 | <td class="name" nowrap><a href="#subtitles.Sound:get_max_distance">subtitles.Sound:get_max_distance ()</a></td> |
82 | <td class="summary">Returns the sound's maximum subtitle distance.</td> |
83 | </tr> |
84 | <tr> |
85 | <td class="name" nowrap><a href="#subtitles.Sound:get_duration">subtitles.Sound:get_duration ()</a></td> |
86 | <td class="summary">Returns the sound's expected duration</td> |
87 | </tr> |
88 | <tr> |
89 | <td class="name" nowrap><a href="#subtitles.Sound:get_description">subtitles.Sound:get_description ()</a></td> |
90 | <td class="summary">Returns the sound's description.</td> |
91 | </tr> |
92 | <tr> |
93 | <td class="name" nowrap><a href="#subtitles.Sound:get_name">subtitles.Sound:get_name ()</a></td> |
94 | <td class="summary">Returns the sound's technical name.</td> |
95 | </tr> |
96 | <tr> |
97 | <td class="name" nowrap><a href="#subtitles.Sound:get_pos">subtitles.Sound:get_pos ()</a></td> |
98 | <td class="summary">Calculates the sound's current position.</td> |
99 | </tr> |
100 | <tr> |
101 | <td class="name" nowrap><a href="#subtitles.Sound:get_relative_pos_for_player">subtitles.Sound:get_relative_pos_for_player (player)</a></td> |
102 | <td class="summary">Returns the sound's position from the player's perspective.</td> |
103 | </tr> |
104 | <tr> |
105 | <td class="name" nowrap><a href="#subtitles.Sound:get_merge_key">subtitles.Sound:get_merge_key ()</a></td> |
106 | <td class="summary">Returns the key to use for merging this sound with other sounds.</td> |
107 | </tr> |
108 | <tr> |
109 | <td class="name" nowrap><a href="#subtitles.Sound:is_exempt">subtitles.Sound:is_exempt ()</a></td> |
110 | <td class="summary">Checks if this sound should be exempt from subtitles.</td> |
111 | </tr> |
112 | <tr> |
113 | <td class="name" nowrap><a href="#subtitles.Sound:is_dynamic">subtitles.Sound:is_dynamic ()</a></td> |
114 | <td class="summary">Checks if this sound is dynamically positioned (attached to an object).</td> |
115 | </tr> |
116 | </table> |
117 |
|
118 | <br/> |
119 | <br/> |
120 |
|
121 |
|
122 | <h2 class="section-header has-description"><a name="Class_Sound"></a>Class Sound </h2> |
123 |
|
124 | <div class="section-description"> |
125 | Represents a playing sound effect. |
126 | Sound objects should be treated as immutable, as they are shared between |
127 | all players. |
128 | </div> |
129 | <dl class="function"> |
130 | <dt> |
131 | <a name = "subtitles.Sound:new"></a> |
132 | <strong>subtitles.Sound:new (spec, parameters, handle)</strong> |
133 | </dt> |
134 | <dd> |
135 | Constructor. |
136 |
|
137 |
|
138 | <h3>Parameters:</h3> |
139 | <ul> |
140 | <li><span class="parameter">spec</span> |
141 | The sound's SimpleSoundSpec, as a table or string. |
142 | </li> |
143 | <li><span class="parameter">parameters</span> |
144 | The sound's parameters, or nil. |
145 | </li> |
146 | <li><span class="parameter">handle</span> |
147 | The sound's numeric handle, or nil if the sound is ephemeral. |
148 | </li> |
149 | </ul> |
150 |
|
151 |
|
152 |
|
153 |
|
154 |
|
155 | </dd> |
156 | <dt> |
157 | <a name = "subtitles.Sound:get_players"></a> |
158 | <strong>subtitles.Sound:get_players ()</strong> |
159 | </dt> |
160 | <dd> |
161 | Checks which players the sound is audible to. |
162 |
|
163 |
|
164 |
|
165 | <h3>Returns:</h3> |
166 | <ol> |
167 |
|
168 | A sequence of player ObjectRefs. |
169 | </ol> |
170 |
|
171 |
|
172 |
|
173 |
|
174 | </dd> |
175 | <dt> |
176 | <a name = "subtitles.Sound:is_in_range_of_player"></a> |
177 | <strong>subtitles.Sound:is_in_range_of_player (player)</strong> |
178 | </dt> |
179 | <dd> |
180 | Checks if this sound is within the player's range. |
181 |
|
182 |
|
183 | <h3>Parameters:</h3> |
184 | <ul> |
185 | <li><span class="parameter">player</span> |
186 | The player's ObjectRef. |
187 | </li> |
188 | </ul> |
189 |
|
190 | <h3>Returns:</h3> |
191 | <ol> |
192 |
|
193 | true if the sound is in range. |
194 | </ol> |
195 |
|
196 |
|
197 |
|
198 |
|
199 | </dd> |
200 | <dt> |
201 | <a name = "subtitles.Sound:get_max_distance"></a> |
202 | <strong>subtitles.Sound:get_max_distance ()</strong> |
203 | </dt> |
204 | <dd> |
205 | Returns the sound's maximum subtitle distance. |
206 |
|
207 |
|
208 |
|
209 | <h3>Returns:</h3> |
210 | <ol> |
211 |
|
212 | The maximum distance in metres. |
213 | </ol> |
214 |
|
215 |
|
216 |
|
217 |
|
218 | </dd> |
219 | <dt> |
220 | <a name = "subtitles.Sound:get_duration"></a> |
221 | <strong>subtitles.Sound:get_duration ()</strong> |
222 | </dt> |
223 | <dd> |
224 | Returns the sound's expected duration |
225 |
|
226 |
|
227 |
|
228 | <h3>Returns:</h3> |
229 | <ol> |
230 |
|
231 | The duration in seconds. |
232 | </ol> |
233 |
|
234 |
|
235 |
|
236 |
|
237 | </dd> |
238 | <dt> |
239 | <a name = "subtitles.Sound:get_description"></a> |
240 | <strong>subtitles.Sound:get_description ()</strong> |
241 | </dt> |
242 | <dd> |
243 | Returns the sound's description. |
244 |
|
245 |
|
246 |
|
247 | <h3>Returns:</h3> |
248 | <ol> |
249 |
|
250 | A human-readable description string. |
251 | </ol> |
252 |
|
253 |
|
254 |
|
255 |
|
256 | </dd> |
257 | <dt> |
258 | <a name = "subtitles.Sound:get_name"></a> |
259 | <strong>subtitles.Sound:get_name ()</strong> |
260 | </dt> |
261 | <dd> |
262 | Returns the sound's technical name. |
263 |
|
264 |
|
265 |
|
266 | <h3>Returns:</h3> |
267 | <ol> |
268 |
|
269 | A sound name string. |
270 | </ol> |
271 |
|
272 |
|
273 |
|
274 |
|
275 | </dd> |
276 | <dt> |
277 | <a name = "subtitles.Sound:get_pos"></a> |
278 | <strong>subtitles.Sound:get_pos ()</strong> |
279 | </dt> |
280 | <dd> |
281 | Calculates the sound's current position. |
282 | This may change if the sound is attached to an object. |
283 |
|
284 |
|
285 |
|
286 | <h3>Returns:</h3> |
287 | <ol> |
288 |
|
289 | An absolute position vector. |
290 | </ol> |
291 |
|
292 |
|
293 |
|
294 |
|
295 | </dd> |
296 | <dt> |
297 | <a name = "subtitles.Sound:get_relative_pos_for_player"></a> |
298 | <strong>subtitles.Sound:get_relative_pos_for_player (player)</strong> |
299 | </dt> |
300 | <dd> |
301 | Returns the sound's position from the player's perspective. |
302 |
|
303 |
|
304 | <h3>Parameters:</h3> |
305 | <ul> |
306 | <li><span class="parameter">player</span> |
307 | The player's ObjectRef. |
308 | </li> |
309 | </ul> |
310 |
|
311 | <h3>Returns:</h3> |
312 | <ol> |
313 |
|
314 | A vector relative to the player's position and rotation. |
315 | </ol> |
316 |
|
317 |
|
318 |
|
319 |
|
320 | </dd> |
321 | <dt> |
322 | <a name = "subtitles.Sound:get_merge_key"></a> |
323 | <strong>subtitles.Sound:get_merge_key ()</strong> |
324 | </dt> |
325 | <dd> |
326 | Returns the key to use for merging this sound with other sounds. |
327 | Multiple sounds with the same merge key will be merged into a single |
328 | subtitle. |
329 |
|
330 |
|
331 |
|
332 | <h3>Returns:</h3> |
333 | <ol> |
334 |
|
335 | A table key, or nil to not merge. |
336 | </ol> |
337 |
|
338 |
|
339 |
|
340 |
|
341 | </dd> |
342 | <dt> |
343 | <a name = "subtitles.Sound:is_exempt"></a> |
344 | <strong>subtitles.Sound:is_exempt ()</strong> |
345 | </dt> |
346 | <dd> |
347 | Checks if this sound should be exempt from subtitles. |
348 |
|
349 |
|
350 |
|
351 | <h3>Returns:</h3> |
352 | <ol> |
353 |
|
354 | true to disable the subtitle. |
355 | </ol> |
356 |
|
357 |
|
358 |
|
359 |
|
360 | </dd> |
361 | <dt> |
362 | <a name = "subtitles.Sound:is_dynamic"></a> |
363 | <strong>subtitles.Sound:is_dynamic ()</strong> |
364 | </dt> |
365 | <dd> |
366 | Checks if this sound is dynamically positioned (attached to an object). |
367 |
|
368 |
|
369 |
|
370 | <h3>Returns:</h3> |
371 | <ol> |
372 |
|
373 | true if the sound is dynamic. |
374 | </ol> |
375 |
|
376 |
|
377 |
|
378 |
|
379 | </dd> |
380 | </dl> |
381 |
|
382 |
|
383 | </div> <!-- id="content" --> |
384 | </div> <!-- id="main" --> |
385 | <div id="about"> |
386 | <i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i> |
387 | <i style="float:right;">Last updated 2023-01-14 06:51:17 </i> |
388 | </div> <!-- id="about" --> |
389 | </div> <!-- id="container" --> |
390 | </body> |
391 | </html> |