Browse Source

code cleanup: static current_voice_selected

master
Yury Popov 2 years ago
parent
commit
504ab4937d
No account linked to committer's email address

+ 2
- 2
src/libespeak-ng/readclause.c View File

#include "ssml.h" // for SSML_STACK, ProcessSsmlTag, N_PARAM... #include "ssml.h" // for SSML_STACK, ProcessSsmlTag, N_PARAM...
#include "synthdata.h" // for SelectPhonemeTable #include "synthdata.h" // for SelectPhonemeTable
#include "translate.h" // for Translator, utf8_out, CLAUSE_OPTION... #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 #define N_XML_BUF 500


if (variant_name[0] == '!' && variant_name[1] == 'v' && variant_name[2] == PATHSEP) if (variant_name[0] == '!' && variant_name[1] == 'v' && variant_name[2] == PATHSEP)
variant_name += 3; // strip variant directory name, !v plus PATHSEP variant_name += 3; // strip variant directory name, !v plus PATHSEP
strncpy0(base_voice_variant_name, variant_name, sizeof(base_voice_variant_name)); strncpy0(base_voice_variant_name, variant_name, sizeof(base_voice_variant_name));
memcpy(&base_voice, &current_voice_selected, sizeof(base_voice));
memcpy(&base_voice, espeak_GetCurrentVoice(), sizeof(base_voice));
} }


static void RemoveChar(char *p) static void RemoveChar(char *p)

+ 2
- 1
src/libespeak-ng/speech.c View File

WavegenInit(srate, 0); WavegenInit(srate, 0);
LoadConfig(); LoadConfig();


memset(&current_voice_selected, 0, sizeof(current_voice_selected));
espeak_VOICE *current_voice_selected = espeak_GetCurrentVoice();
memset(current_voice_selected, 0, sizeof(espeak_VOICE));
SetVoiceStack(NULL, ""); SetVoiceStack(NULL, "");
SynthesizeInit(); SynthesizeInit();
InitNamedata(); InitNamedata();

+ 0
- 2
src/libespeak-ng/voice.h View File



} voice_t; } voice_t;


extern espeak_VOICE current_voice_selected;

extern voice_t *voice; extern voice_t *voice;
extern int tone_points[12]; extern int tone_points[12];



+ 1
- 1
src/libespeak-ng/voices.c View File

static int n_voices_list = 0; static int n_voices_list = 0;
static espeak_VOICE *voices_list[N_VOICES_LIST]; static espeak_VOICE *voices_list[N_VOICES_LIST];


espeak_VOICE current_voice_selected;
static espeak_VOICE current_voice_selected;


#define N_VOICE_VARIANTS 12 #define N_VOICE_VARIANTS 12
static const char variants_either[N_VOICE_VARIANTS] = { 1, 2, 12, 3, 13, 4, 14, 5, 11, 0 }; static const char variants_either[N_VOICE_VARIANTS] = { 1, 2, 12, 3, 13, 4, 14, 5, 11, 0 };

Loading…
Cancel
Save