Looping AudioStreamPlaylist should activate AudioStreamRandomizer randomization?

Godot Version

v4.5.beta4.official [2d113cc22]

Question

As the title says. I have tried to play random audios in a loop using AudioStreamPlaylist and as a child track an AudioStreamRandomizer but when looping the sound, it just plays the same sound over and over. I don’t post this as an error as I don’t really know if this is intended or an error, so any help or workarounds are appreciated.

So lets say you have three songs, 1,2,3. Are you saying that every time they loop they play in the same random order, say 3,1,2?

No, I am saying that if you have an AudioStreamRandomizer with 3 sounds, and you put an AudioStreamPlaylist around it in loop you will always hear the same sound.

This is the structure:

  • Playlist (Loop enabled)
    • Randomizer
      • Song 1
      • Song 2
      • Song 3

Let’s suppose the randomizer selects the first one, then Song 1 will play on loop every time. It will not try to random select other songs when looping.

1 Like

Ok so I went and looked at a test project I did to make this happen. I used an AudioStreamPlaylist and turned on Shuffle and Loop. It randomizes the playlist for you every time it loops. No need for an AudioStreamRandomizer

Would that work for you?

1 Like

Thanks! But what do I do If I need to change the pitch or give weight to each track like the randomizer does?

1 Like

Create a randomizer for each track that needs one.

Playlist
|
|-- Randomizer
|   |-- Song 1
|
|-- Randomizer
|   |-- Song 2
|
|-- Song 1
1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.