class-description NEWS COMMUNITY STORE LABS SIGN UP LOGIN LOGOUT ROKOJORI NEWSLETTER SIGN UP LOGIN LOGOUT NEWS COMMUNITY STORE LABS TOGGLE FULLSCREEN VOLLBILD AN/AUS Object AudioServer
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.

bus_layout_changed bus_layout_changed<>():bus_layout_changed

Emitted when an audio bus is added, deleted, or moved.

bus_renamed bus_renamed<>( int bus_index=, bus_index:int=, StringName old_name=, old_name:StringName=, StringName new_name=, new_name:StringName=, ):bus_renamed

Emitted when the audio bus at bus_index is renamed from old_name to new_name.

Enum SpeakerMode<>():Enum

SPEAKER_MODE_STEREO = 0

Two or fewer speakers were detected.


SPEAKER_SURROUND_31 = 1

A 3.1 channel surround setup was detected.


SPEAKER_SURROUND_51 = 2

A 5.1 channel surround setup was detected.


SPEAKER_SURROUND_71 = 3

A 7.1 channel surround setup was detected.

int bus_count<>():int

Number of available audio buses.

String input_device<>():String

Name of the current device for audio input (see get_input_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".

Note: ProjectSettings.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.

String output_device<>():String

Name of the current device for audio output (see get_output_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".

float playback_speed_scale<>():float

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). See also Engine.time_scale to affect the general simulation speed, which is independent from playback_speed_scale.

void add_bus<>( int=, int:=, ):void

Adds a bus at at_position.

void add_bus_effect<>( int bus_idx=, bus_idx:int=, AudioEffect effect=, effect:AudioEffect=, int=, int:=, ):void

Adds an AudioEffect effect to the bus bus_idx at at_position.

AudioBusLayout generate_bus_layout<>():AudioBusLayout

Generates an AudioBusLayout using the available buses and effects.

int get_bus_channels<>( int bus_idx=, bus_idx:int=, ):int

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

AudioEffect get_bus_effect<>( int bus_idx=, bus_idx:int=, int effect_idx=, effect_idx:int=, ):AudioEffect

Returns the AudioEffect at position effect_idx in bus bus_idx.

int get_bus_effect_count<>( int bus_idx=, bus_idx:int=, ):int

Returns the number of effects on the bus at bus_idx.

AudioEffectInstance get_bus_effect_instance<>( int bus_idx=, bus_idx:int=, int effect_idx=, effect_idx:int=, int channel=0, channel:int=0, ):AudioEffectInstance

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

int get_bus_index<>( StringName bus_name=, bus_name:StringName=, ):int

Returns the index of the bus with the name bus_name. Returns -1 if no bus with the specified name exist.

String get_bus_name<>( int bus_idx=, bus_idx:int=, ):String

Returns the name of the bus with the index bus_idx.

float get_bus_peak_volume_left_db<>( int bus_idx=, bus_idx:int=, int channel=, channel:int=, ):float

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

float get_bus_peak_volume_right_db<>( int bus_idx=, bus_idx:int=, int channel=, channel:int=, ):float

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

StringName get_bus_send<>( int bus_idx=, bus_idx:int=, ):StringName

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

float get_bus_volume_db<>( int bus_idx=, bus_idx:int=, ):float

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

PackedStringArray get_input_device_list<>():PackedStringArray

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

Note: ProjectSettings.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.

float get_mix_rate<>():float

Returns the sample rate at the output of the AudioServer.

PackedStringArray get_output_device_list<>():PackedStringArray

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

float get_output_latency<>():float

Returns the audio driver's effective output latency. This is based on ProjectSettings.audio/driver/output_latency, but the exact returned value will differ depending on the operating system and audio driver.

Note: This can be expensive; it is not recommended to call get_output_latency every frame.

SpeakerMode get_speaker_mode<>():SpeakerMode

Returns the speaker configuration.

float get_time_since_last_mix<>():float

Returns the relative time since the last mix occurred.

float get_time_to_next_mix<>():float

Returns the relative time until the next mix occurs.

bool is_bus_bypassing_effects<>( int bus_idx=, bus_idx:int=, ):bool

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

bool is_bus_effect_enabled<>( int bus_idx=, bus_idx:int=, int effect_idx=, effect_idx:int=, ):bool

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

bool is_bus_mute<>( int bus_idx=, bus_idx:int=, ):bool

If true, the bus at index bus_idx is muted.

bool is_bus_solo<>( int bus_idx=, bus_idx:int=, ):bool

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

void lock<>():void

Locks the audio driver's main loop.

Note: Remember to unlock it afterwards.

void move_bus<>( int index=, index:int=, int to_index=, to_index:int=, ):void

Moves the bus from index index to index to_index.

void remove_bus<>( int index=, index:int=, ):void

Removes the bus at index index.

void remove_bus_effect<>( int bus_idx=, bus_idx:int=, int effect_idx=, effect_idx:int=, ):void

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

void set_bus_bypass_effects<>( int bus_idx=, bus_idx:int=, bool enable=, enable:bool=, ):void

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

void set_bus_effect_enabled<>( int bus_idx=, bus_idx:int=, int effect_idx=, effect_idx:int=, bool enabled=, enabled:bool=, ):void

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

void set_bus_layout<>( AudioBusLayout bus_layout=, bus_layout:AudioBusLayout=, ):void

Overwrites the currently used AudioBusLayout.

void set_bus_mute<>( int bus_idx=, bus_idx:int=, bool enable=, enable:bool=, ):void

If true, the bus at index bus_idx is muted.

void set_bus_name<>( int bus_idx=, bus_idx:int=, String name=, name:String=, ):void

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

void set_bus_send<>( int bus_idx=, bus_idx:int=, StringName send=, send:StringName=, ):void

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

void set_bus_solo<>( int bus_idx=, bus_idx:int=, bool enable=, enable:bool=, ):void

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

void set_bus_volume_db<>( int bus_idx=, bus_idx:int=, float volume_db=, volume_db:float=, ):void

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

void set_enable_tagging_used_audio_streams<>( bool enable=, enable:bool=, ):void

There is currently no description for this method. Please help us by contributing one!

void swap_bus_effects<>( int bus_idx=, bus_idx:int=, int effect_idx=, effect_idx:int=, int by_effect_idx=, by_effect_idx:int=, ):void

Swaps the position of two effects in bus bus_idx.

void unlock<>():void

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




All social media brands are registrated trademarks and belong to their respective owners.





CONTACT IMPRINT TERMS OF USE PRIVACY © ROKOROJI ® 2021 rokojori.com
CONTACT IMPRINT TERMS OF USE PRIVACY © ROKOROJI ® 2021 rokojori.com
We are using cookies on this site. Read more... Wir benutzen Cookies auf dieser Seite. Mehr lesen...