summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrobfram <robfram@gmail.com>2018-01-20 22:22:00 +0100
committerrobfram <robfram@gmail.com>2018-01-20 22:22:00 +0100
commitd588fe2740e3cb98b0f126e80490353333a5f97e (patch)
tree0d2295a828fc1886c50d60278087e4aaae8c3ab4
parentf5234e70be7dec4930c2d5a0e829ff480d044b1d (diff)
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.
-rw-r--r--scene/audio/audio_player.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/audio/audio_player.cpp b/scene/audio/audio_player.cpp
index cf070c2235..a42686a8fb 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");
}
}