AudioStreamPlayer
Inherits: Node < ObjectDescription
A node for audio playback. The AudioStreamPlayer node plays an audio stream non-positionally. It is ideal for user interfaces, menus, or background music.Properties
AudioStream
The AudioStream resource to be played.
float
default:"0.0"
Volume of sound, in decibels.
float
default:"1.0"
The audio’s pitch and tempo, as a multiplier of the stream’s sample rate.
bool
default:"false"
If true, this node is playing sounds.
bool
default:"false"
If true, this node calls play when entering the tree.
StringName
default:"Master"
The target bus name. All sounds from this node will be playing on this bus.
Methods
play
float
Position in seconds to start playback from (default: 0.0)
stop
seek
get_playback_position
Signals
finished()
Emitted when a sound finishes playing without interruptions.Example Usage
- GDScript
- C#