diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-05-07 11:18:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-07 11:18:20 +0200 |
commit | 49a1e3db12a5543ab9e512ad04c478d9d5ef77c7 (patch) | |
tree | 58d007273ebd1ab2f7aba6d3923d3cc9ac87ecf7 /scene | |
parent | 9668c1cd2286640d543dcf5fe3947f17589af70f (diff) | |
parent | 330bd686ab6068f51b536d7f351a8c6641300749 (diff) |
Merge pull request #38524 from hoontee/master
Fix bug with AudioStreamPlayer3D audio position
Diffstat (limited to 'scene')
-rw-r--r-- | scene/3d/audio_stream_player_3d.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scene/3d/audio_stream_player_3d.cpp b/scene/3d/audio_stream_player_3d.cpp index f2395d35fb..5701d3cea2 100644 --- a/scene/3d/audio_stream_player_3d.cpp +++ b/scene/3d/audio_stream_player_3d.cpp @@ -710,6 +710,11 @@ float AudioStreamPlayer3D::get_pitch_scale() const { void AudioStreamPlayer3D::play(float p_from_pos) { + if (!is_playing()) { + // Reset the prev_output_count if the stream is stopped + prev_output_count = 0; + } + if (stream_playback.is_valid()) { active = true; setplay = p_from_pos; |