How to queue multiple AudioStreams?

Godot Version

4.2.2

Question

Unlike something like the AnimationPlayer, I can’t queue multiple AudioStreams on a AudioStreamPlayer so they play perfectly one after the other. My music composer is looking a way to play a piece of music that serves as an entry into the second piece of music which is a loop. How do I go about realizing this?

You can wait for Godot 4.3 to be released which add interactive music support Add interactive music support by reduz · Pull Request #64488 · godotengine/godot · GitHub you can play with it in the latest dev release as of today Dev snapshot: Godot 4.3 dev 6

For now your only option is to manually play the new audio when the last one finishes. You could use the AudioStreamPlayer.finished signal to play the next one.

1 Like

Ah dang, that looks great indeed! I’m not able to go into any dev or alpha versions because I’m making a game that’s set to release this year, but I’ll make the switch when able.

My music composer actually found another solution just now!! In the import settings of the AudioStream (the audio clip) you can enter a ‘loop begin’ and when you set loop to true, it’ll still play the clip from the very start – and start looping once it’s inside the loop area. Thumbs up!!