mirror of
https://github.com/godotengine/godot.git
synced 2025-02-10 21:01:20 +00:00
Fix WAV resources ignoring the AudioServer's 'global_rate_scale' value
This commit is contained in:
parent
8e13b93bf7
commit
04ebe4e7a4
@ -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 New Issue
Block a user