Migrate the speech rate parameter to use the new SeekBar/Parameter UI.

This commit is contained in:
Reece H. Dunn
2013-05-03 16:08:30 +01:00
parent 16164c1c52
commit d0f5dc2ff4
50 changed files with 20 additions and 341 deletions
@@ -197,9 +197,14 @@ public class TtsService extends TextToSpeechService {
return;
final int gender = getPreferenceValue("default_gender", 0);
final int rate = (getPreferenceValue("default_rate", 100) / 100) * mEngine.Rate.getDefaultValue();
final Bundle params = request.getParams();
int rate = getPreferenceValue("espeak_rate", Integer.MIN_VALUE);
if (rate == Integer.MIN_VALUE) {
// Try the old eyes-free setting:
rate = (getPreferenceValue("default_rate", 100) / 100) * mEngine.Rate.getDefaultValue();
}
int pitch = getPreferenceValue("espeak_pitch", Integer.MIN_VALUE);
if (pitch == Integer.MIN_VALUE) {
// Try the old eyes-free setting: