
Simply cast the stream resource as the class AudioStreamOGGVorbis and then you have access to the set_loop function. I imported it with looping (the default) and during the game I did want it to loop repeatedly in the scene it was playing in (an animated shop dialog scene), but after the dialog ended, I didn't want the loop to end abruptly with the stop function call and when the audio is looping it won't trigger the finished() signal, so how could I get access to stop looping (after the animation and dialog finished), but let the sound play to completion first? After scrubbing the internet I found no answers, but trying a bunch of things, I finally found a simple two line solution: var strm = $Music.stream as AudioStreamOGGVorbis I had an AudioStreamPlayer2D node with an imported OGG Vorbis resource.


I know this is an old post, but I needed help with a very similar issue.
