mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-10-31 13:38:47 +00:00
code cleanup: static current_voice_selected
This commit is contained in:
@@ -47,7 +47,7 @@
|
||||
#include "ssml.h" // for SSML_STACK, ProcessSsmlTag, N_PARAM...
|
||||
#include "synthdata.h" // for SelectPhonemeTable
|
||||
#include "translate.h" // for Translator, utf8_out, CLAUSE_OPTION...
|
||||
#include "voice.h" // for voice, voice_t, current_voice_selected
|
||||
#include "voice.h" // for voice, voice_t, espeak_GetCurrentVoice
|
||||
|
||||
#define N_XML_BUF 500
|
||||
|
||||
@@ -419,7 +419,7 @@ void SetVoiceStack(espeak_VOICE *v, const char *variant_name)
|
||||
if (variant_name[0] == '!' && variant_name[1] == 'v' && variant_name[2] == PATHSEP)
|
||||
variant_name += 3; // strip variant directory name, !v plus PATHSEP
|
||||
strncpy0(base_voice_variant_name, variant_name, sizeof(base_voice_variant_name));
|
||||
memcpy(&base_voice, ¤t_voice_selected, sizeof(base_voice));
|
||||
memcpy(&base_voice, espeak_GetCurrentVoice(), sizeof(base_voice));
|
||||
}
|
||||
|
||||
static void RemoveChar(char *p)
|
||||
|
||||
@@ -381,7 +381,8 @@ ESPEAK_NG_API espeak_ng_STATUS espeak_ng_Initialize(espeak_ng_ERROR_CONTEXT *con
|
||||
WavegenInit(srate, 0);
|
||||
LoadConfig();
|
||||
|
||||
memset(¤t_voice_selected, 0, sizeof(current_voice_selected));
|
||||
espeak_VOICE *current_voice_selected = espeak_GetCurrentVoice();
|
||||
memset(current_voice_selected, 0, sizeof(espeak_VOICE));
|
||||
SetVoiceStack(NULL, "");
|
||||
SynthesizeInit();
|
||||
InitNamedata();
|
||||
|
||||
@@ -79,8 +79,6 @@ typedef struct {
|
||||
|
||||
} voice_t;
|
||||
|
||||
extern espeak_VOICE current_voice_selected;
|
||||
|
||||
extern voice_t *voice;
|
||||
extern int tone_points[12];
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ int formant_rate[9]; // values adjusted for actual sample rate
|
||||
static int n_voices_list = 0;
|
||||
static espeak_VOICE *voices_list[N_VOICES_LIST];
|
||||
|
||||
espeak_VOICE current_voice_selected;
|
||||
static espeak_VOICE current_voice_selected;
|
||||
|
||||
#define N_VOICE_VARIANTS 12
|
||||
static const char variants_either[N_VOICE_VARIANTS] = { 1, 2, 12, 3, 13, 4, 14, 5, 11, 0 };
|
||||
|
||||
Reference in New Issue
Block a user