summaryrefslogtreecommitdiff
path: root/scene/2d
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-02-16 12:19:09 +0100
committerGitHub <noreply@github.com>2021-02-16 12:19:09 +0100
commitc7444b033ef9bb567afe5cf5e82d67cbdfec396d (patch)
tree2d5c812a27dc9abace7a4587b26e6899bac6a9b4 /scene/2d
parent997a9f37f7fe74957732d3244a4a4eb85297eea3 (diff)
parent15b8480b2c76eecb5c9c31b88828345eed6224d6 (diff)
Merge pull request #46040 from ellenhp/fix_seek_playback_pos
Return setseek position if one exists in get_playback_position.
Diffstat (limited to 'scene/2d')
-rw-r--r--scene/2d/audio_stream_player_2d.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/scene/2d/audio_stream_player_2d.cpp b/scene/2d/audio_stream_player_2d.cpp
index 4e7eec906c..d6f35cc99d 100644
--- a/scene/2d/audio_stream_player_2d.cpp
+++ b/scene/2d/audio_stream_player_2d.cpp
@@ -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();
}