blob: 6f82b103dbd4075e6d6a5b19cf3fbf044c2a1b52 (
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
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
|
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioServer" inherits="Object" category="Core" version="3.2">
<brief_description>
Server interface for low-level audio access.
</brief_description>
<description>
AudioServer is a low-level server interface for audio access. It is in charge of creating sample data (playable audio) as well as its playback via a voice interface.
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/audio/audio_buses.html</link>
</tutorials>
<methods>
<method name="add_bus">
<return type="void">
</return>
<argument index="0" name="at_position" type="int" default="-1">
</argument>
<description>
Adds a bus at [code]at_position[/code].
</description>
</method>
<method name="add_bus_effect">
<return type="void">
</return>
<argument index="0" name="bus_idx" type="int">
</argument>
<argument index="1" name="effect" type="AudioEffect">
</argument>
<argument index="2" name="at_position" type="int" default="-1">
</argument>
<description>
Adds an [AudioEffect] effect to the bus [code]bus_idx[/code] at [code]at_position[/code].
</description>
</method>
<method name="capture_get_device">
<return type="String">
</return>
<description>
</description>
</method>
<method name="capture_get_device_list">
<return type="Array">
</return>
<description>
Returns the names of all audio input devices detected on the system.
</description>
</method>
<method name="capture_set_device">
<return type="void">
</return>
<argument index="0" name="name" type="String">
</argument>
<description>
</description>
</method>
<method name="capture_start">
<return type="int" enum="Error">
</return>
<description>
Attempts to start recording from the audio driver's capture device. On success, the return value is [constant OK].
</description>
</method>
<method name="capture_stop">
<return type="int" enum="Error">
</return>
<description>
Attempts to stop recording from the audio driver's capture device. On success, the return value is [constant OK].
</description>
</method>
<method name="generate_bus_layout" qualifiers="const">
<return type="AudioBusLayout">
</return>
<description>
Generates an [AudioBusLayout] using the available buses and effects.
</description>
</method>
<method name="get_bus_channels" qualifiers="const">
<return type="int">
</return>
<argument index="0" name="bus_idx" type="int">
</argument>
<description>
Returns the amount of channels of the bus at index [code]bus_idx[/code].
</description>
</method>
<method name="get_bus_effect">
<return type="AudioEffect">
</return>
<argument index="0" name="bus_idx" type="int">
</argument>
<argument index="1" name="effect_idx" type="int">
</argument>
<description>
Returns the [AudioEffect] at position [code]effect_idx[/code] in bus [code]bus_idx[/code].
</description>
</method>
<method name="get_bus_effect_count">
<return type="int">
</return>
<argument index="0" name="bus_idx" type="int">
</argument>
<description>
Returns the number of effects on the bus at [code]bus_idx[/code].
</description>
</method>
<method name="get_bus_effect_instance">
<return type="AudioEffectInstance">
</return>
<argument index="0" name="bus_idx" type="int">
</argument>
<argument index="1" name="effect_idx" type="int">
</argument>
<argument index="2" name="channel" type="int" default="0">
</argument>
<description>
</description>
</method>
<method name="get_bus_index" qualifiers="const">
<return type="int">
</return>
<argument index="0" name="bus_name" type="String">
</argument>
<description>
Returns the index of the bus with the name [code]bus_name[/code].
</description>
</method>
<method name="get_bus_name" qualifiers="const">
<return type="String">
</return>
<argument index="0" name="bus_idx" type="int">
</argument>
<description>
Returns the name of the bus with the index [code]bus_idx[/code].
</description>
</method>
<method name="get_bus_peak_volume_left_db" qualifiers="const">
<return type="float">
</return>
<argument index="0" name="bus_idx" type="int">
</argument>
<argument index="1" name="channel" type="int">
</argument>
<description>
Returns the peak volume of the left speaker at bus index [code]bus_idx[/code] and channel index [code]channel[/code].
</description>
</method>
<method name="get_bus_peak_volume_right_db" qualifiers="const">
<return type="float">
</return>
<argument index="0" name="bus_idx" type="int">
</argument>
<argument index="1" name="channel" type="int">
</argument>
<description>
Returns the peak volume of the right speaker at bus index [code]bus_idx[/code] and channel index [code]channel[/code].
</description>
</method>
<method name="get_bus_send" qualifiers="const">
<return type="String">
</return>
<argument index="0" name="bus_idx" type="int">
</argument>
<description>
Returns the name of the bus that the bus at index [code]bus_idx[/code] sends to.
</description>
</method>
<method name="get_bus_volume_db" qualifiers="const">
<return type="float">
</return>
<argument index="0" name="bus_idx" type="int">
</argument>
<description>
Returns the volume of the bus at index [code]bus_idx[/code] in dB.
</description>
</method>
<method name="get_capture_buffer">
<return type="PoolIntArray">
</return>
<description>
Returns an [PoolIntArray] containing audio frames from the capture device.
</description>
</method>
<method name="get_capture_position">
<return type="int">
</return>
<description>
Returns the write position of the capture device buffer.
</description>
</method>
<method name="get_capture_size">
<return type="int">
</return>
<description>
Returns the size of the capture device buffer.
</description>
</method>
<method name="get_device_list">
<return type="Array">
</return>
<description>
Returns the names of all audio output devices detected on the system.
</description>
</method>
<method name="get_mix_rate" qualifiers="const">
<return type="float">
</return>
<description>
Returns the sample rate at the output of the [AudioServer].
</description>
</method>
<method name="get_output_latency" qualifiers="const">
<return type="float">
</return>
<description>
Returns the audio driver's output latency.
</description>
</method>
<method name="get_speaker_mode" qualifiers="const">
<return type="int" enum="AudioServer.SpeakerMode">
</return>
<description>
Returns the speaker configuration.
</description>
</method>
<method name="get_time_since_last_mix" qualifiers="const">
<return type="float">
</return>
<description>
</description>
</method>
<method name="get_time_to_next_mix" qualifiers="const">
<return type="float">
</return>
<description>
</description>
</method>
<method name="is_bus_bypassing_effects" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="bus_idx" type="int">
</argument>
<description>
If [code]true[/code], the bus at index [code]bus_idx[/code] is bypassing effects.
</description>
</method>
<method name="is_bus_effect_enabled" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="bus_idx" type="int">
</argument>
<argument index="1" name="effect_idx" type="int">
</argument>
<description>
If [code]true[/code], the effect at index [code]effect_idx[/code] on the bus at index [code]bus_idx[/code] is enabled.
</description>
</method>
<method name="is_bus_mute" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="bus_idx" type="int">
</argument>
<description>
If [code]true[/code], the bus at index [code]bus_idx[/code] is muted.
</description>
</method>
<method name="is_bus_solo" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="bus_idx" type="int">
</argument>
<description>
If [code]true[/code], the bus at index [code]bus_idx[/code] is in solo mode.
</description>
</method>
<method name="lock">
<return type="void">
</return>
<description>
Locks the audio driver's main loop. Remember to unlock it afterwards.
</description>
</method>
<method name="move_bus">
<return type="void">
</return>
<argument index="0" name="index" type="int">
</argument>
<argument index="1" name="to_index" type="int">
</argument>
<description>
Moves the bus from index [code]index[/code] to index [code]to_index[/code].
</description>
</method>
<method name="remove_bus">
<return type="void">
</return>
<argument index="0" name="index" type="int">
</argument>
<description>
Removes the bus at index [code]index[/code].
</description>
</method>
<method name="remove_bus_effect">
<return type="void">
</return>
<argument index="0" name="bus_idx" type="int">
</argument>
<argument index="1" name="effect_idx" type="int">
</argument>
<description>
Removes the effect at index [code]effect_idx[/code] from the bus at index [code]bus_idx[/code].
</description>
</method>
<method name="set_bus_bypass_effects">
<return type="void">
</return>
<argument index="0" name="bus_idx" type="int">
</argument>
<argument index="1" name="enable" type="bool">
</argument>
<description>
If [code]true[/code], the bus at index [code]bus_idx[/code] is bypassing effects.
</description>
</method>
<method name="set_bus_effect_enabled">
<return type="void">
</return>
<argument index="0" name="bus_idx" type="int">
</argument>
<argument index="1" name="effect_idx" type="int">
</argument>
<argument index="2" name="enabled" type="bool">
</argument>
<description>
If [code]true[/code], the effect at index [code]effect_idx[/code] on the bus at index [code]bus_idx[/code] is enabled.
</description>
</method>
<method name="set_bus_layout">
<return type="void">
</return>
<argument index="0" name="bus_layout" type="AudioBusLayout">
</argument>
<description>
Overwrites the currently used [AudioBusLayout].
</description>
</method>
<method name="set_bus_mute">
<return type="void">
</return>
<argument index="0" name="bus_idx" type="int">
</argument>
<argument index="1" name="enable" type="bool">
</argument>
<description>
If [code]true[/code], the bus at index [code]bus_idx[/code] is muted.
</description>
</method>
<method name="set_bus_name">
<return type="void">
</return>
<argument index="0" name="bus_idx" type="int">
</argument>
<argument index="1" name="name" type="String">
</argument>
<description>
Sets the name of the bus at index [code]bus_idx[/code] to [code]name[/code].
</description>
</method>
<method name="set_bus_send">
<return type="void">
</return>
<argument index="0" name="bus_idx" type="int">
</argument>
<argument index="1" name="send" type="String">
</argument>
<description>
Connects the output of the bus at [code]bus_idx[/code] to the bus named [code]send[/code].
</description>
</method>
<method name="set_bus_solo">
<return type="void">
</return>
<argument index="0" name="bus_idx" type="int">
</argument>
<argument index="1" name="enable" type="bool">
</argument>
<description>
If [code]true[/code], the bus at index [code]bus_idx[/code] is in solo mode.
</description>
</method>
<method name="set_bus_volume_db">
<return type="void">
</return>
<argument index="0" name="bus_idx" type="int">
</argument>
<argument index="1" name="volume_db" type="float">
</argument>
<description>
Sets the volume of the bus at index [code]bus_idx[/code] to [code]volume_db[/code].
</description>
</method>
<method name="swap_bus_effects">
<return type="void">
</return>
<argument index="0" name="bus_idx" type="int">
</argument>
<argument index="1" name="effect_idx" type="int">
</argument>
<argument index="2" name="by_effect_idx" type="int">
</argument>
<description>
Swaps the position of two effects in bus [code]bus_idx[/code].
</description>
</method>
<method name="unlock">
<return type="void">
</return>
<description>
Unlocks the audio driver's main loop. (After locking it, you should always unlock it.)
</description>
</method>
</methods>
<members>
<member name="bus_count" type="int" setter="set_bus_count" getter="get_bus_count" default="1">
Number of available audio buses.
</member>
<member name="device" type="String" setter="set_device" getter="get_device" default=""Default"">
Name of the current device for audio output (see [method get_device_list]).
</member>
<member name="capture_device" type="String" setter="capture_set_device" getter="capture_get_device" default=""Default"">
Name of the current device for audio input (see [method capture_get_device_list]).
</member>
<member name="global_rate_scale" type="float" setter="set_global_rate_scale" getter="get_global_rate_scale" default="1.0">
Scales the rate at which audio is played (i.e. setting it to [code]0.5[/code] will make the audio be played twice as fast).
</member>
</members>
<signals>
<signal name="bus_layout_changed">
<description>
Emitted when the [AudioBusLayout] changes.
</description>
</signal>
</signals>
<constants>
<constant name="SPEAKER_MODE_STEREO" value="0" enum="SpeakerMode">
Two or fewer speakers were detected.
</constant>
<constant name="SPEAKER_SURROUND_31" value="1" enum="SpeakerMode">
A 3.1 channel surround setup was detected.
</constant>
<constant name="SPEAKER_SURROUND_51" value="2" enum="SpeakerMode">
A 5.1 channel surround setup was detected.
</constant>
<constant name="SPEAKER_SURROUND_71" value="3" enum="SpeakerMode">
A 7.1 channel surround setup was detected.
</constant>
</constants>
</class>
|