Skip to content
Download
API reference

AudioStreamPlaylist

Inherits: AudioStream < Resource < Shared < Object

AudioStream that includes sub-streams and plays them back like a playlist.

An audio stream that can play back sub-streams in sequence. Streams can be added to the Playlist with set_list_stream(), and shuffled with shuffle.

TypeNameDefault
floatfade_time0.3
boollooptrue
boolshufflefalse
intstream_count0
ReturnsMethod
floatget_bpm()
AudioStreamget_list_stream(stream_index)
voidset_list_stream(stream_index, audio_stream)

  • MAX_STREAMS = 64 — Maximum amount of streams supported in the playlist.

float fade_time = 0.3

Setter/getter: set_fade_time(), get_fade_time()

Fade time used when a stream ends, when going to the next one. Streams are expected to have an extra bit of audio after the end to help with fading.

bool loop = true

Setter/getter: set_loop(), has_loop()

If true, the playlist will loop, otherwise the playlist will end when the last stream is finished.

bool shuffle = false

Setter/getter: set_shuffle(), get_shuffle()

If true, the playlist will shuffle each time playback starts and each time it loops.

int stream_count = 0

Setter/getter: set_stream_count(), get_stream_count()

Amount of streams in the playlist.

float get_bpm() const

Returns the BPM of the playlist, which can vary depending on the clip being played.

AudioStream get_list_stream(stream_index: int) const

Returns the stream at playback position index.

void set_list_stream(stream_index: int, audio_stream: AudioStream)

Sets the stream at playback position index.