summaryrefslogtreecommitdiff
path: root/scene/3d/audio_stream_player_3d.cpp
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/3d/audio_stream_player_3d.cpp
parent8fa92c70eacd180866535a42d409e1c9e1074d73 (diff)
Return setseek position if one exists in get_playback_position.
Diffstat (limited to 'scene/3d/audio_stream_player_3d.cpp')
-rw-r--r--scene/3d/audio_stream_player_3d.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/scene/3d/audio_stream_player_3d.cpp b/scene/3d/audio_stream_player_3d.cpp
index d420bd6075..65d0703139 100644
--- a/scene/3d/audio_stream_player_3d.cpp
+++ b/scene/3d/audio_stream_player_3d.cpp
@@ -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();
}