diff options
-rw-r--r-- | scene/resources/audio_stream_sample.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scene/resources/audio_stream_sample.cpp b/scene/resources/audio_stream_sample.cpp index f02e7987a9..600a859894 100644 --- a/scene/resources/audio_stream_sample.cpp +++ b/scene/resources/audio_stream_sample.cpp @@ -261,7 +261,8 @@ void AudioStreamPlaybackSample::mix(AudioFrame *p_buffer, float p_rate_scale, in sign = -1; } - float base_rate = AudioServer::get_singleton()->get_mix_rate(); + float global_rate_scale = AudioServer::get_singleton()->get_global_rate_scale(); + float base_rate = AudioServer::get_singleton()->get_mix_rate() * global_rate_scale; float srate = base->mix_rate; srate *= p_rate_scale; float fincrement = srate / base_rate; |