pandemonium_engine_docs/classes/class_audioserver.rst

538 lines
33 KiB
ReStructuredText
Raw Normal View History

:github_url: hide
.. DO NOT EDIT THIS FILE!!!
.. Generated automatically from Godot engine sources.
.. Generator: https://github.com/godotengine/godot/tree/3.5/doc/tools/make_rst.py.
.. XML source: https://github.com/godotengine/godot/tree/3.5/doc/classes/AudioServer.xml.
.. _class_AudioServer:
AudioServer
===========
**Inherits:** :ref:`Object<class_Object>`
Server interface for low-level audio access.
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.
Tutorials
---------
- :doc:`Audio buses <../tutorials/audio/audio_buses>`
- `Audio Device Changer Demo <https://godotengine.org/asset-library/asset/525>`__
- `Audio Mic Record Demo <https://godotengine.org/asset-library/asset/527>`__
- `Audio Spectrum Demo <https://godotengine.org/asset-library/asset/528>`__
Properties
----------
+-----------------------------+------------------------------------------------------------------------+---------------+
| :ref:`int<class_int>` | :ref:`bus_count<class_AudioServer_property_bus_count>` | ``1`` |
+-----------------------------+------------------------------------------------------------------------+---------------+
| :ref:`String<class_String>` | :ref:`capture_device<class_AudioServer_property_capture_device>` | ``"Default"`` |
+-----------------------------+------------------------------------------------------------------------+---------------+
| :ref:`String<class_String>` | :ref:`device<class_AudioServer_property_device>` | ``"Default"`` |
+-----------------------------+------------------------------------------------------------------------+---------------+
| :ref:`float<class_float>` | :ref:`global_rate_scale<class_AudioServer_property_global_rate_scale>` | ``1.0`` |
+-----------------------------+------------------------------------------------------------------------+---------------+
Methods
-------
+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`add_bus<class_AudioServer_method_add_bus>` **(** :ref:`int<class_int>` at_position=-1 **)** |
+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`add_bus_effect<class_AudioServer_method_add_bus_effect>` **(** :ref:`int<class_int>` bus_idx, :ref:`AudioEffect<class_AudioEffect>` effect, :ref:`int<class_int>` at_position=-1 **)** |
+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Array<class_Array>` | :ref:`capture_get_device_list<class_AudioServer_method_capture_get_device_list>` **(** **)** |
+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`AudioBusLayout<class_AudioBusLayout>` | :ref:`generate_bus_layout<class_AudioServer_method_generate_bus_layout>` **(** **)** |const| |
+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_bus_channels<class_AudioServer_method_get_bus_channels>` **(** :ref:`int<class_int>` bus_idx **)** |const| |
+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`AudioEffect<class_AudioEffect>` | :ref:`get_bus_effect<class_AudioServer_method_get_bus_effect>` **(** :ref:`int<class_int>` bus_idx, :ref:`int<class_int>` effect_idx **)** |
+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_bus_effect_count<class_AudioServer_method_get_bus_effect_count>` **(** :ref:`int<class_int>` bus_idx **)** |
+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`AudioEffectInstance<class_AudioEffectInstance>` | :ref:`get_bus_effect_instance<class_AudioServer_method_get_bus_effect_instance>` **(** :ref:`int<class_int>` bus_idx, :ref:`int<class_int>` effect_idx, :ref:`int<class_int>` channel=0 **)** |
+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_bus_index<class_AudioServer_method_get_bus_index>` **(** :ref:`String<class_String>` bus_name **)** |const| |
+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`String<class_String>` | :ref:`get_bus_name<class_AudioServer_method_get_bus_name>` **(** :ref:`int<class_int>` bus_idx **)** |const| |
+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`get_bus_peak_volume_left_db<class_AudioServer_method_get_bus_peak_volume_left_db>` **(** :ref:`int<class_int>` bus_idx, :ref:`int<class_int>` channel **)** |const| |
+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`get_bus_peak_volume_right_db<class_AudioServer_method_get_bus_peak_volume_right_db>` **(** :ref:`int<class_int>` bus_idx, :ref:`int<class_int>` channel **)** |const| |
+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`String<class_String>` | :ref:`get_bus_send<class_AudioServer_method_get_bus_send>` **(** :ref:`int<class_int>` bus_idx **)** |const| |
+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`get_bus_volume_db<class_AudioServer_method_get_bus_volume_db>` **(** :ref:`int<class_int>` bus_idx **)** |const| |
+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Array<class_Array>` | :ref:`get_device_list<class_AudioServer_method_get_device_list>` **(** **)** |
+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`get_mix_rate<class_AudioServer_method_get_mix_rate>` **(** **)** |const| |
+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`get_output_latency<class_AudioServer_method_get_output_latency>` **(** **)** |const| |
+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`SpeakerMode<enum_AudioServer_SpeakerMode>` | :ref:`get_speaker_mode<class_AudioServer_method_get_speaker_mode>` **(** **)** |const| |
+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`get_time_since_last_mix<class_AudioServer_method_get_time_since_last_mix>` **(** **)** |const| |
+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`get_time_to_next_mix<class_AudioServer_method_get_time_to_next_mix>` **(** **)** |const| |
+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`is_bus_bypassing_effects<class_AudioServer_method_is_bus_bypassing_effects>` **(** :ref:`int<class_int>` bus_idx **)** |const| |
+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`is_bus_effect_enabled<class_AudioServer_method_is_bus_effect_enabled>` **(** :ref:`int<class_int>` bus_idx, :ref:`int<class_int>` effect_idx **)** |const| |
+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`is_bus_mute<class_AudioServer_method_is_bus_mute>` **(** :ref:`int<class_int>` bus_idx **)** |const| |
+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`is_bus_solo<class_AudioServer_method_is_bus_solo>` **(** :ref:`int<class_int>` bus_idx **)** |const| |
+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`lock<class_AudioServer_method_lock>` **(** **)** |
+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`move_bus<class_AudioServer_method_move_bus>` **(** :ref:`int<class_int>` index, :ref:`int<class_int>` to_index **)** |
+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`remove_bus<class_AudioServer_method_remove_bus>` **(** :ref:`int<class_int>` index **)** |
+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`remove_bus_effect<class_AudioServer_method_remove_bus_effect>` **(** :ref:`int<class_int>` bus_idx, :ref:`int<class_int>` effect_idx **)** |
+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_bus_bypass_effects<class_AudioServer_method_set_bus_bypass_effects>` **(** :ref:`int<class_int>` bus_idx, :ref:`bool<class_bool>` enable **)** |
+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_bus_effect_enabled<class_AudioServer_method_set_bus_effect_enabled>` **(** :ref:`int<class_int>` bus_idx, :ref:`int<class_int>` effect_idx, :ref:`bool<class_bool>` enabled **)** |
+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_bus_layout<class_AudioServer_method_set_bus_layout>` **(** :ref:`AudioBusLayout<class_AudioBusLayout>` bus_layout **)** |
+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_bus_mute<class_AudioServer_method_set_bus_mute>` **(** :ref:`int<class_int>` bus_idx, :ref:`bool<class_bool>` enable **)** |
+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_bus_name<class_AudioServer_method_set_bus_name>` **(** :ref:`int<class_int>` bus_idx, :ref:`String<class_String>` name **)** |
+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_bus_send<class_AudioServer_method_set_bus_send>` **(** :ref:`int<class_int>` bus_idx, :ref:`String<class_String>` send **)** |
+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_bus_solo<class_AudioServer_method_set_bus_solo>` **(** :ref:`int<class_int>` bus_idx, :ref:`bool<class_bool>` enable **)** |
+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_bus_volume_db<class_AudioServer_method_set_bus_volume_db>` **(** :ref:`int<class_int>` bus_idx, :ref:`float<class_float>` volume_db **)** |
+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`swap_bus_effects<class_AudioServer_method_swap_bus_effects>` **(** :ref:`int<class_int>` bus_idx, :ref:`int<class_int>` effect_idx, :ref:`int<class_int>` by_effect_idx **)** |
+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`unlock<class_AudioServer_method_unlock>` **(** **)** |
+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
Signals
-------
.. _class_AudioServer_signal_bus_layout_changed:
- **bus_layout_changed** **(** **)**
Emitted when the :ref:`AudioBusLayout<class_AudioBusLayout>` changes.
Enumerations
------------
.. _enum_AudioServer_SpeakerMode:
.. _class_AudioServer_constant_SPEAKER_MODE_STEREO:
.. _class_AudioServer_constant_SPEAKER_SURROUND_31:
.. _class_AudioServer_constant_SPEAKER_SURROUND_51:
.. _class_AudioServer_constant_SPEAKER_SURROUND_71:
enum **SpeakerMode**:
- **SPEAKER_MODE_STEREO** = **0** --- Two or fewer speakers were detected.
- **SPEAKER_SURROUND_31** = **1** --- A 3.1 channel surround setup was detected.
- **SPEAKER_SURROUND_51** = **2** --- A 5.1 channel surround setup was detected.
- **SPEAKER_SURROUND_71** = **3** --- A 7.1 channel surround setup was detected.
Property Descriptions
---------------------
.. _class_AudioServer_property_bus_count:
- :ref:`int<class_int>` **bus_count**
+-----------+----------------------+
| *Default* | ``1`` |
+-----------+----------------------+
| *Setter* | set_bus_count(value) |
+-----------+----------------------+
| *Getter* | get_bus_count() |
+-----------+----------------------+
Number of available audio buses.
----
.. _class_AudioServer_property_capture_device:
- :ref:`String<class_String>` **capture_device**
+-----------+---------------------------+
| *Default* | ``"Default"`` |
+-----------+---------------------------+
| *Setter* | capture_set_device(value) |
+-----------+---------------------------+
| *Getter* | capture_get_device() |
+-----------+---------------------------+
Name of the current device for audio input (see :ref:`capture_get_device_list<class_AudioServer_method_capture_get_device_list>`). On systems with multiple audio inputs (such as analog, USB and HDMI audio), this can be used to select the audio input device. The value ``"Default"`` will record audio on the system-wide default audio input. If an invalid device name is set, the value will be reverted back to ``"Default"``.
\ **Note:** :ref:`ProjectSettings.audio/enable_audio_input<class_ProjectSettings_property_audio/enable_audio_input>` must be ``true`` for audio input to work. See also that setting's description for caveats related to permissions and operating system privacy settings.
----
.. _class_AudioServer_property_device:
- :ref:`String<class_String>` **device**
+-----------+-------------------+
| *Default* | ``"Default"`` |
+-----------+-------------------+
| *Setter* | set_device(value) |
+-----------+-------------------+
| *Getter* | get_device() |
+-----------+-------------------+
Name of the current device for audio output (see :ref:`get_device_list<class_AudioServer_method_get_device_list>`). On systems with multiple audio outputs (such as analog, USB and HDMI audio), this can be used to select the audio output device. The value ``"Default"`` will play audio on the system-wide default audio output. If an invalid device name is set, the value will be reverted back to ``"Default"``.
----
.. _class_AudioServer_property_global_rate_scale:
- :ref:`float<class_float>` **global_rate_scale**
+-----------+------------------------------+
| *Default* | ``1.0`` |
+-----------+------------------------------+
| *Setter* | set_global_rate_scale(value) |
+-----------+------------------------------+
| *Getter* | get_global_rate_scale() |
+-----------+------------------------------+
Scales the rate at which audio is played (i.e. setting it to ``0.5`` will make the audio be played twice as fast).
Method Descriptions
-------------------
.. _class_AudioServer_method_add_bus:
- void **add_bus** **(** :ref:`int<class_int>` at_position=-1 **)**
Adds a bus at ``at_position``.
----
.. _class_AudioServer_method_add_bus_effect:
- void **add_bus_effect** **(** :ref:`int<class_int>` bus_idx, :ref:`AudioEffect<class_AudioEffect>` effect, :ref:`int<class_int>` at_position=-1 **)**
Adds an :ref:`AudioEffect<class_AudioEffect>` effect to the bus ``bus_idx`` at ``at_position``.
----
.. _class_AudioServer_method_capture_get_device_list:
- :ref:`Array<class_Array>` **capture_get_device_list** **(** **)**
Returns the names of all audio input devices detected on the system.
\ **Note:** :ref:`ProjectSettings.audio/enable_audio_input<class_ProjectSettings_property_audio/enable_audio_input>` must be ``true`` for audio input to work. See also that setting's description for caveats related to permissions and operating system privacy settings.
----
.. _class_AudioServer_method_generate_bus_layout:
- :ref:`AudioBusLayout<class_AudioBusLayout>` **generate_bus_layout** **(** **)** |const|
Generates an :ref:`AudioBusLayout<class_AudioBusLayout>` using the available buses and effects.
----
.. _class_AudioServer_method_get_bus_channels:
- :ref:`int<class_int>` **get_bus_channels** **(** :ref:`int<class_int>` bus_idx **)** |const|
Returns the amount of channels of the bus at index ``bus_idx``.
----
.. _class_AudioServer_method_get_bus_effect:
- :ref:`AudioEffect<class_AudioEffect>` **get_bus_effect** **(** :ref:`int<class_int>` bus_idx, :ref:`int<class_int>` effect_idx **)**
Returns the :ref:`AudioEffect<class_AudioEffect>` at position ``effect_idx`` in bus ``bus_idx``.
----
.. _class_AudioServer_method_get_bus_effect_count:
- :ref:`int<class_int>` **get_bus_effect_count** **(** :ref:`int<class_int>` bus_idx **)**
Returns the number of effects on the bus at ``bus_idx``.
----
.. _class_AudioServer_method_get_bus_effect_instance:
- :ref:`AudioEffectInstance<class_AudioEffectInstance>` **get_bus_effect_instance** **(** :ref:`int<class_int>` bus_idx, :ref:`int<class_int>` effect_idx, :ref:`int<class_int>` channel=0 **)**
Returns the :ref:`AudioEffectInstance<class_AudioEffectInstance>` assigned to the given bus and effect indices (and optionally channel).
----
.. _class_AudioServer_method_get_bus_index:
- :ref:`int<class_int>` **get_bus_index** **(** :ref:`String<class_String>` bus_name **)** |const|
Returns the index of the bus with the name ``bus_name``.
----
.. _class_AudioServer_method_get_bus_name:
- :ref:`String<class_String>` **get_bus_name** **(** :ref:`int<class_int>` bus_idx **)** |const|
Returns the name of the bus with the index ``bus_idx``.
----
.. _class_AudioServer_method_get_bus_peak_volume_left_db:
- :ref:`float<class_float>` **get_bus_peak_volume_left_db** **(** :ref:`int<class_int>` bus_idx, :ref:`int<class_int>` channel **)** |const|
Returns the peak volume of the left speaker at bus index ``bus_idx`` and channel index ``channel``.
----
.. _class_AudioServer_method_get_bus_peak_volume_right_db:
- :ref:`float<class_float>` **get_bus_peak_volume_right_db** **(** :ref:`int<class_int>` bus_idx, :ref:`int<class_int>` channel **)** |const|
Returns the peak volume of the right speaker at bus index ``bus_idx`` and channel index ``channel``.
----
.. _class_AudioServer_method_get_bus_send:
- :ref:`String<class_String>` **get_bus_send** **(** :ref:`int<class_int>` bus_idx **)** |const|
Returns the name of the bus that the bus at index ``bus_idx`` sends to.
----
.. _class_AudioServer_method_get_bus_volume_db:
- :ref:`float<class_float>` **get_bus_volume_db** **(** :ref:`int<class_int>` bus_idx **)** |const|
Returns the volume of the bus at index ``bus_idx`` in dB.
----
.. _class_AudioServer_method_get_device_list:
- :ref:`Array<class_Array>` **get_device_list** **(** **)**
Returns the names of all audio devices detected on the system.
----
.. _class_AudioServer_method_get_mix_rate:
- :ref:`float<class_float>` **get_mix_rate** **(** **)** |const|
Returns the sample rate at the output of the ``AudioServer``.
----
.. _class_AudioServer_method_get_output_latency:
- :ref:`float<class_float>` **get_output_latency** **(** **)** |const|
Returns the audio driver's output latency.
----
.. _class_AudioServer_method_get_speaker_mode:
- :ref:`SpeakerMode<enum_AudioServer_SpeakerMode>` **get_speaker_mode** **(** **)** |const|
Returns the speaker configuration.
----
.. _class_AudioServer_method_get_time_since_last_mix:
- :ref:`float<class_float>` **get_time_since_last_mix** **(** **)** |const|
Returns the relative time since the last mix occurred.
----
.. _class_AudioServer_method_get_time_to_next_mix:
- :ref:`float<class_float>` **get_time_to_next_mix** **(** **)** |const|
Returns the relative time until the next mix occurs.
----
.. _class_AudioServer_method_is_bus_bypassing_effects:
- :ref:`bool<class_bool>` **is_bus_bypassing_effects** **(** :ref:`int<class_int>` bus_idx **)** |const|
If ``true``, the bus at index ``bus_idx`` is bypassing effects.
----
.. _class_AudioServer_method_is_bus_effect_enabled:
- :ref:`bool<class_bool>` **is_bus_effect_enabled** **(** :ref:`int<class_int>` bus_idx, :ref:`int<class_int>` effect_idx **)** |const|
If ``true``, the effect at index ``effect_idx`` on the bus at index ``bus_idx`` is enabled.
----
.. _class_AudioServer_method_is_bus_mute:
- :ref:`bool<class_bool>` **is_bus_mute** **(** :ref:`int<class_int>` bus_idx **)** |const|
If ``true``, the bus at index ``bus_idx`` is muted.
----
.. _class_AudioServer_method_is_bus_solo:
- :ref:`bool<class_bool>` **is_bus_solo** **(** :ref:`int<class_int>` bus_idx **)** |const|
If ``true``, the bus at index ``bus_idx`` is in solo mode.
----
.. _class_AudioServer_method_lock:
- void **lock** **(** **)**
Locks the audio driver's main loop.
\ **Note:** Remember to unlock it afterwards.
----
.. _class_AudioServer_method_move_bus:
- void **move_bus** **(** :ref:`int<class_int>` index, :ref:`int<class_int>` to_index **)**
Moves the bus from index ``index`` to index ``to_index``.
----
.. _class_AudioServer_method_remove_bus:
- void **remove_bus** **(** :ref:`int<class_int>` index **)**
Removes the bus at index ``index``.
----
.. _class_AudioServer_method_remove_bus_effect:
- void **remove_bus_effect** **(** :ref:`int<class_int>` bus_idx, :ref:`int<class_int>` effect_idx **)**
Removes the effect at index ``effect_idx`` from the bus at index ``bus_idx``.
----
.. _class_AudioServer_method_set_bus_bypass_effects:
- void **set_bus_bypass_effects** **(** :ref:`int<class_int>` bus_idx, :ref:`bool<class_bool>` enable **)**
If ``true``, the bus at index ``bus_idx`` is bypassing effects.
----
.. _class_AudioServer_method_set_bus_effect_enabled:
- void **set_bus_effect_enabled** **(** :ref:`int<class_int>` bus_idx, :ref:`int<class_int>` effect_idx, :ref:`bool<class_bool>` enabled **)**
If ``true``, the effect at index ``effect_idx`` on the bus at index ``bus_idx`` is enabled.
----
.. _class_AudioServer_method_set_bus_layout:
- void **set_bus_layout** **(** :ref:`AudioBusLayout<class_AudioBusLayout>` bus_layout **)**
Overwrites the currently used :ref:`AudioBusLayout<class_AudioBusLayout>`.
----
.. _class_AudioServer_method_set_bus_mute:
- void **set_bus_mute** **(** :ref:`int<class_int>` bus_idx, :ref:`bool<class_bool>` enable **)**
If ``true``, the bus at index ``bus_idx`` is muted.
----
.. _class_AudioServer_method_set_bus_name:
- void **set_bus_name** **(** :ref:`int<class_int>` bus_idx, :ref:`String<class_String>` name **)**
Sets the name of the bus at index ``bus_idx`` to ``name``.
----
.. _class_AudioServer_method_set_bus_send:
- void **set_bus_send** **(** :ref:`int<class_int>` bus_idx, :ref:`String<class_String>` send **)**
Connects the output of the bus at ``bus_idx`` to the bus named ``send``.
----
.. _class_AudioServer_method_set_bus_solo:
- void **set_bus_solo** **(** :ref:`int<class_int>` bus_idx, :ref:`bool<class_bool>` enable **)**
If ``true``, the bus at index ``bus_idx`` is in solo mode.
----
.. _class_AudioServer_method_set_bus_volume_db:
- void **set_bus_volume_db** **(** :ref:`int<class_int>` bus_idx, :ref:`float<class_float>` volume_db **)**
Sets the volume of the bus at index ``bus_idx`` to ``volume_db``.
----
.. _class_AudioServer_method_swap_bus_effects:
- void **swap_bus_effects** **(** :ref:`int<class_int>` bus_idx, :ref:`int<class_int>` effect_idx, :ref:`int<class_int>` by_effect_idx **)**
Swaps the position of two effects in bus ``bus_idx``.
----
.. _class_AudioServer_method_unlock:
- void **unlock** **(** **)**
Unlocks the audio driver's main loop. (After locking it, you should always unlock it.)
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`