Plays back audio.
|float||get_playback_position ( )|
|void||play ( float from_position=0.0 )|
|void||seek ( float to_position )|
|void||stop ( )|
- finished ( )
Emitted when the audio stops playing.
- bool autoplay - If
trueaudio plays when added to scene tree. Default value:
- String bus - Bus on which this audio is playing.
- int mix_target - If the audio configuration has more than two speakers, this sets the target channels. See
- bool playing - If
trueaudio is playing.
- AudioStream stream - The AudioStream object to be played.
- float volume_db - Volume of sound, in dB.
- MIX_TARGET_STEREO = 0 — The audio will be played only on the first channel.
- MIX_TARGET_SURROUND = 1 — The audio will be played on all surround channels.
- MIX_TARGET_CENTER = 2 — The audio will be played on the second channel, which is usually the center.
Plays background audio.
Member Function Description¶
- float get_playback_position ( )
Returns the position in the AudioStream.
- void play ( float from_position=0.0 )
Plays the audio from the given position ‘from_position’, in seconds.
- void seek ( float to_position )
Sets the position from which audio will be played, in seconds.
- void stop ( )
Stops the audio.