Merge pull request #46202 from ellenhp/fix_mix_before_start

Always call start() on audio stream before mixing
This commit is contained in:
Rémi Verschelde 2021-02-19 11:24:57 +01:00 committed by GitHub
commit c8c3bcd32f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

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

View file

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