mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-10-31 05:35:35 +00:00
code cleanup: static current_phoneme_table
This commit is contained in:
@@ -249,7 +249,6 @@ phoneme_add_feature(PHONEME_TAB *phoneme,
|
||||
// Several phoneme tables may be loaded into memory. phoneme_tab points to
|
||||
// one for the current voice
|
||||
extern int n_phoneme_tab;
|
||||
extern int current_phoneme_table;
|
||||
extern PHONEME_TAB *phoneme_tab[N_PHONEME_TAB];
|
||||
|
||||
typedef struct {
|
||||
|
||||
@@ -49,7 +49,7 @@ const int version_phdata = 0x014801;
|
||||
|
||||
// copy the current phoneme table into here
|
||||
int n_phoneme_tab;
|
||||
int current_phoneme_table;
|
||||
static int current_phoneme_table;
|
||||
PHONEME_TAB *phoneme_tab[N_PHONEME_TAB];
|
||||
|
||||
static unsigned short *phoneme_index = NULL;
|
||||
@@ -164,6 +164,7 @@ void FreePhData(void)
|
||||
phoneme_index = NULL;
|
||||
phondata_ptr = NULL;
|
||||
tunes = NULL;
|
||||
current_phoneme_table = -1;
|
||||
}
|
||||
|
||||
int PhonemeCode(unsigned int mnem)
|
||||
@@ -353,6 +354,7 @@ static void SetUpPhonemeTable(int number)
|
||||
|
||||
void SelectPhonemeTable(int number)
|
||||
{
|
||||
if (current_phoneme_table == number) return;
|
||||
n_phoneme_tab = 0;
|
||||
MAKE_MEM_UNDEFINED(&phoneme_tab, sizeof(phoneme_tab));
|
||||
SetUpPhonemeTable(number); // recursively for included phoneme tables
|
||||
|
||||
@@ -1549,8 +1549,7 @@ int SpeakNextClause(int control)
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (current_phoneme_table != voice->phoneme_tab_ix)
|
||||
SelectPhonemeTable(voice->phoneme_tab_ix);
|
||||
SelectPhonemeTable(voice->phoneme_tab_ix);
|
||||
|
||||
// read the next clause from the input text file, translate it, and generate
|
||||
// entries in the wavegen command queue
|
||||
|
||||
Reference in New Issue
Block a user