Click or drag to resize

AudioServer Class

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.

Inheritance Hierarchy
SystemObject
  GodotAudioServer

Namespace:  Godot
Assembly:  GodotSharp (in GodotSharp.dll) Version: 1.0.0
Syntax
C#
public static class AudioServer

The AudioServer type exposes the following members.

Properties
  NameDescription
Public propertyStatic memberBusCount

Number of available audio buses.

Public propertyStatic memberDevice
Public propertyStatic memberGlobalRateScale

Scales the rate at which audio is played (i.e. setting it to 0.5 will make the audio be played twice as fast).

Public propertyStatic memberSingleton
Top
Methods
  NameDescription
Public methodStatic memberAddBus

Adds a bus at at_position.

Public methodStatic memberAddBusEffect

Adds an AudioEffect effect to the bus bus_idx at at_position.

Public methodStatic memberCaptureGetDevice
Public methodStatic memberCaptureGetDeviceList

Returns the names of all audio input devices detected on the system.

Public methodStatic memberCaptureSetDevice

Sets which audio input device is used for audio capture.

Public methodStatic memberGenerateBusLayout

Generates an AudioBusLayout using the available buses and effects.

Public methodStatic memberGetBusChannels

Returns the amount of channels of the bus at index bus_idx.

Public methodStatic memberGetBusCount Obsolete.
Public methodStatic memberGetBusEffect

Returns the AudioEffect at position effect_idx in bus bus_idx.

Public methodStatic memberGetBusEffectCount

Returns the number of effects on the bus at bus_idx.

Public methodStatic memberGetBusEffectInstance

Returns the AudioEffectInstance assigned to the given bus and effect indices (and optionally channel).

Public methodStatic memberGetBusIndex

Returns the index of the bus with the name bus_name.

Public methodStatic memberGetBusName

Returns the name of the bus with the index bus_idx.

Public methodStatic memberGetBusPeakVolumeLeftDb

Returns the peak volume of the left speaker at bus index bus_idx and channel index channel.

Public methodStatic memberGetBusPeakVolumeRightDb

Returns the peak volume of the right speaker at bus index bus_idx and channel index channel.

Public methodStatic memberGetBusSend

Returns the name of the bus that the bus at index bus_idx sends to.

Public methodStatic memberGetBusVolumeDb

Returns the volume of the bus at index bus_idx in dB.

Public methodStatic memberGetDevice Obsolete.
Public methodStatic memberGetDeviceList

Returns the names of all audio devices detected on the system.

Public methodStatic memberGetGlobalRateScale Obsolete.
Public methodStatic memberGetMixRate

Returns the sample rate at the output of the AudioServer.

Public methodStatic memberGetOutputLatency

Returns the audio driver's output latency.

Public methodStatic memberGetSpeakerMode

Returns the speaker configuration.

Public methodStatic memberGetTimeSinceLastMix

Returns the relative time since the last mix occurred.

Public methodStatic memberGetTimeToNextMix

Returns the relative time until the next mix occurs.

Public methodStatic memberIsBusBypassingEffects

If true, the bus at index bus_idx is bypassing effects.

Public methodStatic memberIsBusEffectEnabled

If true, the effect at index effect_idx on the bus at index bus_idx is enabled.

Public methodStatic memberIsBusMute

If true, the bus at index bus_idx is muted.

Public methodStatic memberIsBusSolo

If true, the bus at index bus_idx is in solo mode.

Public methodStatic memberLock

Locks the audio driver's main loop.

Note: Remember to unlock it afterwards.

Public methodStatic memberMoveBus

Moves the bus from index index to index to_index.

Public methodStatic memberRemoveBus

Removes the bus at index index.

Public methodStatic memberRemoveBusEffect

Removes the effect at index effect_idx from the bus at index bus_idx.

Public methodStatic memberSetBusBypassEffects

If true, the bus at index bus_idx is bypassing effects.

Public methodStatic memberSetBusCount Obsolete.
Public methodStatic memberSetBusEffectEnabled

If true, the effect at index effect_idx on the bus at index bus_idx is enabled.

Public methodStatic memberSetBusLayout

Overwrites the currently used AudioBusLayout.

Public methodStatic memberSetBusMute

If true, the bus at index bus_idx is muted.

Public methodStatic memberSetBusName

Sets the name of the bus at index bus_idx to name.

Public methodStatic memberSetBusSend

Connects the output of the bus at bus_idx to the bus named send.

Public methodStatic memberSetBusSolo

If true, the bus at index bus_idx is in solo mode.

Public methodStatic memberSetBusVolumeDb

Sets the volume of the bus at index bus_idx to volume_db.

Public methodStatic memberSetDevice Obsolete.
Public methodStatic memberSetGlobalRateScale Obsolete.
Public methodStatic memberSwapBusEffects

Swaps the position of two effects in bus bus_idx.

Public methodStatic memberUnlock

Unlocks the audio driver's main loop. (After locking it, you should always unlock it.)

Top
See Also