summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-11-17 17:19:21 +0100
committerGitHub <noreply@github.com>2018-11-17 17:19:21 +0100
commit3c62a584eb2f5d017ec3e3c36429b9760cced23d (patch)
tree1812fa59ee697c326af68d7b58efb198609e23d2
parent563356109b12b3296b9359973329d7499dbfaa98 (diff)
parent016f7bd8f8e9bebceab6ef1cfc9c1fdc9c786871 (diff)
Merge pull request #23767 from marcelofg55/fix_is_playing
Fix AudioStreamPlayer2D/3D::is_playing right after a play()
-rw-r--r--scene/2d/audio_stream_player_2d.cpp1
-rw-r--r--scene/3d/audio_stream_player_3d.cpp1
2 files changed, 2 insertions, 0 deletions
diff --git a/scene/2d/audio_stream_player_2d.cpp b/scene/2d/audio_stream_player_2d.cpp
index a092ef826f..c2af725919 100644
--- a/scene/2d/audio_stream_player_2d.cpp
+++ b/scene/2d/audio_stream_player_2d.cpp
@@ -323,6 +323,7 @@ void AudioStreamPlayer2D::play(float p_from_pos) {
}
if (stream_playback.is_valid()) {
+ active = true;
setplay = p_from_pos;
output_ready = false;
set_physics_process_internal(true);
diff --git a/scene/3d/audio_stream_player_3d.cpp b/scene/3d/audio_stream_player_3d.cpp
index 401a1971c6..afd87deca6 100644
--- a/scene/3d/audio_stream_player_3d.cpp
+++ b/scene/3d/audio_stream_player_3d.cpp
@@ -641,6 +641,7 @@ float AudioStreamPlayer3D::get_pitch_scale() const {
void AudioStreamPlayer3D::play(float p_from_pos) {
if (stream_playback.is_valid()) {
+ active = true;
setplay = p_from_pos;
output_ready = false;
set_physics_process_internal(true);