Merge pull request #46040 from ellenhp/fix_seek_playback_pos
Return setseek position if one exists in get_playback_position.
This commit is contained in:
commit
c7444b033e
3 changed files with 9 additions and 0 deletions
|
@ -342,6 +342,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();
|
||||
}
|
||||
|
||||
|
|
|
@ -714,6 +714,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();
|
||||
}
|
||||
|
||||
|
|
|
@ -267,6 +267,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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue