Skip to content

Commit

Permalink
Merge pull request #46202 from ellenhp/fix_mix_before_start
Browse files Browse the repository at this point in the history
Always call start() on audio stream before mixing
  • Loading branch information
akien-mga authored Feb 19, 2021
2 parents aeea428 + eb5566f commit c8c3bcd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scene/audio/audio_stream_player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion scene/audio/audio_stream_player.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class AudioStreamPlayer : public Node {
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;
Expand Down

0 comments on commit c8c3bcd

Please sign in to comment.