You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Core: Replace C math headers with C++ equivalents
- Minor restructuring to ensure `math_funcs.h` is the central point for math functions
This commit is contained in:
@@ -166,9 +166,9 @@ void TTS_Linux::_speech_event(int p_msg_id, int p_type) {
|
||||
spd_set_voice_pitch(synth, (message.pitch - 1) * 100);
|
||||
float rate = 0;
|
||||
if (message.rate > 1.f) {
|
||||
rate = log10(MIN(message.rate, 2.5f)) / log10(2.5f) * 100;
|
||||
rate = std::log10(MIN(message.rate, 2.5f)) / std::log10(2.5f) * 100;
|
||||
} else if (message.rate < 1.f) {
|
||||
rate = log10(MAX(message.rate, 0.5f)) / log10(0.5f) * -100;
|
||||
rate = std::log10(MAX(message.rate, 0.5f)) / std::log10(0.5f) * -100;
|
||||
}
|
||||
spd_set_voice_rate(synth, rate);
|
||||
spd_set_data_mode(synth, SPD_DATA_SSML);
|
||||
|
||||
Reference in New Issue
Block a user