Return setseek position if one exists in get_playback_position.

(cherry picked from commit 15b8480b2c)
This commit is contained in:
Ellen Poe 2021-02-14 20:41:59 -08:00 committed by Rémi Verschelde
parent 5db83defcd
commit 3d34803edc
No known key found for this signature in database
GPG Key ID: C3336907360768E1
3 changed files with 9 additions and 0 deletions

View File

@ -358,6 +358,9 @@ bool AudioStreamPlayer2D::is_playing() const {
float AudioStreamPlayer2D::get_playback_position() {
if (stream_playback.is_valid()) {
if (setseek >= 0.0) {
return setseek;
}
return stream_playback->get_playback_position();
}

View File

@ -742,6 +742,9 @@ bool AudioStreamPlayer3D::is_playing() const {
float AudioStreamPlayer3D::get_playback_position() {
if (stream_playback.is_valid()) {
if (setseek >= 0.0) {
return setseek;
}
return stream_playback->get_playback_position();
}

View File

@ -281,6 +281,9 @@ bool AudioStreamPlayer::is_playing() const {
float AudioStreamPlayer::get_playback_position() {
if (stream_playback.is_valid()) {
if (setseek >= 0.0) {
return setseek;
}
return stream_playback->get_playback_position();
}