summaryrefslogtreecommitdiff
path: root/scene/audio
diff options
context:
space:
mode:
authorEllen Poe <ellen@ellenhp.me>2021-02-14 20:41:59 -0800
committerEllen Poe <ellen@ellenhp.me>2021-02-14 20:41:59 -0800
commit15b8480b2c76eecb5c9c31b88828345eed6224d6 (patch)
tree5a90c10ffd844368adb5a39c0d28a643f10dbfef /scene/audio
parent8fa92c70eacd180866535a42d409e1c9e1074d73 (diff)
Return setseek position if one exists in get_playback_position.
Diffstat (limited to 'scene/audio')
-rw-r--r--scene/audio/audio_stream_player.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/scene/audio/audio_stream_player.cpp b/scene/audio/audio_stream_player.cpp
index 4f77734b79..ec0a4b8696 100644
--- a/scene/audio/audio_stream_player.cpp
+++ b/scene/audio/audio_stream_player.cpp
@@ -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();
}