Fix JavaScript rate issues.

* Replace ints with floats when non-zero. Not sure if this is explicitly necessary, but at least it makes the type more obvious.
* Set initial JavaScript rate to 1.0, not 50. 50 was a remnant of the rate being a percentage, rather than a value between platform-specific minimums and maximums.
This commit is contained in:
Nolan Darilek 2020-08-27 15:27:50 -05:00
parent afdb73991f
commit 274902432c

6
TTS.gd
View File

@ -40,7 +40,7 @@ var min_rate setget , _get_min_rate
func _get_max_rate():
if OS.has_feature('JavaScript'):
return 10
return 10.0
elif Engine.has_singleton("GodotTTS"):
return 10.0
elif tts != null:
@ -54,7 +54,7 @@ var max_rate setget , _get_max_rate
func _get_normal_rate():
if OS.has_feature('JavaScript'):
return 1
return 1.0
elif Engine.has_singleton("GodotTTS"):
return 1.0
elif tts != null:
@ -65,7 +65,7 @@ func _get_normal_rate():
var normal_rate setget , _get_normal_rate
var javascript_rate = 50
var javascript_rate = 1.0
func _set_rate(rate):