Browse Source

code cleanup: remove unused variables

this_ph_data, N_WAV_BUF, option.device, harm_sqrt_n,  max_hval, next_pause
master
Juho Hiltunen 5 years ago
parent
commit
725bdda564

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

struct audio_object *my_audio = NULL; struct audio_object *my_audio = NULL;
#endif #endif


static const char *option_device = NULL;
static unsigned int my_unique_identifier = 0; static unsigned int my_unique_identifier = 0;
static void *my_user_data = NULL; static void *my_user_data = NULL;
static espeak_ng_OUTPUT_MODE my_mode = ENOUTPUT_MODE_SYNCHRONOUS; static espeak_ng_OUTPUT_MODE my_mode = ENOUTPUT_MODE_SYNCHRONOUS;


ESPEAK_NG_API espeak_ng_STATUS espeak_ng_InitializeOutput(espeak_ng_OUTPUT_MODE output_mode, int buffer_length, const char *device) 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; my_mode = output_mode;
out_samplerate = 0; out_samplerate = 0;



+ 0
- 2
src/libespeak-ng/synthdata.c View File

fclose(f); fclose(f);
} }


PHONEME_DATA this_ph_data;

static void InvalidInstn(PHONEME_TAB *ph, int instn) static void InvalidInstn(PHONEME_TAB *ph, int instn)
{ {
fprintf(stderr, "Invalid instruction %.4x for phoneme '%s'\n", instn, WordToString(ph->mnemonic)); fprintf(stderr, "Invalid instruction %.4x for phoneme '%s'\n", instn, WordToString(ph->mnemonic));

+ 0
- 8
src/libespeak-ng/synthesize.c View File



#define RMS_GLOTTAL1 35 // vowel before glottal stop #define RMS_GLOTTAL1 35 // vowel before glottal stop
#define RMS_START 28 // 28 #define RMS_START 28 // 28

#define VOWEL_FRONT_LENGTH 50 #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) const char *WordToString(unsigned int word)
{ {
// Convert a phoneme mnemonic word into a string // Convert a phoneme mnemonic word into a string
last_amp_cmd = 0; last_amp_cmd = 0;
last_frame = NULL; last_frame = NULL;
syllable_centre = -1; syllable_centre = -1;

// initialise next_pause, a dummy phoneme_list entry
next_pause.type = phPAUSE;
next_pause.newword = 0;
} }


static void EndAmplitude(void) static void EndAmplitude(void)

+ 0
- 7
src/libespeak-ng/wavegen.c View File



#include "sintab.h" #include "sintab.h"


#define N_WAV_BUF 10

static void SetSynth(int length, int modn, frame_t *fr1, frame_t *fr2, voice_t *v); static void SetSynth(int length, int modn, frame_t *fr1, frame_t *fr2, voice_t *v);


voice_t *wvoice = NULL; voice_t *wvoice = NULL;
static int voicing; static int voicing;
static RESONATOR rbreath[N_PEAKS]; static RESONATOR rbreath[N_PEAKS];


static int harm_sqrt_n = 0;

#define N_LOWHARM 30 #define N_LOWHARM 30
#define MAX_HARMONIC 400 // 400 * 50Hz = 20 kHz, more than enough #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 harm_inc[N_LOWHARM]; // only for these harmonics do we interpolate amplitude between steps
static int *harmspect; static int *harmspect;
static int hswitch = 0; static int hswitch = 0;
static int hspect[2][MAX_HARMONIC]; // 2 copies, we interpolate between then 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 nsamples = 0; // number to do
static int modulation_type = 0; static int modulation_type = 0;
samplecount = 0; samplecount = 0;
nsamples = 0; nsamples = 0;
wavephase = 0x7fffffff; wavephase = 0x7fffffff;
max_hval = 0;


wdata.amplitude = 32; wdata.amplitude = 32;
wdata.amplitude_fmt = 100; wdata.amplitude_fmt = 100;
static int glottal_reduce_tab1[4] = { 0x30, 0x30, 0x40, 0x50 }; // vowel before [?], amp * 1/256 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 static int glottal_reduce_tab2[4] = { 0x90, 0xa0, 0xb0, 0xc0 }; // vowel after [?], amp * 1/256


harm_sqrt_n = 0;
end_wave = 1; end_wave = 1;


// any additional information in the param1 ? // any additional information in the param1 ?

Loading…
Cancel
Save