AudioServerSingleton

Server interface for low-level audio access.

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.

@GodotBaseClass
struct AudioServerSingleton {}

Members

Aliases

BaseClasses
alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses)
Undocumented in source.

Enums

Constants
enum Constants
SpeakerMode
enum SpeakerMode

Functions

addBus
void addBus(long at_position)

Adds a bus at at_position.

addBusEffect
void addBusEffect(long bus_idx, AudioEffect effect, long at_position)

Adds an AudioEffect effect to the bus bus_idx at at_position.

captureGetDevice
String captureGetDevice()

Name of the current device for audio input (see captureGetDeviceList).

captureGetDeviceList
Array captureGetDeviceList()

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

captureSetDevice
void captureSetDevice(String name)

Sets which audio input device is used for audio capture.

generateBusLayout
Ref!AudioBusLayout generateBusLayout()

Generates an AudioBusLayout using the available buses and effects.

getBusChannels
long getBusChannels(long bus_idx)

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

getBusCount
long getBusCount()
getBusEffect
Ref!AudioEffect getBusEffect(long bus_idx, long effect_idx)

Returns the AudioEffect at position effect_idx in bus bus_idx.

getBusEffectCount
long getBusEffectCount(long bus_idx)

Returns the number of effects on the bus at bus_idx.

getBusEffectInstance
Ref!AudioEffectInstance getBusEffectInstance(long bus_idx, long effect_idx, long channel)

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

getBusIndex
long getBusIndex(String bus_name)

Returns the index of the bus with the name bus_name.

getBusName
String getBusName(long bus_idx)

Returns the name of the bus with the index bus_idx.

getBusPeakVolumeLeftDb
double getBusPeakVolumeLeftDb(long bus_idx, long channel)

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

getBusPeakVolumeRightDb
double getBusPeakVolumeRightDb(long bus_idx, long channel)

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

getBusSend
String getBusSend(long bus_idx)

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

getBusVolumeDb
double getBusVolumeDb(long bus_idx)

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

getDevice
String getDevice()
getDeviceList
Array getDeviceList()

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

getGlobalRateScale
double getGlobalRateScale()
getMixRate
double getMixRate()

Returns the sample rate at the output of the AudioServer.

getOutputLatency
double getOutputLatency()

Returns the audio driver's output latency.

getSpeakerMode
AudioServer.SpeakerMode getSpeakerMode()

Returns the speaker configuration.

getTimeSinceLastMix
double getTimeSinceLastMix()

Returns the relative time since the last mix occurred.

getTimeToNextMix
double getTimeToNextMix()

Returns the relative time until the next mix occurs.

isBusBypassingEffects
bool isBusBypassingEffects(long bus_idx)

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

isBusEffectEnabled
bool isBusEffectEnabled(long bus_idx, long effect_idx)

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

isBusMute
bool isBusMute(long bus_idx)

If true, the bus at index bus_idx is muted.

isBusSolo
bool isBusSolo(long bus_idx)

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

lock
void lock()

Locks the audio driver's main loop. Note: Remember to unlock it afterwards.

moveBus
void moveBus(long index, long to_index)

Moves the bus from index index to index to_index.

opAssign
typeof(null) opAssign(typeof(null) n)
opEquals
bool opEquals(AudioServerSingleton other)
opEquals
bool opEquals(typeof(null) n)
removeBus
void removeBus(long index)

Removes the bus at index index.

removeBusEffect
void removeBusEffect(long bus_idx, long effect_idx)

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

setBusBypassEffects
void setBusBypassEffects(long bus_idx, bool enable)

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

setBusCount
void setBusCount(long amount)
setBusEffectEnabled
void setBusEffectEnabled(long bus_idx, long effect_idx, bool enabled)

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

setBusLayout
void setBusLayout(AudioBusLayout bus_layout)

Overwrites the currently used AudioBusLayout.

setBusMute
void setBusMute(long bus_idx, bool enable)

If true, the bus at index bus_idx is muted.

setBusName
void setBusName(long bus_idx, String name)

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

setBusSend
void setBusSend(long bus_idx, String send)

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

setBusSolo
void setBusSolo(long bus_idx, bool enable)

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

setBusVolumeDb
void setBusVolumeDb(long bus_idx, double volume_db)

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

setDevice
void setDevice(String device)
setGlobalRateScale
void setGlobalRateScale(double scale)
swapBusEffects
void swapBusEffects(long bus_idx, long effect_idx, long by_effect_idx)

Swaps the position of two effects in bus bus_idx.

toHash
size_t toHash()
unlock
void unlock()

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

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Properties

busCount
long busCount [@property getter]
long busCount [@property setter]

Number of available audio buses.

device
String device [@property getter]
String device [@property setter]

Name of the current device for audio output (see getDeviceList).

globalRateScale
double globalRateScale [@property getter]
double globalRateScale [@property setter]

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 functions

_new
AudioServerSingleton _new()

Construct a new instance of AudioServerSingleton. Note: use memnew!AudioServerSingleton instead.

Static variables

_classBindingInitialized
bool _classBindingInitialized;
Undocumented in source.

Structs

GDNativeClassBinding
struct GDNativeClassBinding
Undocumented in source.

Unions

__anonymous
union __anonymous
Undocumented in source.

Variables

_GODOT_internal_name
enum string _GODOT_internal_name;
Undocumented in source.

Mixed In Members

From mixin baseCasts

as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(ToRef) as()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(ToRef)
Undocumented in source.
opCast
void* opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
godot_object opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
bool opCast()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta