Hello ! Is there a way to use AudioStreamPlaylist to play one specific AudioStream and loop it instead of it jumping to another audio when it ends?
From the official documentation, it seems we may only get the current bpm of the AudioStream but nothing to play a specific audio. AudioStreamPlaylist doc
I’ve found out that AudioStreamPlaylist is not designed to do what was asking for in this post. AudioStreamPlaylist seems to be designed like Minecraft Tracks would work: random songs playing over time. The better way would be using AudioStreamInteractive instead, since it has a « switch_to_clip » feature.
In my opinion, AudioStreamPlaylist seems to be a circular list that acts as background music, in fact, you can’t or it is difficult to get the audio that AudioStreamPlaylist is currently playing.
You can play a given audio by trying to calculate the duration of all the audio clips in AudioStreamPlaylist and seeking a given duration.
But the best way to meet your needs is to either enable a loop on the audio asset when importing it, or just add a clip to the AudioStreamPlaylist and enable a loop. You can just use the set_list_stream method to switch between clips that need to be looped