Fix bug with AudioStreamPlayer3D audio position

Applies 0c78a58b64 to `AudioStreamPlayer3D::play`.
This commit is contained in:
hoontee 2020-05-07 02:23:50 -05:00 committed by GitHub
parent 1ff97485df
commit 330bd686ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -710,6 +710,11 @@ float AudioStreamPlayer3D::get_pitch_scale() const {
void AudioStreamPlayer3D::play(float p_from_pos) { 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()) { if (stream_playback.is_valid()) {
active = true; active = true;
setplay = p_from_pos; setplay = p_from_pos;