code cleanup: simplify speed.fast_settings.

speed.fast_settings[] was introduced in 7b2eecc724 to be used with
Sonic. Looks like after 7b2eecc724 the code related to everything
except fast_settings[0] was removed.

Might be that speed.fast_settings[0] is also irrelevant and could be
removed.
This commit is contained in:
Juho Hiltunen
2021-03-13 20:46:40 +02:00
parent 74ebdb4126
commit aa62682869
3 changed files with 4 additions and 6 deletions
+1 -1
View File
@@ -165,7 +165,7 @@ void SetSpeed(int control)
if (control & 2)
DoSonicSpeed(1 * 1024);
if ((wpm_value >= espeakRATE_MAXIMUM) || ((wpm_value > speed.fast_settings[0]) && (wpm > 350))) {
if ((wpm_value >= espeakRATE_MAXIMUM) || ((wpm_value > speed.fast_settings) && (wpm > 350))) {
wpm2 = wpm;
wpm = espeakRATE_NORMAL;
+1 -1
View File
@@ -350,7 +350,7 @@ typedef struct {
int lenmod_factor;
int lenmod2_factor;
int min_sample_len;
int fast_settings[8];
int fast_settings; // TODO: rename this variable to better explain the purpose, or delete if there is none
} SPEED_FACTORS;
typedef struct {
+2 -4
View File
@@ -380,9 +380,7 @@ void VoiceReset(int tone_only)
voice->samplerate = samplerate_native;
memset(voice->klattv, 0, sizeof(voice->klattv));
speed.fast_settings[0] = espeakRATE_MAXIMUM;
speed.fast_settings[1] = 800;
speed.fast_settings[2] = espeakRATE_NORMAL;
speed.fast_settings = espeakRATE_MAXIMUM;
voice->roughness = 2;
@@ -820,7 +818,7 @@ voice_t *LoadVoice(const char *vname, int control)
voice->klattv[KLATT_Kopen] -= 40;
break;
case V_FAST:
Read8Numbers(p, speed.fast_settings);
sscanf(p, "%d", &speed.fast_settings);
SetSpeed(3);
break;
case V_DICTMIN: