1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
4
<title>Castle Game Engine: CastleSoundEngine</title>
5
<meta name="generator" content="PasDoc 0.12.1">
6
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
7
<link rel="StyleSheet" type="text/css" href="pasdoc.css">
10
<table class="container"><tr><td class="navigation">
11
<h2>Castle Game Engine</h2><p><a href="introduction.html" class="navigation">Introduction</a></p><p><a href="AllUnits.html" class="navigation">Units</a></p><p><a href="ClassHierarchy.html" class="navigation">Class Hierarchy</a></p><p><a href="AllClasses.html" class="navigation">Classes, Interfaces, Objects and Records</a></p><p><a href="AllTypes.html" class="navigation">Types</a></p><p><a href="AllVariables.html" class="navigation">Variables</a></p><p><a href="AllConstants.html" class="navigation">Constants</a></p><p><a href="AllFunctions.html" class="navigation">Functions and Procedures</a></p><p><a href="AllIdentifiers.html" class="navigation">Identifiers</a></p></td><td class="content">
12
<h1 class="unit">Unit CastleSoundEngine</h1>
13
<table class="sections wide_list">
15
<td><a class="section" href="#PasDoc-Description">Description</a></td><td><a class="section" href="#PasDoc-Uses">Uses</a></td><td><a class="section" href="#PasDoc-Classes">Classes, Interfaces, Objects and Records</a></td><td><a class="section" href="#PasDoc-FuncsProcs">Functions and Procedures</a></td><td><a class="section" href="#PasDoc-Types">Types</a></td><td><a class="section" href="#PasDoc-Constants">Constants</a></td><td><a class="section" href="#PasDoc-Variables">Variables</a></td></tr></table>
16
<a name="PasDoc-Description"></a><h2 class="description">Description</h2>
18
3D sound engine (<a class="normal" href="CastleSoundEngine.TSoundEngine.html">TSoundEngine</a> and <a class="normal" href="CastleSoundEngine.TRepoSoundEngine.html">TRepoSoundEngine</a>).</p>
19
<a name="PasDoc-Uses"></a><h2 class="uses">Uses</h2>
20
<ul class="useslist"><li>SysUtils</li><li>Classes</li><li>CastleOpenAL</li><li><a href="CastleSoundAllocator.html">CastleSoundAllocator</a></li><li><a href="CastleVectors.html">CastleVectors</a></li><li><a href="CastleTimeUtils.html">CastleTimeUtils</a></li><li><a href="CastleXMLConfig.html">CastleXMLConfig</a></li><li>Math</li><li>FGL</li><li><a href="CastleClassUtils.html">CastleClassUtils</a></li></ul><h2 class="overview">Overview</h2>
21
<a name="PasDoc-Classes"></a><h3 class="cio">Classes, Interfaces, Objects and Records</h3>
22
<table class="classestable wide_list">
23
<tr class="listheader">
24
<th class="itemname">Name</th>
25
<th class="itemdesc">Description</th>
28
<td class="itemname">Class <a class="bold" href="CastleSoundEngine.ESoundBufferNotLoaded.html"><code>ESoundBufferNotLoaded</code></a></td>
29
<td class="itemdesc"> </td>
32
<td class="itemname">Class <a class="bold" href="CastleSoundEngine.TSoundBuffersCache.html"><code>TSoundBuffersCache</code></a></td>
33
<td class="itemdesc"> </td>
36
<td class="itemname">Class <a class="bold" href="CastleSoundEngine.TSoundDevice.html"><code>TSoundDevice</code></a></td>
37
<td class="itemdesc"> </td>
40
<td class="itemname">Class <a class="bold" href="CastleSoundEngine.TSoundEngine.html"><code>TSoundEngine</code></a></td>
41
<td class="itemdesc">OpenAL sound engine.</td>
44
<td class="itemname">Class <a class="bold" href="CastleSoundEngine.TSoundInfo.html"><code>TSoundInfo</code></a></td>
45
<td class="itemdesc">Sound information, internally used by <a class="normal" href="CastleSoundEngine.TRepoSoundEngine.html">TRepoSoundEngine</a>.</td>
48
<td class="itemname">Class <a class="bold" href="CastleSoundEngine.TRepoSoundEngine.html"><code>TRepoSoundEngine</code></a></td>
49
<td class="itemdesc">Sound engine that keeps a repository of sounds, defined in a nice XML file.</td>
52
<td class="itemname">Class <a class="bold" href="CastleSoundEngine.TMusicPlayer.html"><code>TMusicPlayer</code></a></td>
53
<td class="itemdesc">Music player, to easily play a sound preloaded by <a class="normal" href="CastleSoundEngine.TRepoSoundEngine.html">TRepoSoundEngine</a>.</td>
56
<a name="PasDoc-FuncsProcs"></a><h3 class="summary">Functions and Procedures</h3>
57
<table class="summary wide_list">
59
<td class="itemcode"><code>function <b><a href="CastleSoundEngine.html#SoundEngine">SoundEngine</a></b>: <a href="CastleSoundEngine.TRepoSoundEngine.html">TRepoSoundEngine</a>;</code></td>
62
<a name="PasDoc-Types"></a><h3 class="summary">Types</h3>
63
<table class="summary wide_list">
65
<td class="itemcode"><code><b><a href="CastleSoundEngine.html#TSoundBuffer">TSoundBuffer</a></b> = <a href="CastleSoundAllocator.html#TSoundBuffer">CastleSoundAllocator.TSoundBuffer</a>;</code></td>
68
<td class="itemcode"><code><b><a href="CastleSoundEngine.html#TSound">TSound</a></b> = <a href="CastleSoundAllocator.TSound.html">CastleSoundAllocator.TSound</a>;</code></td>
71
<td class="itemcode"><code><b><a href="CastleSoundEngine.html#TSoundList">TSoundList</a></b> = <a href="CastleSoundAllocator.TSoundList.html">CastleSoundAllocator.TSoundList</a>;</code></td>
74
<td class="itemcode"><code><b><a href="CastleSoundEngine.html#TSoundDistanceModel">TSoundDistanceModel</a></b> = (...);</code></td>
77
<td class="itemcode"><code><b><a href="CastleSoundEngine.html#TSoundBuffersCacheList">TSoundBuffersCacheList</a></b> = specialize TFPGObjectList<<a href="CastleSoundEngine.TSoundBuffersCache.html">TSoundBuffersCache</a>>;</code></td>
80
<td class="itemcode"><code><b><a href="CastleSoundEngine.html#TSoundDeviceList">TSoundDeviceList</a></b> = specialize TFPGObjectList<<a href="CastleSoundEngine.TSoundDevice.html">TSoundDevice</a>>;</code></td>
83
<td class="itemcode"><code><b><a href="CastleSoundEngine.html#TSoundType">TSoundType</a></b> = Cardinal;</code></td>
86
<td class="itemcode"><code><b><a href="CastleSoundEngine.html#TSoundInfoList">TSoundInfoList</a></b> = specialize TFPGObjectList<<a href="CastleSoundEngine.TSoundInfo.html">TSoundInfo</a>>;</code></td>
89
<a name="PasDoc-Constants"></a><h3 class="summary">Constants</h3>
90
<table class="summary wide_list">
92
<td class="itemcode"><code><b><a href="CastleSoundEngine.html#stNone">stNone</a></b> = 0;</code></td>
95
<td class="itemcode"><code><b><a href="CastleSoundEngine.html#MaxSoundImportance">MaxSoundImportance</a></b> = MaxInt;</code></td>
98
<td class="itemcode"><code><b><a href="CastleSoundEngine.html#LevelEventSoundImportance">LevelEventSoundImportance</a></b> = 100000;</code></td>
101
<td class="itemcode"><code><b><a href="CastleSoundEngine.html#PlayerSoundImportance">PlayerSoundImportance</a></b> = 10000;</code></td>
104
<td class="itemcode"><code><b><a href="CastleSoundEngine.html#DefaultCreatureSoundImportance">DefaultCreatureSoundImportance</a></b> = 1000;</code></td>
107
<td class="itemcode"><code><b><a href="CastleSoundEngine.html#MinorNonSpatialSoundImportance">MinorNonSpatialSoundImportance</a></b> = 100;</code></td>
110
<a name="PasDoc-Variables"></a><h3 class="summary">Variables</h3>
111
<table class="summary wide_list">
113
<td class="itemcode"><code><b><a href="CastleSoundEngine.html#stPlayerInteractFailed">stPlayerInteractFailed</a></b>:<a href="CastleSoundEngine.html#TSoundType">TSoundType</a>;</code></td>
116
<td class="itemcode"><code><b><a href="CastleSoundEngine.html#stPlayerPickItem">stPlayerPickItem</a></b>:<a href="CastleSoundEngine.html#TSoundType">TSoundType</a>;</code></td>
119
<td class="itemcode"><code><b><a href="CastleSoundEngine.html#stPlayerDropItem">stPlayerDropItem</a></b>:<a href="CastleSoundEngine.html#TSoundType">TSoundType</a>;</code></td>
122
<td class="itemcode"><code><b><a href="CastleSoundEngine.html#stPlayerSwimming">stPlayerSwimming</a></b>:<a href="CastleSoundEngine.html#TSoundType">TSoundType</a>;</code></td>
125
<td class="itemcode"><code><b><a href="CastleSoundEngine.html#stPlayerDrowning">stPlayerDrowning</a></b>:<a href="CastleSoundEngine.html#TSoundType">TSoundType</a>;</code></td>
128
<td class="itemcode"><code><b><a href="CastleSoundEngine.html#stPlayerFootstepsDefault">stPlayerFootstepsDefault</a></b>:<a href="CastleSoundEngine.html#TSoundType">TSoundType</a>;</code></td>
131
<td class="itemcode"><code><b><a href="CastleSoundEngine.html#stPlayerToxicPain">stPlayerToxicPain</a></b>:<a href="CastleSoundEngine.html#TSoundType">TSoundType</a>;</code></td>
134
<td class="itemcode"><code><b><a href="CastleSoundEngine.html#stPlayerSuddenPain">stPlayerSuddenPain</a></b>:<a href="CastleSoundEngine.html#TSoundType">TSoundType</a>;</code></td>
137
<td class="itemcode"><code><b><a href="CastleSoundEngine.html#stPlayerDies">stPlayerDies</a></b>:<a href="CastleSoundEngine.html#TSoundType">TSoundType</a>;</code></td>
140
<td class="itemcode"><code><b><a href="CastleSoundEngine.html#stPlayerSwimmingChange">stPlayerSwimmingChange</a></b>:<a href="CastleSoundEngine.html#TSoundType">TSoundType</a>;</code></td>
143
<td class="itemcode"><code><b><a href="CastleSoundEngine.html#stMenuCurrentItemChanged">stMenuCurrentItemChanged</a></b>:<a href="CastleSoundEngine.html#TSoundType">TSoundType</a>;</code></td>
146
<td class="itemcode"><code><b><a href="CastleSoundEngine.html#stMenuClick">stMenuClick</a></b>:<a href="CastleSoundEngine.html#TSoundType">TSoundType</a>;</code></td>
149
<td class="itemcode"><code><b><a href="CastleSoundEngine.html#IgnoreAllMissingSounds">IgnoreAllMissingSounds</a></b>: boolean;</code></td>
152
<h2 class="description">Description</h2>
153
<h3 class="detail">Functions and Procedures</h3>
154
<table class="detail wide_list">
156
<td class="itemcode"><a name="SoundEngine"></a><code>function <b>SoundEngine</b>: <a href="CastleSoundEngine.TRepoSoundEngine.html">TRepoSoundEngine</a>;</code></td>
160
The sound engine. Singleton instance of <a class="normal" href="CastleSoundEngine.TRepoSoundEngine.html">TRepoSoundEngine</a>, the most capable engine class. Created on first call to this function.</p>
163
<h3 class="detail">Types</h3>
164
<table class="detail wide_list">
166
<td class="itemcode"><a name="TSoundBuffer"></a><code><b>TSoundBuffer</b> = <a href="CastleSoundAllocator.html#TSoundBuffer">CastleSoundAllocator.TSoundBuffer</a>;</code></td>
171
<table class="detail wide_list">
173
<td class="itemcode"><a name="TSound"></a><code><b>TSound</b> = <a href="CastleSoundAllocator.TSound.html">CastleSoundAllocator.TSound</a>;</code></td>
178
<table class="detail wide_list">
180
<td class="itemcode"><a name="TSoundList"></a><code><b>TSoundList</b> = <a href="CastleSoundAllocator.TSoundList.html">CastleSoundAllocator.TSoundList</a>;</code></td>
185
<table class="detail wide_list">
187
<td class="itemcode"><a name="TSoundDistanceModel"></a><code><b>TSoundDistanceModel</b> = (...);</code></td>
190
<h6 class="description_section">Values</h6>
195
dmInverseDistance: </li>
197
dmInverseDistanceClamped: </li>
199
dmLinearDistance: </li>
201
dmLinearDistanceClamped: </li>
203
dmExponentDistance: </li>
205
dmExponentDistanceClamped: </li>
209
<table class="detail wide_list">
211
<td class="itemcode"><a name="TSoundBuffersCacheList"></a><code><b>TSoundBuffersCacheList</b> = specialize TFPGObjectList<<a href="CastleSoundEngine.TSoundBuffersCache.html">TSoundBuffersCache</a>>;</code></td>
216
<table class="detail wide_list">
218
<td class="itemcode"><a name="TSoundDeviceList"></a><code><b>TSoundDeviceList</b> = specialize TFPGObjectList<<a href="CastleSoundEngine.TSoundDevice.html">TSoundDevice</a>>;</code></td>
223
<table class="detail wide_list">
225
<td class="itemcode"><a name="TSoundType"></a><code><b>TSoundType</b> = Cardinal;</code></td>
229
Unique sound type identifier for sounds used within <a class="normal" href="CastleSoundEngine.TRepoSoundEngine.html">TRepoSoundEngine</a>.
231
<p>This is actually just an index to TRepoSoundEngine.SoundNames array, but you should always treat this as an opaque type.</p>
234
<table class="detail wide_list">
236
<td class="itemcode"><a name="TSoundInfoList"></a><code><b>TSoundInfoList</b> = specialize TFPGObjectList<<a href="CastleSoundEngine.TSoundInfo.html">TSoundInfo</a>>;</code></td>
241
<h3 class="detail">Constants</h3>
242
<table class="detail wide_list">
244
<td class="itemcode"><a name="stNone"></a><code><b>stNone</b> = 0;</code></td>
248
Special sound type that indicates that there is actually no sound. <a class="normal" href="CastleSoundEngine.TRepoSoundEngine.html#Sound">TRepoSoundEngine.Sound</a> and <a class="normal" href="CastleSoundEngine.TRepoSoundEngine.html#Sound3D">TRepoSoundEngine.Sound3D</a> will do nothing when called with this sound type.</p>
251
<table class="detail wide_list">
253
<td class="itemcode"><a name="MaxSoundImportance"></a><code><b>MaxSoundImportance</b> = MaxInt;</code></td>
258
<table class="detail wide_list">
260
<td class="itemcode"><a name="LevelEventSoundImportance"></a><code><b>LevelEventSoundImportance</b> = 100000;</code></td>
265
<table class="detail wide_list">
267
<td class="itemcode"><a name="PlayerSoundImportance"></a><code><b>PlayerSoundImportance</b> = 10000;</code></td>
272
<table class="detail wide_list">
274
<td class="itemcode"><a name="DefaultCreatureSoundImportance"></a><code><b>DefaultCreatureSoundImportance</b> = 1000;</code></td>
279
<table class="detail wide_list">
281
<td class="itemcode"><a name="MinorNonSpatialSoundImportance"></a><code><b>MinorNonSpatialSoundImportance</b> = 100;</code></td>
286
<h3 class="detail">Variables</h3>
287
<table class="detail wide_list">
289
<td class="itemcode"><a name="stPlayerInteractFailed"></a><code><b>stPlayerInteractFailed</b>:<a href="CastleSoundEngine.html#TSoundType">TSoundType</a>;</code></td>
296
<table class="detail wide_list">
298
<td class="itemcode"><a name="stPlayerPickItem"></a><code><b>stPlayerPickItem</b>:<a href="CastleSoundEngine.html#TSoundType">TSoundType</a>;</code></td>
305
<table class="detail wide_list">
307
<td class="itemcode"><a name="stPlayerDropItem"></a><code><b>stPlayerDropItem</b>:<a href="CastleSoundEngine.html#TSoundType">TSoundType</a>;</code></td>
314
<table class="detail wide_list">
316
<td class="itemcode"><a name="stPlayerSwimming"></a><code><b>stPlayerSwimming</b>:<a href="CastleSoundEngine.html#TSoundType">TSoundType</a>;</code></td>
323
<table class="detail wide_list">
325
<td class="itemcode"><a name="stPlayerDrowning"></a><code><b>stPlayerDrowning</b>:<a href="CastleSoundEngine.html#TSoundType">TSoundType</a>;</code></td>
332
<table class="detail wide_list">
334
<td class="itemcode"><a name="stPlayerFootstepsDefault"></a><code><b>stPlayerFootstepsDefault</b>:<a href="CastleSoundEngine.html#TSoundType">TSoundType</a>;</code></td>
341
<table class="detail wide_list">
343
<td class="itemcode"><a name="stPlayerToxicPain"></a><code><b>stPlayerToxicPain</b>:<a href="CastleSoundEngine.html#TSoundType">TSoundType</a>;</code></td>
350
<table class="detail wide_list">
352
<td class="itemcode"><a name="stPlayerSuddenPain"></a><code><b>stPlayerSuddenPain</b>:<a href="CastleSoundEngine.html#TSoundType">TSoundType</a>;</code></td>
359
<table class="detail wide_list">
361
<td class="itemcode"><a name="stPlayerDies"></a><code><b>stPlayerDies</b>:<a href="CastleSoundEngine.html#TSoundType">TSoundType</a>;</code></td>
368
<table class="detail wide_list">
370
<td class="itemcode"><a name="stPlayerSwimmingChange"></a><code><b>stPlayerSwimmingChange</b>:<a href="CastleSoundEngine.html#TSoundType">TSoundType</a>;</code></td>
377
<table class="detail wide_list">
379
<td class="itemcode"><a name="stMenuCurrentItemChanged"></a><code><b>stMenuCurrentItemChanged</b>:<a href="CastleSoundEngine.html#TSoundType">TSoundType</a>;</code></td>
383
Sounds used by <a class="normal" href="CastleOnScreenMenu.TCastleOnScreenMenu.html">TCastleOnScreenMenu</a>. </p>
386
<table class="detail wide_list">
388
<td class="itemcode"><a name="stMenuClick"></a><code><b>stMenuClick</b>:<a href="CastleSoundEngine.html#TSoundType">TSoundType</a>;</code></td>
392
Sounds used by <a class="normal" href="CastleOnScreenMenu.TCastleOnScreenMenu.html">TCastleOnScreenMenu</a>. </p>
395
<table class="detail wide_list">
397
<td class="itemcode"><a name="IgnoreAllMissingSounds"></a><code><b>IgnoreAllMissingSounds</b>: boolean;</code></td>
401
Should <a class="normal" href="CastleSoundEngine.TRepoSoundEngine.html#SoundFromName">TRepoSoundEngine.SoundFromName</a> ignore (return <a class="normal" href="CastleSoundEngine.html#stNone">stNone</a>) all missing sounds. This works like RaiseError parameter for <a class="normal" href="CastleSoundEngine.TRepoSoundEngine.html#SoundFromName">TRepoSoundEngine.SoundFromName</a> was <code>True</code>. It's a debug feature, useful if you load resources but don't really plan to play their sounds, don't depend on it in your games.</p>
404
<hr noshade size="1"><span class="appinfo"><em>Generated by <a href="http://pasdoc.sourceforge.net/">PasDoc 0.12.1</a> on 2013-02-04 20:26:52</em>
406
</td></tr></table></body></html>