AudioStreamPlaylist
Inherits: AudioStream < Resource < RefCounted < Object
Description
Section titled “Description”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.
Properties
Section titled “Properties”| Type | Name | Default |
|---|---|---|
| float | fade_time |
0.3 |
| bool | loop |
true |
| bool | shuffle |
false |
| int | stream_count |
0 |
Methods
Section titled “Methods”| Returns | Method |
|---|---|
| float | get_bpm() const |
| AudioStream | get_list_stream(stream_index: int) const |
| void | set_list_stream(stream_index: int, audio_stream: AudioStream) |
Constants
Section titled “Constants”MAX_STREAMS = 64
Maximum amount of streams supported in the playlist.
Property descriptions
Section titled “Property descriptions”fade_time
float fade_time = 0.3
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.
loop
bool loop = true
If true, the playlist will loop, otherwise the playlist will end when the last stream is finished.
shuffle
bool shuffle = false
If true, the playlist will shuffle each time playback starts and each time it loops.
stream_count
int stream_count = 0
Amount of streams in the playlist.
Method descriptions
Section titled “Method descriptions”get_bpm
float get_bpm() const
Returns the BPM of the playlist, which can vary depending on the clip being played.
get_list_stream
AudioStream get_list_stream(stream_index: int) const
Returns the stream at playback position index.
set_list_stream
void set_list_stream(stream_index: int, audio_stream: AudioStream)
Sets the stream at playback position index.
