Struct AudioStreamPlayer

Plays back audio non-positionally.

struct AudioStreamPlayer ;

Plays an audio stream non-positionally.

Properties

NameTypeDescription
autoplay[get, set] boolIf true, audio plays when added to scene tree.
bus[get, set] StringBus on which this audio is playing.
mixTarget[get, set] AudioStreamPlayer.MixTargetIf the audio configuration has more than two speakers, this sets the target channels. See mixtarget constants.
pitchScale[get, set] doubleChanges the pitch and the tempo of the audio.
playing[get, set] boolIf true, audio is playing.
stream[get, set] AudioStreamThe AudioStream object to be played.
streamPaused[get, set] boolIf true, the playback is paused. You can resume it by setting stream_paused to false.
volumeDb[get, set] doubleVolume of sound, in dB.

Methods

NameDescription
_busLayoutChanged
_isActive
_setPlaying
getBus
getMixTarget
getPitchScale
getPlaybackPosition Returns the position in the AudioStream in seconds.
getStream
getStreamPaused
getStreamPlayback Returns the AudioStreamPlayback object associated with this AudioStreamPlayer.
getVolumeDb
isAutoplayEnabled
isPlaying
play Plays the audio from the given from_position, in seconds.
seek Sets the position from which audio will be played, in seconds.
setAutoplay
setBus
setMixTarget
setPitchScale
setStream
setStreamPaused
setVolumeDb
stop Stops the audio.

Enums

NameDescription
Constants
MixTarget