summaryrefslogtreecommitdiff
path: root/scene/audio
diff options
context:
space:
mode:
authorTomasz Chabora <kobewi4e@gmail.com>2019-03-05 15:02:21 +0100
committerTomasz Chabora <kobewi4e@gmail.com>2019-03-05 15:04:29 +0100
commit4f840168d2b408f15783ed60875b1e09ec495eed (patch)
treefff07136f2cf82f937489167525ee71bead0e732 /scene/audio
parent45e7306b5adec09746fefda902a5414e5b53fdfa (diff)
Pause AudioStreamPlayer on SceneTree pause
Diffstat (limited to 'scene/audio')
-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);