@@ -222,7 +222,7 @@ espeak_ng_STATUS event_declare(espeak_EVENT *event) | |||
return status; | |||
} | |||
espeak_ng_STATUS event_clear_all() | |||
espeak_ng_STATUS event_clear_all(void) | |||
{ | |||
espeak_ng_STATUS status; | |||
if ((status = pthread_mutex_lock(&my_mutex)) != ENS_OK) | |||
@@ -352,7 +352,7 @@ static espeak_ng_STATUS push(void *the_data) | |||
return ENS_OK; | |||
} | |||
static void *pop() | |||
static void *pop(void) | |||
{ | |||
void *the_data = NULL; | |||
@@ -373,7 +373,7 @@ static void *pop() | |||
} | |||
static void init() | |||
static void init(void) | |||
{ | |||
while (event_delete((espeak_EVENT *)pop())) | |||
; | |||
@@ -381,7 +381,7 @@ static void init() | |||
node_counter = 0; | |||
} | |||
void event_terminate() | |||
void event_terminate(void) | |||
{ | |||
if (thread_inited) { | |||
my_terminate_is_required = true; |
@@ -71,7 +71,7 @@ enum { | |||
MAX_INACTIVITY_CHECK = 2 | |||
}; | |||
void fifo_init() | |||
void fifo_init(void) | |||
{ | |||
// security | |||
pthread_mutex_init(&my_mutex, (const pthread_mutexattr_t *)NULL); | |||
@@ -169,7 +169,7 @@ espeak_ng_STATUS fifo_add_commands(t_espeak_command *command1, t_espeak_command | |||
return ENS_OK; | |||
} | |||
espeak_ng_STATUS fifo_stop() | |||
espeak_ng_STATUS fifo_stop(void) | |||
{ | |||
if (!thread_inited) return ENS_OK; | |||
espeak_ng_STATUS status; | |||
@@ -197,7 +197,7 @@ espeak_ng_STATUS fifo_stop() | |||
return ENS_OK; | |||
} | |||
int fifo_is_busy() | |||
int fifo_is_busy(void) | |||
{ | |||
if (!thread_inited) return false; | |||
pthread_mutex_lock(&my_mutex); | |||
@@ -206,7 +206,7 @@ int fifo_is_busy() | |||
return running; | |||
} | |||
static int sleep_until_start_request_or_inactivity() | |||
static int sleep_until_start_request_or_inactivity(void) | |||
{ | |||
int a_start_is_required = false; | |||
@@ -242,7 +242,7 @@ static int sleep_until_start_request_or_inactivity() | |||
return a_start_is_required; | |||
} | |||
static espeak_ng_STATUS close_stream() | |||
static espeak_ng_STATUS close_stream(void) | |||
{ | |||
espeak_ng_STATUS status = pthread_mutex_lock(&my_mutex); | |||
if (status != ENS_OK) | |||
@@ -368,7 +368,7 @@ static void *say_thread(void *p) | |||
return NULL; | |||
} | |||
int fifo_is_command_enabled() | |||
int fifo_is_command_enabled(void) | |||
{ | |||
return 0 == my_stop_is_required; | |||
} | |||
@@ -413,7 +413,7 @@ static espeak_ng_STATUS push(t_espeak_command *the_command) | |||
return ENS_OK; | |||
} | |||
static t_espeak_command *pop() | |||
static t_espeak_command *pop(void) | |||
{ | |||
t_espeak_command *the_command = NULL; | |||
@@ -446,7 +446,7 @@ static void init(int process_parameters) | |||
node_counter = 0; | |||
} | |||
void fifo_terminate() | |||
void fifo_terminate(void) | |||
{ | |||
if (!thread_inited) return; | |||
@@ -547,7 +547,7 @@ static void frame_init(klatt_frame_ptr frame) | |||
to Kopen. | |||
*/ | |||
static double impulsive_source() | |||
static double impulsive_source(void) | |||
{ | |||
static const double doublet[] = { 0.0, 13000000.0, -13000000.0 }; | |||
static double vwave; | |||
@@ -567,7 +567,7 @@ static double impulsive_source() | |||
spectral zero around 800 Hz, magic constants a,b reset pitch synchronously. | |||
*/ | |||
static double natural_source() | |||
static double natural_source(void) | |||
{ | |||
double lgtemp; | |||
static double vwave; | |||
@@ -1068,7 +1068,7 @@ static void SetSynth_Klatt(int length, frame_t *fr1, frame_t *fr2, voice_t *wvoi | |||
} | |||
} | |||
void KlattInit() | |||
void KlattInit(void) | |||
{ | |||
static const short formant_hz[10] = { 280, 688, 1064, 2806, 3260, 3700, 6500, 7000, 8000, 280 }; |
@@ -42,7 +42,7 @@ static void mixWaveFile(WGEN_DATA *wdata, unsigned int maxNumSamples, sample* sa | |||
} | |||
} | |||
static bool isKlattFrameFollowing() { | |||
static bool isKlattFrameFollowing(void) { | |||
// eSpeak implements its command queue with a circular buffer. | |||
// Thus to walk it, we start from the head, walking to the tail, which may wrap around to the beginning of the buffer as it is circular. | |||
for(int i=(wcmdq_head+1)%N_WCMDQ;i!=wcmdq_tail;i=(i+1)%N_WCMDQ) { | |||
@@ -93,17 +93,17 @@ static void fillSpeechPlayerFrame(WGEN_DATA *wdata, voice_t *wvoice, frame_t * e | |||
spFrame->endVoicePitch=spFrame->voicePitch; | |||
} | |||
void KlattInitSP() { | |||
void KlattInitSP(void) { | |||
speechPlayerHandle=speechPlayer_initialize(22050); | |||
} | |||
void KlattFiniSP() { | |||
void KlattFiniSP(void) { | |||
if (speechPlayerHandle) | |||
speechPlayer_terminate(speechPlayerHandle); | |||
speechPlayerHandle = NULL; | |||
} | |||
void KlattResetSP() { | |||
void KlattResetSP(void) { | |||
KlattFiniSP(); | |||
KlattInitSP(); | |||
} |
@@ -87,7 +87,7 @@ float polint(float xa[], float ya[], int n, float x) | |||
return y; | |||
} | |||
static SpectFrame *SpectFrameCreate() | |||
static SpectFrame *SpectFrameCreate(void) | |||
{ | |||
int ix; | |||
SpectFrame *frame; | |||
@@ -230,7 +230,7 @@ double GetFrameRms(SpectFrame *frame, int seq_amplitude) | |||
} | |||
#pragma GCC visibility push(default) | |||
SpectSeq *SpectSeqCreate() | |||
SpectSeq *SpectSeqCreate(void) | |||
{ | |||
SpectSeq *spect = malloc(sizeof(SpectSeq)); | |||
if (!spect) |
@@ -85,7 +85,7 @@ const char *WordToString(char buf[5], unsigned int word) | |||
return buf; | |||
} | |||
void SynthesizeInit() | |||
void SynthesizeInit(void) | |||
{ | |||
last_pitch_cmd = 0; | |||
last_amp_cmd = 0; | |||
@@ -376,7 +376,7 @@ int DoSample3(PHONEME_DATA *phdata, int length_mod, int amp) | |||
return len; | |||
} | |||
static frame_t *AllocFrame() | |||
static frame_t *AllocFrame(void) | |||
{ | |||
// Allocate a temporary spectrum frame for the wavegen queue. Use a pool which is big | |||
// enough to use a round-robin without checks. |
@@ -231,7 +231,7 @@ static int CountSyllables(unsigned char *phonemes) | |||
return count; | |||
} | |||
static void Word_EmbeddedCmd() | |||
static void Word_EmbeddedCmd(void) | |||
{ | |||
// Process embedded commands for emphasis, sayas, and break | |||
int embedded_cmd; |
@@ -1338,7 +1338,7 @@ ESPEAK_NG_API espeak_ng_STATUS espeak_ng_SetVoiceByProperties(espeak_VOICE *voic | |||
#pragma GCC visibility pop | |||
void FreeVoiceList() | |||
void FreeVoiceList(void) | |||
{ | |||
int ix; | |||
for (ix = 0; ix < n_voices_list; ix++) { |
@@ -234,7 +234,7 @@ static const unsigned char pitch_adjust_tab[MAX_PITCH_VALUE+1] = { | |||
242, 246, 249, 252, 254, 255 | |||
}; | |||
void WcmdqStop() | |||
void WcmdqStop(void) | |||
{ | |||
wcmdq_head = 0; | |||
wcmdq_tail = 0; | |||
@@ -252,7 +252,7 @@ void WcmdqStop() | |||
#endif | |||
} | |||
int WcmdqFree() | |||
int WcmdqFree(void) | |||
{ | |||
int i; | |||
i = wcmdq_head - wcmdq_tail; | |||
@@ -260,18 +260,18 @@ int WcmdqFree() | |||
return i; | |||
} | |||
int WcmdqUsed() | |||
int WcmdqUsed(void) | |||
{ | |||
return N_WCMDQ - WcmdqFree(); | |||
} | |||
void WcmdqInc() | |||
void WcmdqInc(void) | |||
{ | |||
wcmdq_tail++; | |||
if (wcmdq_tail >= N_WCMDQ) wcmdq_tail = 0; | |||
} | |||
static void WcmdqIncHead() | |||
static void WcmdqIncHead(void) | |||
{ | |||
MAKE_MEM_UNDEFINED(&wcmdq[wcmdq_head], sizeof(wcmdq[wcmdq_head])); | |||
wcmdq_head++; | |||
@@ -534,7 +534,7 @@ int PeaksToHarmspect(wavegen_peaks_t *peaks, int pitch, int *htab, int control) | |||
return hmax; // highest harmonic number | |||
} | |||
static void AdvanceParameters() | |||
static void AdvanceParameters(void) | |||
{ | |||
// Called every 64 samples to increment the formant freq, height, and widths | |||
if (wvoice == NULL) | |||
@@ -643,7 +643,7 @@ void InitBreath(void) | |||
setresonator(&rbreath[ix], 2000, 200, 1); | |||
} | |||
static void SetBreath() | |||
static void SetBreath(void) | |||
{ | |||
int pk; | |||
@@ -1001,7 +1001,7 @@ static int SetWithRange0(int value, int max) | |||
return value; | |||
} | |||
static void SetPitchFormants() | |||
static void SetPitchFormants(void) | |||
{ | |||
if (wvoice == NULL) | |||
return; | |||
@@ -1253,7 +1253,7 @@ void Write4Bytes(FILE *f, int value) | |||
} | |||
} | |||
static int WavegenFill2() | |||
static int WavegenFill2(void) | |||
{ | |||
// Pick up next wavegen commands from the queue | |||
// return: 0 output buffer has been filled |