Skip to content

Commit

Permalink
Fix possible bug with AudioStreamPlayer2D audio position
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelofg55 committed Jul 11, 2018
1 parent a184126 commit 0c78a58
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scene/2d/audio_stream_player_2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0c78a58

Please sign in to comment.