AudioStreamPlayer

Plays back audio.

Plays background audio.

@GodotBaseClass
struct AudioStreamPlayer {}

Members

Aliases

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

Enums

Constants
enum Constants
MixTarget
enum MixTarget

Functions

_busLayoutChanged
void _busLayoutChanged()
_isActive
bool _isActive()
_setPlaying
void _setPlaying(bool enable)
getBus
String getBus()
getMixTarget
AudioStreamPlayer.MixTarget getMixTarget()
getPitchScale
double getPitchScale()
getPlaybackPosition
double getPlaybackPosition()

Returns the position in the AudioStream in seconds.

getStream
Ref!AudioStream getStream()
getStreamPaused
bool getStreamPaused()
getVolumeDb
double getVolumeDb()
isAutoplayEnabled
bool isAutoplayEnabled()
isPlaying
bool isPlaying()
opAssign
AudioStreamPlayer opAssign(T n)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(AudioStreamPlayer other)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(typeof(null) n)
Undocumented in source. Be warned that the author may not have intended to support it.
play
void play(double from_position)

Plays the audio from the given position 'from_position', in seconds.

seek
void seek(double to_position)

Sets the position from which audio will be played, in seconds.

setAutoplay
void setAutoplay(bool enable)
setBus
void setBus(StringArg0 bus)
setMixTarget
void setMixTarget(long mix_target)
setPitchScale
void setPitchScale(double pitch_scale)
setStream
void setStream(AudioStream stream)
setStreamPaused
void setStreamPaused(bool pause)
setVolumeDb
void setVolumeDb(double volume_db)
stop
void stop()

Stops the audio.

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Properties

autoplay
bool autoplay [@property getter]
bool autoplay [@property setter]

If true audio plays when added to scene tree. Default value: false.

bus
String bus [@property getter]
String bus [@property setter]

Bus on which this audio is playing.

mixTarget
AudioStreamPlayer.MixTarget mixTarget [@property getter]
long mixTarget [@property setter]

If the audio configuration has more than two speakers, this sets the target channels. See MIX_TARGET_* constants.

pitchScale
double pitchScale [@property getter]
double pitchScale [@property setter]

Changes the pitch and the tempo of the audio.

playing
bool playing [@property getter]
bool playing [@property setter]

If true audio is playing.

stream
AudioStream stream [@property getter]
AudioStream stream [@property setter]

The AudioStream object to be played.

streamPaused
bool streamPaused [@property getter]
bool streamPaused [@property setter]
volumeDb
double volumeDb [@property getter]
double volumeDb [@property setter]

Volume of sound, in dB.

Static functions

_new
AudioStreamPlayer _new()
Undocumented in source. Be warned that the author may not have intended to support it.

Static variables

_classBindingInitialized
bool _classBindingInitialized;
Undocumented in source.

Structs

_classBinding
struct _classBinding
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
To as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
To as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
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