0 votes

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):
    print("finished")

Changing it to this made the signal function run:

func _on_MusicTrack_finished():
    print("finished")

I assumed it would pass in something to the signal.

Godot version 3.4.2
in Engine by (12 points)

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.