Fix WAV resources ignoring the AudioServer's 'global_rate_scale' value
(cherry picked from commit 04ebe4e7a4
)
This commit is contained in:
parent
00c631b13c
commit
fc1f5e149f
@ -254,7 +254,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;
|
||||
|
Loading…
Reference in New Issue
Block a user