Merge pull request #26638 from KoBeWi/fix_audio_stream_player

Pause AudioStreamPlayer on SceneTree pause
This commit is contained in:
Rémi Verschelde 2019-03-05 16:58:40 +01:00 committed by GitHub
commit 12fefc1a6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -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);