class_audioserver.rst 33 KB

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