Fix possible bug with AudioStreamPlayer2D audio position

This commit is contained in:
Marcelo Fernandez 2018-07-10 22:57:50 -03:00
parent a184126e8b
commit 0c78a58b64
1 changed files with 5 additions and 0 deletions

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;