code cleanup: remove unnecessary current_phoneme_table

The SelectPhonemeTable(voice->phoneme_tab_ix) has no effect for tests.
Passing other values here breaks tests. That means that the relevant
calls SelectPhonemeTable() are already made in other functions.

voice->phoneme_tab_ix is set in LoadVoice().
This commit is contained in:
Juho Hiltunen
2021-03-21 11:20:45 +02:00
parent 8ce104a315
commit 1724f79528
-4
View File
@@ -1536,7 +1536,6 @@ int Generate(PHONEME_LIST *phoneme_list, int *n_ph, bool resume)
return 0; // finished the phoneme list
}
static int current_phoneme_table;
int SpeakNextClause(int control)
{
// Speak text from memory (text_in)
@@ -1564,9 +1563,6 @@ int SpeakNextClause(int control)
return 0;
}
if (current_phoneme_table != voice->phoneme_tab_ix)
current_phoneme_table = SelectPhonemeTable(voice->phoneme_tab_ix);
// read the next clause from the input text file, translate it, and generate
// entries in the wavegen command queue
TranslateClause(translator, &clause_tone, &voice_change);