Godot version:
3.2 beta 1
OS/device including version:
OSX Sierra
Issue description:
I have a button that stops the music and an AudioStreamPlayer finished() signal with $music.play() in it to play again. When I press the button to stop the music, it plays again, and I guess that Godot executes the stop() method the same way as the finished() signal ?
Btw I have no loop option in the inspector I guess it's because it's a wav file ?
Steps to reproduce:
In any project, add a Button and an AudioStreamPlayer with a song (1mn in my case but a shorter one would be better for testing). _on_button_pressed() -> $AudioStreamPlayer.stop() and _on_AudioStreamPlayer_finished() -> $AudioStreamPlayer.play()and you'll notice that when you press the stop button, the song plays again.
Minimal reproduction project:
Empty Godot project with one wav file.
Sounds like stopping AudioStreamPlayer emits finished signal. This is somewhat expected.
_Sounds like_ stopping AudioStreamPlayer emits
finishedsignal. This is somewhat expected.
Makes sense. Which means my method is dead wrong? Or maybe the two methods should be different? There's a redundancy here.
Seems like you are trying to achieve looping. You can do this easier by importing the audio sample with loop enabled.

Seems like you are trying to achieve looping. You can do this easier by importing the audio sample with loop enabled.
Thanks for the info ! But isn't it a problem that stop() emits a finished() signal ? Or is it by design ?
If so I'll close the issue. Thanks again !
It looks like by design to me, although I'm not an audio expert to say 100% sure.
Mmm. I'd like a core contributor opinion before closing the issue. To me it seems a bit redundant.
I believe stopping forcibly should not ever mean that a track is finished. See a fix at #33602.
Also would be good if this reproduction project is linked:
audio-stream-player-stop-finished.zip (Intro.ogg taken from demo projects).
The alternative to this could be introducing end_reached signal and treat finished signal as before:
finished = end of audio or stoppedend_reached = end of audio.Ok makes more sense ! Should I close this issue ? Sorry, still beginner in how issues work.
@rezgi I think you've raised a valid point, so I'd keep this issue open for now until the issue is fixed, which will be closed automatically for you, most of the time. 馃檪
Oh ok I see. I've seen commits and stuff about this, and since I'm not experienced, I'm not confident if I raise a valid point or not. So I'm leaving this issue opened. Thanks !
Most helpful comment
Oh ok I see. I've seen commits and stuff about this, and since I'm not experienced, I'm not confident if I raise a valid point or not. So I'm leaving this issue opened. Thanks !