godot.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.
Static variables
staticDEVICE:String
Name of the current device for audio output (see godot.AudioServer.getDeviceList). 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".
staticGLOBAL_RATE_SCALE:Single
Scales the rate at which audio is played (i.e. setting it to 0.5 will make the audio be played twice as fast).
Static methods
staticaddBusEffect(busIdx:Int, effect:AudioEffect, ?atPosition:Int):Void
Adds an godot.AudioEffect effect to the bus bus_idx at at_position.
staticcaptureGetDevice():String
Name of the current device for audio input (see godot.AudioServer.captureGetDeviceList). The value "Default" means that the system-wide default audio input is currently used.
staticcaptureGetDeviceList():Array
Returns the names of all audio input devices detected on the system.
staticcaptureSetDevice(name:String):Void
Sets which audio input device is used for audio capture. On systems with multiple audio inputs (such as analog and USB), this can be used to select the audio input device. Setting the value "Default" will record audio from the system-wide default audio input. If an invalid device name is set, the value will be reverted back to "Default".
staticgenerateBusLayout():AudioBusLayout
Generates an godot.AudioBusLayout using the available buses and effects.
staticgetBusEffect(busIdx:Int, effectIdx:Int):AudioEffect
Returns the godot.AudioEffect at position effect_idx in bus bus_idx.
staticgetBusEffectInstance(busIdx:Int, effectIdx:Int, ?channel:Int):AudioEffectInstance
Returns the godot.AudioEffectInstance assigned to the given bus and effect indices (and optionally channel).
staticgetBusPeakVolumeLeftDb(busIdx:Int, channel:Int):Single
Returns the peak volume of the left speaker at bus index bus_idx and channel index channel.
staticgetBusPeakVolumeRightDb(busIdx:Int, channel:Int):Single
Returns the peak volume of the right speaker at bus index bus_idx and channel index channel.
staticgetBusSend(busIdx:Int):String
Returns the name of the bus that the bus at index bus_idx sends to.
staticisBusEffectEnabled(busIdx:Int, effectIdx:Int):Bool
If true, the effect at index effect_idx on the bus at index bus_idx is enabled.
staticremoveBusEffect(busIdx:Int, effectIdx:Int):Void
Removes the effect at index effect_idx from the bus at index bus_idx.
staticsetBusBypassEffects(busIdx:Int, enable:Bool):Void
If true, the bus at index bus_idx is bypassing effects.
staticsetBusEffectEnabled(busIdx:Int, effectIdx:Int, enabled:Bool):Void
If true, the effect at index effect_idx on the bus at index bus_idx is enabled.
staticsetBusLayout(busLayout:AudioBusLayout):Void
Overwrites the currently used godot.AudioBusLayout.
staticsetBusSend(busIdx:Int, send:String):Void
Connects the output of the bus at bus_idx to the bus named send.
staticsetBusVolumeDb(busIdx:Int, volumeDb:Single):Void
Sets the volume of the bus at index bus_idx to volume_db.
staticswapBusEffects(busIdx:Int, effectIdx:Int, byEffectIdx:Int):Void
Swaps the position of two effects in bus bus_idx.
staticunlock():Void
Unlocks the audio driver's main loop. (After locking it, you should always unlock it.)