AudioStreamPlayer with .wav file not emitting finished() signal

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By elgatopanzon

I added an AudioStreamPlayer to my scene and assigned it a .wav file, and set it to autoplay. I connected the finished() signal to the scene’s script. Then I put a print function inside to test the signal is emitted. However when the audio stops it does not emit the signal.

I tried the same thing in a blank project in Godot 3.4.2 and get the same results. To confirm looping is disabled.

EDIT: I figured out the problem. My signal callback function looked like this:

func _on_MusicTrack_finished(track):

Changing it to this made the signal function run:

func _on_MusicTrack_finished():

I assumed it would pass in something to the signal.