Fix pops in play() of both spatial audio players
(cherry picked from commit 5e1442ad55
)
This commit is contained in:
parent
ad7710ae5e
commit
8a426923c2
2 changed files with 2 additions and 4 deletions
|
@ -323,7 +323,6 @@ 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);
|
||||
|
@ -349,7 +348,7 @@ void AudioStreamPlayer2D::stop() {
|
|||
bool AudioStreamPlayer2D::is_playing() const {
|
||||
|
||||
if (stream_playback.is_valid()) {
|
||||
return active; // && stream_playback->is_playing();
|
||||
return active || setplay >= 0;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
|
@ -707,7 +707,6 @@ 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);
|
||||
|
@ -733,7 +732,7 @@ void AudioStreamPlayer3D::stop() {
|
|||
bool AudioStreamPlayer3D::is_playing() const {
|
||||
|
||||
if (stream_playback.is_valid()) {
|
||||
return active; // && stream_playback->is_playing();
|
||||
return active || setplay >= 0;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue