summaryrefslogtreecommitdiff
path: root/scene/2d
diff options
context:
space:
mode:
authorMicky <micheledevita2@gmail.com>2022-09-05 22:08:12 +0200
committerMicky <micheledevita2@gmail.com>2022-11-22 15:46:28 +0100
commitb6db09968dbae879a7d0c172eb22cbd2f307d012 (patch)
treecf64a3b2f27f175e17ba6dbf352f39c4cc309970 /scene/2d
parente3a51e53ef055a1fe94351b68173c6dfcd2cb371 (diff)
Fix AudioStreamPlayer2D and 3D's `playing` not updating right away
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 9ac3083718..2ded209180 100644
--- a/scene/2d/audio_stream_player_2d.cpp
+++ b/scene/2d/audio_stream_player_2d.cpp
@@ -284,6 +284,9 @@ bool AudioStreamPlayer2D::is_playing() const {
return true;
}
}
+ if (setplay.get() >= 0) {
+ return true; // play() has been called this frame, but no playback exists just yet.
+ }
return false;
}