summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
Diffstat (limited to 'scene')
-rw-r--r--scene/audio/audio_stream_player.cpp2
-rw-r--r--scene/audio/audio_stream_player.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/scene/audio/audio_stream_player.cpp b/scene/audio/audio_stream_player.cpp
index 7957571ab7..2853a8b9d9 100644
--- a/scene/audio/audio_stream_player.cpp
+++ b/scene/audio/audio_stream_player.cpp
@@ -105,7 +105,7 @@ void AudioStreamPlayer::_mix_audio() {
}
if (stream_paused) {
- if (stream_paused_fade) {
+ if (stream_paused_fade && stream_playback->is_playing()) {
_mix_internal(true);
stream_paused_fade = false;
}
diff --git a/scene/audio/audio_stream_player.h b/scene/audio/audio_stream_player.h
index d8f83ee38d..aa8d088be5 100644
--- a/scene/audio/audio_stream_player.h
+++ b/scene/audio/audio_stream_player.h
@@ -50,7 +50,7 @@ private:
Ref<AudioStream> stream;
Vector<AudioFrame> mix_buffer;
Vector<AudioFrame> fadeout_buffer;
- bool use_fadeout;
+ bool use_fadeout = false;
SafeNumeric<float> setseek{ -1.0 };
SafeFlag active;