2
0

class_audioserver.rst 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/AudioServer.xml.
  6. .. _class_AudioServer:
  7. AudioServer
  8. ===========
  9. **Inherits:** :ref:`Object<class_Object>`
  10. Server interface for low-level audio access.
  11. Description
  12. -----------
  13. ``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.
  14. Tutorials
  15. ---------
  16. - :doc:`Audio buses <../tutorials/audio/audio_buses>`
  17. - `Audio Device Changer Demo <https://godotengine.org/asset-library/asset/525>`__
  18. - `Audio Mic Record Demo <https://godotengine.org/asset-library/asset/527>`__
  19. - `Audio Spectrum Demo <https://godotengine.org/asset-library/asset/528>`__
  20. Properties
  21. ----------
  22. +-----------------------------+------------------------------------------------------------------------------+---------------+
  23. | :ref:`int<class_int>` | :ref:`bus_count<class_AudioServer_property_bus_count>` | ``1`` |
  24. +-----------------------------+------------------------------------------------------------------------------+---------------+
  25. | :ref:`String<class_String>` | :ref:`capture_device<class_AudioServer_property_capture_device>` | ``"Default"`` |
  26. +-----------------------------+------------------------------------------------------------------------------+---------------+
  27. | :ref:`String<class_String>` | :ref:`device<class_AudioServer_property_device>` | ``"Default"`` |
  28. +-----------------------------+------------------------------------------------------------------------------+---------------+
  29. | :ref:`float<class_float>` | :ref:`playback_speed_scale<class_AudioServer_property_playback_speed_scale>` | ``1.0`` |
  30. +-----------------------------+------------------------------------------------------------------------------+---------------+
  31. Methods
  32. -------
  33. +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  34. | void | :ref:`add_bus<class_AudioServer_method_add_bus>` **(** :ref:`int<class_int>` at_position=-1 **)** |
  35. +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  36. | 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 **)** |
  37. +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  38. | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`capture_get_device_list<class_AudioServer_method_capture_get_device_list>` **(** **)** |
  39. +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  40. | :ref:`AudioBusLayout<class_AudioBusLayout>` | :ref:`generate_bus_layout<class_AudioServer_method_generate_bus_layout>` **(** **)** |const| |
  41. +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  42. | :ref:`int<class_int>` | :ref:`get_bus_channels<class_AudioServer_method_get_bus_channels>` **(** :ref:`int<class_int>` bus_idx **)** |const| |
  43. +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  44. | :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 **)** |
  45. +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  46. | :ref:`int<class_int>` | :ref:`get_bus_effect_count<class_AudioServer_method_get_bus_effect_count>` **(** :ref:`int<class_int>` bus_idx **)** |
  47. +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  48. | :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 **)** |
  49. +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  50. | :ref:`int<class_int>` | :ref:`get_bus_index<class_AudioServer_method_get_bus_index>` **(** :ref:`StringName<class_StringName>` bus_name **)** |const| |
  51. +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  52. | :ref:`String<class_String>` | :ref:`get_bus_name<class_AudioServer_method_get_bus_name>` **(** :ref:`int<class_int>` bus_idx **)** |const| |
  53. +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  54. | :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| |
  55. +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  56. | :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| |
  57. +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  58. | :ref:`StringName<class_StringName>` | :ref:`get_bus_send<class_AudioServer_method_get_bus_send>` **(** :ref:`int<class_int>` bus_idx **)** |const| |
  59. +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  60. | :ref:`float<class_float>` | :ref:`get_bus_volume_db<class_AudioServer_method_get_bus_volume_db>` **(** :ref:`int<class_int>` bus_idx **)** |const| |
  61. +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  62. | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_device_list<class_AudioServer_method_get_device_list>` **(** **)** |
  63. +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  64. | :ref:`float<class_float>` | :ref:`get_mix_rate<class_AudioServer_method_get_mix_rate>` **(** **)** |const| |
  65. +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  66. | :ref:`float<class_float>` | :ref:`get_output_latency<class_AudioServer_method_get_output_latency>` **(** **)** |const| |
  67. +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  68. | :ref:`SpeakerMode<enum_AudioServer_SpeakerMode>` | :ref:`get_speaker_mode<class_AudioServer_method_get_speaker_mode>` **(** **)** |const| |
  69. +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  70. | :ref:`float<class_float>` | :ref:`get_time_since_last_mix<class_AudioServer_method_get_time_since_last_mix>` **(** **)** |const| |
  71. +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  72. | :ref:`float<class_float>` | :ref:`get_time_to_next_mix<class_AudioServer_method_get_time_to_next_mix>` **(** **)** |const| |
  73. +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  74. | :ref:`bool<class_bool>` | :ref:`is_bus_bypassing_effects<class_AudioServer_method_is_bus_bypassing_effects>` **(** :ref:`int<class_int>` bus_idx **)** |const| |
  75. +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  76. | :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| |
  77. +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  78. | :ref:`bool<class_bool>` | :ref:`is_bus_mute<class_AudioServer_method_is_bus_mute>` **(** :ref:`int<class_int>` bus_idx **)** |const| |
  79. +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  80. | :ref:`bool<class_bool>` | :ref:`is_bus_solo<class_AudioServer_method_is_bus_solo>` **(** :ref:`int<class_int>` bus_idx **)** |const| |
  81. +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  82. | void | :ref:`lock<class_AudioServer_method_lock>` **(** **)** |
  83. +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  84. | void | :ref:`move_bus<class_AudioServer_method_move_bus>` **(** :ref:`int<class_int>` index, :ref:`int<class_int>` to_index **)** |
  85. +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  86. | void | :ref:`remove_bus<class_AudioServer_method_remove_bus>` **(** :ref:`int<class_int>` index **)** |
  87. +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  88. | void | :ref:`remove_bus_effect<class_AudioServer_method_remove_bus_effect>` **(** :ref:`int<class_int>` bus_idx, :ref:`int<class_int>` effect_idx **)** |
  89. +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  90. | void | :ref:`set_bus_bypass_effects<class_AudioServer_method_set_bus_bypass_effects>` **(** :ref:`int<class_int>` bus_idx, :ref:`bool<class_bool>` enable **)** |
  91. +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  92. | 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 **)** |
  93. +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  94. | void | :ref:`set_bus_layout<class_AudioServer_method_set_bus_layout>` **(** :ref:`AudioBusLayout<class_AudioBusLayout>` bus_layout **)** |
  95. +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  96. | void | :ref:`set_bus_mute<class_AudioServer_method_set_bus_mute>` **(** :ref:`int<class_int>` bus_idx, :ref:`bool<class_bool>` enable **)** |
  97. +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  98. | void | :ref:`set_bus_name<class_AudioServer_method_set_bus_name>` **(** :ref:`int<class_int>` bus_idx, :ref:`String<class_String>` name **)** |
  99. +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  100. | void | :ref:`set_bus_send<class_AudioServer_method_set_bus_send>` **(** :ref:`int<class_int>` bus_idx, :ref:`StringName<class_StringName>` send **)** |
  101. +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  102. | void | :ref:`set_bus_solo<class_AudioServer_method_set_bus_solo>` **(** :ref:`int<class_int>` bus_idx, :ref:`bool<class_bool>` enable **)** |
  103. +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  104. | 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 **)** |
  105. +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  106. | void | :ref:`set_enable_tagging_used_audio_streams<class_AudioServer_method_set_enable_tagging_used_audio_streams>` **(** :ref:`bool<class_bool>` enable **)** |
  107. +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  108. | 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 **)** |
  109. +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  110. | void | :ref:`unlock<class_AudioServer_method_unlock>` **(** **)** |
  111. +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  112. Signals
  113. -------
  114. .. _class_AudioServer_signal_bus_layout_changed:
  115. - **bus_layout_changed** **(** **)**
  116. Emitted when the :ref:`AudioBusLayout<class_AudioBusLayout>` changes.
  117. Enumerations
  118. ------------
  119. .. _enum_AudioServer_SpeakerMode:
  120. .. _class_AudioServer_constant_SPEAKER_MODE_STEREO:
  121. .. _class_AudioServer_constant_SPEAKER_SURROUND_31:
  122. .. _class_AudioServer_constant_SPEAKER_SURROUND_51:
  123. .. _class_AudioServer_constant_SPEAKER_SURROUND_71:
  124. enum **SpeakerMode**:
  125. - **SPEAKER_MODE_STEREO** = **0** --- Two or fewer speakers were detected.
  126. - **SPEAKER_SURROUND_31** = **1** --- A 3.1 channel surround setup was detected.
  127. - **SPEAKER_SURROUND_51** = **2** --- A 5.1 channel surround setup was detected.
  128. - **SPEAKER_SURROUND_71** = **3** --- A 7.1 channel surround setup was detected.
  129. Property Descriptions
  130. ---------------------
  131. .. _class_AudioServer_property_bus_count:
  132. - :ref:`int<class_int>` **bus_count**
  133. +-----------+----------------------+
  134. | *Default* | ``1`` |
  135. +-----------+----------------------+
  136. | *Setter* | set_bus_count(value) |
  137. +-----------+----------------------+
  138. | *Getter* | get_bus_count() |
  139. +-----------+----------------------+
  140. Number of available audio buses.
  141. ----
  142. .. _class_AudioServer_property_capture_device:
  143. - :ref:`String<class_String>` **capture_device**
  144. +-----------+---------------------------+
  145. | *Default* | ``"Default"`` |
  146. +-----------+---------------------------+
  147. | *Setter* | capture_set_device(value) |
  148. +-----------+---------------------------+
  149. | *Getter* | capture_get_device() |
  150. +-----------+---------------------------+
  151. 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"``.
  152. \ **Note:** :ref:`ProjectSettings.audio/driver/enable_input<class_ProjectSettings_property_audio/driver/enable_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.
  153. ----
  154. .. _class_AudioServer_property_device:
  155. - :ref:`String<class_String>` **device**
  156. +-----------+-------------------+
  157. | *Default* | ``"Default"`` |
  158. +-----------+-------------------+
  159. | *Setter* | set_device(value) |
  160. +-----------+-------------------+
  161. | *Getter* | get_device() |
  162. +-----------+-------------------+
  163. 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"``.
  164. ----
  165. .. _class_AudioServer_property_playback_speed_scale:
  166. - :ref:`float<class_float>` **playback_speed_scale**
  167. +-----------+---------------------------------+
  168. | *Default* | ``1.0`` |
  169. +-----------+---------------------------------+
  170. | *Setter* | set_playback_speed_scale(value) |
  171. +-----------+---------------------------------+
  172. | *Getter* | get_playback_speed_scale() |
  173. +-----------+---------------------------------+
  174. Scales the rate at which audio is played (i.e. setting it to ``0.5`` will make the audio be played at half its speed).
  175. Method Descriptions
  176. -------------------
  177. .. _class_AudioServer_method_add_bus:
  178. - void **add_bus** **(** :ref:`int<class_int>` at_position=-1 **)**
  179. Adds a bus at ``at_position``.
  180. ----
  181. .. _class_AudioServer_method_add_bus_effect:
  182. - void **add_bus_effect** **(** :ref:`int<class_int>` bus_idx, :ref:`AudioEffect<class_AudioEffect>` effect, :ref:`int<class_int>` at_position=-1 **)**
  183. Adds an :ref:`AudioEffect<class_AudioEffect>` effect to the bus ``bus_idx`` at ``at_position``.
  184. ----
  185. .. _class_AudioServer_method_capture_get_device_list:
  186. - :ref:`PackedStringArray<class_PackedStringArray>` **capture_get_device_list** **(** **)**
  187. Returns the names of all audio input devices detected on the system.
  188. \ **Note:** :ref:`ProjectSettings.audio/driver/enable_input<class_ProjectSettings_property_audio/driver/enable_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.
  189. ----
  190. .. _class_AudioServer_method_generate_bus_layout:
  191. - :ref:`AudioBusLayout<class_AudioBusLayout>` **generate_bus_layout** **(** **)** |const|
  192. Generates an :ref:`AudioBusLayout<class_AudioBusLayout>` using the available buses and effects.
  193. ----
  194. .. _class_AudioServer_method_get_bus_channels:
  195. - :ref:`int<class_int>` **get_bus_channels** **(** :ref:`int<class_int>` bus_idx **)** |const|
  196. Returns the number of channels of the bus at index ``bus_idx``.
  197. ----
  198. .. _class_AudioServer_method_get_bus_effect:
  199. - :ref:`AudioEffect<class_AudioEffect>` **get_bus_effect** **(** :ref:`int<class_int>` bus_idx, :ref:`int<class_int>` effect_idx **)**
  200. Returns the :ref:`AudioEffect<class_AudioEffect>` at position ``effect_idx`` in bus ``bus_idx``.
  201. ----
  202. .. _class_AudioServer_method_get_bus_effect_count:
  203. - :ref:`int<class_int>` **get_bus_effect_count** **(** :ref:`int<class_int>` bus_idx **)**
  204. Returns the number of effects on the bus at ``bus_idx``.
  205. ----
  206. .. _class_AudioServer_method_get_bus_effect_instance:
  207. - :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 **)**
  208. Returns the :ref:`AudioEffectInstance<class_AudioEffectInstance>` assigned to the given bus and effect indices (and optionally channel).
  209. ----
  210. .. _class_AudioServer_method_get_bus_index:
  211. - :ref:`int<class_int>` **get_bus_index** **(** :ref:`StringName<class_StringName>` bus_name **)** |const|
  212. Returns the index of the bus with the name ``bus_name``.
  213. ----
  214. .. _class_AudioServer_method_get_bus_name:
  215. - :ref:`String<class_String>` **get_bus_name** **(** :ref:`int<class_int>` bus_idx **)** |const|
  216. Returns the name of the bus with the index ``bus_idx``.
  217. ----
  218. .. _class_AudioServer_method_get_bus_peak_volume_left_db:
  219. - :ref:`float<class_float>` **get_bus_peak_volume_left_db** **(** :ref:`int<class_int>` bus_idx, :ref:`int<class_int>` channel **)** |const|
  220. Returns the peak volume of the left speaker at bus index ``bus_idx`` and channel index ``channel``.
  221. ----
  222. .. _class_AudioServer_method_get_bus_peak_volume_right_db:
  223. - :ref:`float<class_float>` **get_bus_peak_volume_right_db** **(** :ref:`int<class_int>` bus_idx, :ref:`int<class_int>` channel **)** |const|
  224. Returns the peak volume of the right speaker at bus index ``bus_idx`` and channel index ``channel``.
  225. ----
  226. .. _class_AudioServer_method_get_bus_send:
  227. - :ref:`StringName<class_StringName>` **get_bus_send** **(** :ref:`int<class_int>` bus_idx **)** |const|
  228. Returns the name of the bus that the bus at index ``bus_idx`` sends to.
  229. ----
  230. .. _class_AudioServer_method_get_bus_volume_db:
  231. - :ref:`float<class_float>` **get_bus_volume_db** **(** :ref:`int<class_int>` bus_idx **)** |const|
  232. Returns the volume of the bus at index ``bus_idx`` in dB.
  233. ----
  234. .. _class_AudioServer_method_get_device_list:
  235. - :ref:`PackedStringArray<class_PackedStringArray>` **get_device_list** **(** **)**
  236. Returns the names of all audio devices detected on the system.
  237. ----
  238. .. _class_AudioServer_method_get_mix_rate:
  239. - :ref:`float<class_float>` **get_mix_rate** **(** **)** |const|
  240. Returns the sample rate at the output of the ``AudioServer``.
  241. ----
  242. .. _class_AudioServer_method_get_output_latency:
  243. - :ref:`float<class_float>` **get_output_latency** **(** **)** |const|
  244. Returns the audio driver's output latency.
  245. ----
  246. .. _class_AudioServer_method_get_speaker_mode:
  247. - :ref:`SpeakerMode<enum_AudioServer_SpeakerMode>` **get_speaker_mode** **(** **)** |const|
  248. Returns the speaker configuration.
  249. ----
  250. .. _class_AudioServer_method_get_time_since_last_mix:
  251. - :ref:`float<class_float>` **get_time_since_last_mix** **(** **)** |const|
  252. Returns the relative time since the last mix occurred.
  253. ----
  254. .. _class_AudioServer_method_get_time_to_next_mix:
  255. - :ref:`float<class_float>` **get_time_to_next_mix** **(** **)** |const|
  256. Returns the relative time until the next mix occurs.
  257. ----
  258. .. _class_AudioServer_method_is_bus_bypassing_effects:
  259. - :ref:`bool<class_bool>` **is_bus_bypassing_effects** **(** :ref:`int<class_int>` bus_idx **)** |const|
  260. If ``true``, the bus at index ``bus_idx`` is bypassing effects.
  261. ----
  262. .. _class_AudioServer_method_is_bus_effect_enabled:
  263. - :ref:`bool<class_bool>` **is_bus_effect_enabled** **(** :ref:`int<class_int>` bus_idx, :ref:`int<class_int>` effect_idx **)** |const|
  264. If ``true``, the effect at index ``effect_idx`` on the bus at index ``bus_idx`` is enabled.
  265. ----
  266. .. _class_AudioServer_method_is_bus_mute:
  267. - :ref:`bool<class_bool>` **is_bus_mute** **(** :ref:`int<class_int>` bus_idx **)** |const|
  268. If ``true``, the bus at index ``bus_idx`` is muted.
  269. ----
  270. .. _class_AudioServer_method_is_bus_solo:
  271. - :ref:`bool<class_bool>` **is_bus_solo** **(** :ref:`int<class_int>` bus_idx **)** |const|
  272. If ``true``, the bus at index ``bus_idx`` is in solo mode.
  273. ----
  274. .. _class_AudioServer_method_lock:
  275. - void **lock** **(** **)**
  276. Locks the audio driver's main loop.
  277. \ **Note:** Remember to unlock it afterwards.
  278. ----
  279. .. _class_AudioServer_method_move_bus:
  280. - void **move_bus** **(** :ref:`int<class_int>` index, :ref:`int<class_int>` to_index **)**
  281. Moves the bus from index ``index`` to index ``to_index``.
  282. ----
  283. .. _class_AudioServer_method_remove_bus:
  284. - void **remove_bus** **(** :ref:`int<class_int>` index **)**
  285. Removes the bus at index ``index``.
  286. ----
  287. .. _class_AudioServer_method_remove_bus_effect:
  288. - void **remove_bus_effect** **(** :ref:`int<class_int>` bus_idx, :ref:`int<class_int>` effect_idx **)**
  289. Removes the effect at index ``effect_idx`` from the bus at index ``bus_idx``.
  290. ----
  291. .. _class_AudioServer_method_set_bus_bypass_effects:
  292. - void **set_bus_bypass_effects** **(** :ref:`int<class_int>` bus_idx, :ref:`bool<class_bool>` enable **)**
  293. If ``true``, the bus at index ``bus_idx`` is bypassing effects.
  294. ----
  295. .. _class_AudioServer_method_set_bus_effect_enabled:
  296. - void **set_bus_effect_enabled** **(** :ref:`int<class_int>` bus_idx, :ref:`int<class_int>` effect_idx, :ref:`bool<class_bool>` enabled **)**
  297. If ``true``, the effect at index ``effect_idx`` on the bus at index ``bus_idx`` is enabled.
  298. ----
  299. .. _class_AudioServer_method_set_bus_layout:
  300. - void **set_bus_layout** **(** :ref:`AudioBusLayout<class_AudioBusLayout>` bus_layout **)**
  301. Overwrites the currently used :ref:`AudioBusLayout<class_AudioBusLayout>`.
  302. ----
  303. .. _class_AudioServer_method_set_bus_mute:
  304. - void **set_bus_mute** **(** :ref:`int<class_int>` bus_idx, :ref:`bool<class_bool>` enable **)**
  305. If ``true``, the bus at index ``bus_idx`` is muted.
  306. ----
  307. .. _class_AudioServer_method_set_bus_name:
  308. - void **set_bus_name** **(** :ref:`int<class_int>` bus_idx, :ref:`String<class_String>` name **)**
  309. Sets the name of the bus at index ``bus_idx`` to ``name``.
  310. ----
  311. .. _class_AudioServer_method_set_bus_send:
  312. - void **set_bus_send** **(** :ref:`int<class_int>` bus_idx, :ref:`StringName<class_StringName>` send **)**
  313. Connects the output of the bus at ``bus_idx`` to the bus named ``send``.
  314. ----
  315. .. _class_AudioServer_method_set_bus_solo:
  316. - void **set_bus_solo** **(** :ref:`int<class_int>` bus_idx, :ref:`bool<class_bool>` enable **)**
  317. If ``true``, the bus at index ``bus_idx`` is in solo mode.
  318. ----
  319. .. _class_AudioServer_method_set_bus_volume_db:
  320. - void **set_bus_volume_db** **(** :ref:`int<class_int>` bus_idx, :ref:`float<class_float>` volume_db **)**
  321. Sets the volume of the bus at index ``bus_idx`` to ``volume_db``.
  322. ----
  323. .. _class_AudioServer_method_set_enable_tagging_used_audio_streams:
  324. - void **set_enable_tagging_used_audio_streams** **(** :ref:`bool<class_bool>` enable **)**
  325. .. container:: contribute
  326. There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  327. ----
  328. .. _class_AudioServer_method_swap_bus_effects:
  329. - void **swap_bus_effects** **(** :ref:`int<class_int>` bus_idx, :ref:`int<class_int>` effect_idx, :ref:`int<class_int>` by_effect_idx **)**
  330. Swaps the position of two effects in bus ``bus_idx``.
  331. ----
  332. .. _class_AudioServer_method_unlock:
  333. - void **unlock** **(** **)**
  334. Unlocks the audio driver's main loop. (After locking it, you should always unlock it.)
  335. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  336. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  337. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  338. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  339. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  340. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`