summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-03-05 16:58:40 +0100
committerGitHub <noreply@github.com>2019-03-05 16:58:40 +0100
commit12fefc1a6c19830efb8c85d85b793de711fe12f8 (patch)
tree7965663b9b3c08a966a1a9b32dff02a015473a27 /scene
parent9ea67d5718585415e32a81032f67ce12fa5c6dbd (diff)
parent4f840168d2b408f15783ed60875b1e09ec495eed (diff)
Merge pull request #26638 from KoBeWi/fix_audio_stream_player
Pause AudioStreamPlayer on SceneTree pause
Diffstat (limited to 'scene')
-rw-r--r--scene/audio/audio_stream_player.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/scene/audio/audio_stream_player.cpp b/scene/audio/audio_stream_player.cpp
index 5c95cf4279..2688041d18 100644
--- a/scene/audio/audio_stream_player.cpp
+++ b/scene/audio/audio_stream_player.cpp
@@ -91,8 +91,10 @@ void AudioStreamPlayer::_mix_internal(bool p_fadeout) {
void AudioStreamPlayer::_mix_audio() {
- if (!stream_playback.is_valid() || !active)
+ if (!stream_playback.is_valid() || !active ||
+ (stream_paused && !stream_fade)) {
return;
+ }
if (stream_fade) {
_mix_internal(true);