mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-04 14:33:31 +00:00
code cleanup: remove unused variables
this_ph_data, N_WAV_BUF, option.device, harm_sqrt_n, max_hval, next_pause
This commit is contained in:
@@ -73,7 +73,6 @@ long count_samples;
|
||||
struct audio_object *my_audio = NULL;
|
||||
#endif
|
||||
|
||||
static const char *option_device = NULL;
|
||||
static unsigned int my_unique_identifier = 0;
|
||||
static void *my_user_data = NULL;
|
||||
static espeak_ng_OUTPUT_MODE my_mode = ENOUTPUT_MODE_SYNCHRONOUS;
|
||||
@@ -267,7 +266,6 @@ static int check_data_path(const char *path, int allow_directory)
|
||||
|
||||
ESPEAK_NG_API espeak_ng_STATUS espeak_ng_InitializeOutput(espeak_ng_OUTPUT_MODE output_mode, int buffer_length, const char *device)
|
||||
{
|
||||
option_device = device;
|
||||
my_mode = output_mode;
|
||||
out_samplerate = 0;
|
||||
|
||||
|
||||
@@ -421,8 +421,6 @@ void LoadConfig(void)
|
||||
fclose(f);
|
||||
}
|
||||
|
||||
PHONEME_DATA this_ph_data;
|
||||
|
||||
static void InvalidInstn(PHONEME_TAB *ph, int instn)
|
||||
{
|
||||
fprintf(stderr, "Invalid instruction %.4x for phoneme '%s'\n", instn, WordToString(ph->mnemonic));
|
||||
|
||||
@@ -71,12 +71,8 @@ SOUND_ICON soundicon_tab[N_SOUNDICON_TAB];
|
||||
|
||||
#define RMS_GLOTTAL1 35 // vowel before glottal stop
|
||||
#define RMS_START 28 // 28
|
||||
|
||||
#define VOWEL_FRONT_LENGTH 50
|
||||
|
||||
// a dummy phoneme_list entry which looks like a pause
|
||||
static PHONEME_LIST next_pause;
|
||||
|
||||
const char *WordToString(unsigned int word)
|
||||
{
|
||||
// Convert a phoneme mnemonic word into a string
|
||||
@@ -95,10 +91,6 @@ void SynthesizeInit()
|
||||
last_amp_cmd = 0;
|
||||
last_frame = NULL;
|
||||
syllable_centre = -1;
|
||||
|
||||
// initialise next_pause, a dummy phoneme_list entry
|
||||
next_pause.type = phPAUSE;
|
||||
next_pause.newword = 0;
|
||||
}
|
||||
|
||||
static void EndAmplitude(void)
|
||||
|
||||
@@ -46,8 +46,6 @@
|
||||
|
||||
#include "sintab.h"
|
||||
|
||||
#define N_WAV_BUF 10
|
||||
|
||||
static void SetSynth(int length, int modn, frame_t *fr1, frame_t *fr2, voice_t *v);
|
||||
|
||||
voice_t *wvoice = NULL;
|
||||
@@ -77,15 +75,12 @@ static int echo_length = 0; // period (in sample\) to ensure completion of echo
|
||||
static int voicing;
|
||||
static RESONATOR rbreath[N_PEAKS];
|
||||
|
||||
static int harm_sqrt_n = 0;
|
||||
|
||||
#define N_LOWHARM 30
|
||||
#define MAX_HARMONIC 400 // 400 * 50Hz = 20 kHz, more than enough
|
||||
static int harm_inc[N_LOWHARM]; // only for these harmonics do we interpolate amplitude between steps
|
||||
static int *harmspect;
|
||||
static int hswitch = 0;
|
||||
static int hspect[2][MAX_HARMONIC]; // 2 copies, we interpolate between then
|
||||
static int max_hval = 0;
|
||||
|
||||
static int nsamples = 0; // number to do
|
||||
static int modulation_type = 0;
|
||||
@@ -339,7 +334,6 @@ void WavegenInit(int rate, int wavemult_fact)
|
||||
samplecount = 0;
|
||||
nsamples = 0;
|
||||
wavephase = 0x7fffffff;
|
||||
max_hval = 0;
|
||||
|
||||
wdata.amplitude = 32;
|
||||
wdata.amplitude_fmt = 100;
|
||||
@@ -1172,7 +1166,6 @@ static void SetSynth(int length, int modn, frame_t *fr1, frame_t *fr2, voice_t *
|
||||
static int glottal_reduce_tab1[4] = { 0x30, 0x30, 0x40, 0x50 }; // vowel before [?], amp * 1/256
|
||||
static int glottal_reduce_tab2[4] = { 0x90, 0xa0, 0xb0, 0xc0 }; // vowel after [?], amp * 1/256
|
||||
|
||||
harm_sqrt_n = 0;
|
||||
end_wave = 1;
|
||||
|
||||
// any additional information in the param1 ?
|
||||
|
||||
Reference in New Issue
Block a user