Fix possible bug with AudioStreamPlayer2D audio position
(cherry picked from commit 0c78a58b64
)
This commit is contained in:
parent
b64850e732
commit
d3a482ab65
|
@ -287,6 +287,11 @@ float AudioStreamPlayer2D::get_pitch_scale() const {
|
||||||
|
|
||||||
void AudioStreamPlayer2D::play(float p_from_pos) {
|
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()) {
|
if (stream_playback.is_valid()) {
|
||||||
setplay = p_from_pos;
|
setplay = p_from_pos;
|
||||||
output_ready = false;
|
output_ready = false;
|
||||||
|
|
Loading…
Reference in New Issue