How to loop music in an AudioPlayer with AudioStreamInteractive?

I had this bit of code to loop music:

audioPlayer.Finished += () =>
{
	GD.Print("audio finished");
	audioPlayer.Play();
};

But after I switched the AudioStream to an AudioStreamInteractive to mess around with dynamic music, it no longer works. It looks like the Finished signal doesn’t get fired at all.

I tried importing an .ogg and checking “Loop” in the import settings, didn’t work.
I tried enabling “Auto advance” of the clip and setting “Next clip” to itself, also didn’t work.
Then I tried setting “Next clip” to a different clip… and instead of advancing to that clip it started looping. So it technically works but it feels like a bug, and I have to disable the transition for that clip to prevent a crossfade at the end of the clip.

I downloaded the 4.4-dev3 release and tried again, checking “Loop” in import settings works and “Auto advance” works as expected too

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