From d588fe2740e3cb98b0f126e80490353333a5f97e Mon Sep 17 00:00:00 2001 From: robfram Date: Sat, 20 Jan 2018 22:22:00 +0100 Subject: [PATCH] Fix issue 15895, audio streams don't signalling finished after the first one if the audio player is set to play again due to the order of calls in _notification. First it emits the signal, and later it disable the internal processing regardless what the callback did. Changed to emit the signal at the end to ensure the changes done at callback remains. --- scene/audio/audio_player.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/audio/audio_player.cpp b/scene/audio/audio_player.cpp index cf070c22358..a42686a8fbe 100644 --- a/scene/audio/audio_player.cpp +++ b/scene/audio/audio_player.cpp @@ -126,8 +126,8 @@ void AudioStreamPlayer::_notification(int p_what) { if (!active || (setseek < 0 && !stream_playback->is_playing())) { active = false; - emit_signal("finished"); set_process_internal(false); + emit_signal("finished"); } }