summaryrefslogtreecommitdiff
path: root/doc/classes/AudioStreamPlayer3D.xml
blob: 9c016a0173dee25377e965d78b12cbe1bf2ba4e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioStreamPlayer3D" inherits="Spatial" category="Core" version="3.0-alpha">
	<brief_description>
		Plays 3D sound in 3D space
	</brief_description>
	<description>
		Plays a sound effect with directed sound effects, dampens with distance if needed, generates effect of hearable position in space.
	</description>
	<tutorials>
		http://docs.godotengine.org/en/latest/learning/features/audio/index.html
	</tutorials>
	<demos>
	</demos>
	<methods>
		<method name="get_area_mask" qualifiers="const">
			<return type="int">
			</return>
			<description>
			</description>
		</method>
		<method name="get_attenuation_filter_cutoff_hz" qualifiers="const">
			<return type="float">
			</return>
			<description>
			</description>
		</method>
		<method name="get_attenuation_filter_db" qualifiers="const">
			<return type="float">
			</return>
			<description>
			</description>
		</method>
		<method name="get_attenuation_model" qualifiers="const">
			<return type="int" enum="AudioStreamPlayer3D.AttenuationModel">
			</return>
			<description>
			</description>
		</method>
		<method name="get_bus" qualifiers="const">
			<return type="String">
			</return>
			<description>
			</description>
		</method>
		<method name="get_doppler_tracking" qualifiers="const">
			<return type="int" enum="AudioStreamPlayer3D.DopplerTracking">
			</return>
			<description>
			</description>
		</method>
		<method name="get_emission_angle" qualifiers="const">
			<return type="float">
			</return>
			<description>
			</description>
		</method>
		<method name="get_emission_angle_filter_attenuation_db" qualifiers="const">
			<return type="float">
			</return>
			<description>
			</description>
		</method>
		<method name="get_max_db" qualifiers="const">
			<return type="float">
			</return>
			<description>
			</description>
		</method>
		<method name="get_max_distance" qualifiers="const">
			<return type="float">
			</return>
			<description>
			</description>
		</method>
		<method name="get_out_of_range_mode" qualifiers="const">
			<return type="int" enum="AudioStreamPlayer3D.OutOfRangeMode">
			</return>
			<description>
			</description>
		</method>
		<method name="get_playback_position">
			<return type="float">
			</return>
			<description>
				Returns the position in the [AudioStream].
			</description>
		</method>
		<method name="get_stream" qualifiers="const">
			<return type="AudioStream">
			</return>
			<description>
			</description>
		</method>
		<method name="get_unit_db" qualifiers="const">
			<return type="float">
			</return>
			<description>
			</description>
		</method>
		<method name="get_unit_size" qualifiers="const">
			<return type="float">
			</return>
			<description>
			</description>
		</method>
		<method name="is_autoplay_enabled">
			<return type="bool">
			</return>
			<description>
			</description>
		</method>
		<method name="is_emission_angle_enabled" qualifiers="const">
			<return type="bool">
			</return>
			<description>
			</description>
		</method>
		<method name="is_playing" qualifiers="const">
			<return type="bool">
			</return>
			<description>
			</description>
		</method>
		<method name="play">
			<return type="void">
			</return>
			<argument index="0" name="from_position" type="float" default="0.0">
			</argument>
			<description>
				Plays the audio from the given position 'from_position', in seconds.
			</description>
		</method>
		<method name="seek">
			<return type="void">
			</return>
			<argument index="0" name="to_position" type="float">
			</argument>
			<description>
				Sets the position from which audio will be played, in seconds.
			</description>
		</method>
		<method name="set_area_mask">
			<return type="void">
			</return>
			<argument index="0" name="mask" type="int">
			</argument>
			<description>
			</description>
		</method>
		<method name="set_attenuation_filter_cutoff_hz">
			<return type="void">
			</return>
			<argument index="0" name="degrees" type="float">
			</argument>
			<description>
			</description>
		</method>
		<method name="set_attenuation_filter_db">
			<return type="void">
			</return>
			<argument index="0" name="db" type="float">
			</argument>
			<description>
			</description>
		</method>
		<method name="set_attenuation_model">
			<return type="void">
			</return>
			<argument index="0" name="model" type="int" enum="AudioStreamPlayer3D.AttenuationModel">
			</argument>
			<description>
			</description>
		</method>
		<method name="set_autoplay">
			<return type="void">
			</return>
			<argument index="0" name="enable" type="bool">
			</argument>
			<description>
			</description>
		</method>
		<method name="set_bus">
			<return type="void">
			</return>
			<argument index="0" name="bus" type="String">
			</argument>
			<description>
			</description>
		</method>
		<method name="set_doppler_tracking">
			<return type="void">
			</return>
			<argument index="0" name="mode" type="int" enum="AudioStreamPlayer3D.DopplerTracking">
			</argument>
			<description>
			</description>
		</method>
		<method name="set_emission_angle">
			<return type="void">
			</return>
			<argument index="0" name="degrees" type="float">
			</argument>
			<description>
			</description>
		</method>
		<method name="set_emission_angle_enabled">
			<return type="void">
			</return>
			<argument index="0" name="enabled" type="bool">
			</argument>
			<description>
			</description>
		</method>
		<method name="set_emission_angle_filter_attenuation_db">
			<return type="void">
			</return>
			<argument index="0" name="db" type="float">
			</argument>
			<description>
			</description>
		</method>
		<method name="set_max_db">
			<return type="void">
			</return>
			<argument index="0" name="max_db" type="float">
			</argument>
			<description>
			</description>
		</method>
		<method name="set_max_distance">
			<return type="void">
			</return>
			<argument index="0" name="metres" type="float">
			</argument>
			<description>
			</description>
		</method>
		<method name="set_out_of_range_mode">
			<return type="void">
			</return>
			<argument index="0" name="mode" type="int" enum="AudioStreamPlayer3D.OutOfRangeMode">
			</argument>
			<description>
			</description>
		</method>
		<method name="set_stream">
			<return type="void">
			</return>
			<argument index="0" name="stream" type="AudioStream">
			</argument>
			<description>
			</description>
		</method>
		<method name="set_unit_db">
			<return type="void">
			</return>
			<argument index="0" name="unit_db" type="float">
			</argument>
			<description>
			</description>
		</method>
		<method name="set_unit_size">
			<return type="void">
			</return>
			<argument index="0" name="unit_size" type="float">
			</argument>
			<description>
			</description>
		</method>
		<method name="stop">
			<return type="void">
			</return>
			<description>
				Stops the audio.
			</description>
		</method>
	</methods>
	<members>
		<member name="area_mask" type="int" setter="set_area_mask" getter="get_area_mask">
			Areas in which this sound plays.
		</member>
		<member name="attenuation_filter_cutoff_hz" type="float" setter="set_attenuation_filter_cutoff_hz" getter="get_attenuation_filter_cutoff_hz">
			Dampens audio above this frequency, in Hz.
		</member>
		<member name="attenuation_filter_db" type="float" setter="set_attenuation_filter_db" getter="get_attenuation_filter_db">
			Amount how much the filter affects the loudness, in dB.
		</member>
		<member name="attenuation_model" type="int" setter="set_attenuation_model" getter="get_attenuation_model" enum="AudioStreamPlayer3D.AttenuationModel">
			Decides if audio should get quieter with distance linearly, quadratically or logarithmically.
		</member>
		<member name="autoplay" type="bool" setter="set_autoplay" getter="is_autoplay_enabled">
			If [code]true[/code] audio plays when added to scene tree. Default value: [code]false[/code].
		</member>
		<member name="bus" type="String" setter="set_bus" getter="get_bus">
			Bus on which this audio is playing.
		</member>
		<member name="doppler_tracking" type="int" setter="set_doppler_tracking" getter="get_doppler_tracking" enum="AudioStreamPlayer3D.DopplerTracking">
			Decides in which step the Doppler effect should be calculated.
		</member>
		<member name="emission_angle_degrees" type="float" setter="set_emission_angle" getter="get_emission_angle">
			The angle in which the audio reaches cameras undampened.
		</member>
		<member name="emission_angle_enabled" type="bool" setter="set_emission_angle_enabled" getter="is_emission_angle_enabled">
			If [code]true[/code] the audio should be dampened according to the direction of the sound.
		</member>
		<member name="emission_angle_filter_attenuation_db" type="float" setter="set_emission_angle_filter_attenuation_db" getter="get_emission_angle_filter_attenuation_db">
			dampens audio if camera is outside of 'emission_angle_degrees' and 'emission_angle_enabled' is set by this factor, in dB.
		</member>
		<member name="max_db" type="float" setter="set_max_db" getter="get_max_db">
			Sets the absolute maximum of the soundlevel, in dB.
		</member>
		<member name="max_distance" type="float" setter="set_max_distance" getter="get_max_distance">
			Sets the distance from which the 'out_of_range_mode' takes effect. Has no effect if set to 0.
		</member>
		<member name="out_of_range_mode" type="int" setter="set_out_of_range_mode" getter="get_out_of_range_mode" enum="AudioStreamPlayer3D.OutOfRangeMode">
			Decides if audio should pause when source is outside of 'max_distance' range.
		</member>
		<member name="playing" type="bool" setter="_set_playing" getter="is_playing">
			If [code]true[/code], audio is playing.
		</member>
		<member name="stream" type="AudioStream" setter="set_stream" getter="get_stream">
			The [AudioStream] object to be played.
		</member>
		<member name="unit_db" type="float" setter="set_unit_db" getter="get_unit_db">
			Base sound level unaffected by dampening, in dB.
		</member>
		<member name="unit_size" type="float" setter="set_unit_size" getter="get_unit_size">
			Factor for the attenuation effect.
		</member>
	</members>
	<signals>
		<signal name="finished">
			<description>
				Fires when the audio stops playing.
			</description>
		</signal>
	</signals>
	<constants>
		<constant name="ATTENUATION_INVERSE_DISTANCE" value="0">
			Linear dampening of loudness according to distance.
		</constant>
		<constant name="ATTENUATION_INVERSE_SQUARE_DISTANCE" value="1">
			Squared dampening of loudness according to distance.
		</constant>
		<constant name="ATTENUATION_LOGARITHMIC" value="2">
			Logarithmic dampening of loudness according to distance.
		</constant>
		<constant name="OUT_OF_RANGE_MIX" value="0">
			Mix this audio in, even when it's out of range.
		</constant>
		<constant name="OUT_OF_RANGE_PAUSE" value="1">
			Pause this audio when it gets out of range.
		</constant>
		<constant name="DOPPLER_TRACKING_DISABLED" value="0">
			Disables doppler tracking.
		</constant>
		<constant name="DOPPLER_TRACKING_IDLE_STEP" value="1">
			Executes doppler tracking in idle step.
		</constant>
		<constant name="DOPPLER_TRACKING_PHYSICS_STEP" value="2">
			Executes doppler tracking in physics step.
		</constant>
	</constants>
</class>