Merge pull request #43316 from YeldhamDev/rate_scale_wav_fix
Fix WAV resources ignoring the AudioServer's 'global_rate_scale' value
This commit is contained in:
commit
d105c718fd
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue