Merge pull request #20093 from marcelofg55/audio_stream2d

Fix possible bug with AudioStreamPlayer2D audio position
This commit is contained in:
George Marques 2018-07-11 14:37:07 -03:00 committed by GitHub
commit 11c36a939d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -304,6 +304,11 @@ float AudioStreamPlayer2D::get_pitch_scale() const {
void AudioStreamPlayer2D::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()) {
setplay = p_from_pos;
output_ready = false;