speechPlayer_terminate was never called without calling speechPlayer_initialize right after, so there would always be a FrameManager laying behind.master
| fclose(f_report); | fclose(f_report); | ||||
| WavegenFini(); | |||||
| if (resample_count > 0) { | if (resample_count > 0) { | ||||
| fprintf(f_errors, "\n%d WAV files resampled to %d Hz\n", resample_count, samplerate_native); | fprintf(f_errors, "\n%d WAV files resampled to %d Hz\n", resample_count, samplerate_native); | ||||
| fprintf(log, "Compiled phonemes: %d errors, %d files resampled to %d Hz.\n", error_count, resample_count, samplerate_native); | fprintf(log, "Compiled phonemes: %d errors, %d files resampled to %d Hz.\n", error_count, resample_count, samplerate_native); |
| } | } | ||||
| } | } | ||||
| void KlattFini(void) | |||||
| { | |||||
| #ifdef INCLUDE_SPEECHPLAYER | |||||
| KlattFiniSP(); | |||||
| #endif | |||||
| } | |||||
| /* | /* | ||||
| function FRAME_INIT | function FRAME_INIT | ||||
| } klatt_peaks_t; | } klatt_peaks_t; | ||||
| void KlattInit(void); | void KlattInit(void); | ||||
| void KlattFini(void); | |||||
| void KlattReset(int control); | void KlattReset(int control); | ||||
| int Wavegen_Klatt(int length, int resume, frame_t *fr1, frame_t *fr2, WGEN_DATA *wdata, voice_t *wvoice); | int Wavegen_Klatt(int length, int resume, frame_t *fr1, frame_t *fr2, WGEN_DATA *wdata, voice_t *wvoice); | ||||
| speechPlayerHandle=speechPlayer_initialize(22050); | speechPlayerHandle=speechPlayer_initialize(22050); | ||||
| } | } | ||||
| void KlattResetSP() { | |||||
| void KlattFiniSP() { | |||||
| speechPlayer_terminate(speechPlayerHandle); | speechPlayer_terminate(speechPlayerHandle); | ||||
| speechPlayerHandle=speechPlayer_initialize(22050); | |||||
| } | |||||
| void KlattResetSP() { | |||||
| KlattFiniSP(); | |||||
| KlattInitSP(); | |||||
| } | } | ||||
| int Wavegen_KlattSP(WGEN_DATA *wdata, voice_t *wvoice, int length, int resume, frame_t *fr1, frame_t *fr2){ | int Wavegen_KlattSP(WGEN_DATA *wdata, voice_t *wvoice, int length, int resume, frame_t *fr1, frame_t *fr2){ |
| void KlattInitSP(void); | void KlattInitSP(void); | ||||
| void KlattResetSP(void); | void KlattResetSP(void); | ||||
| void KlattFiniSP(void); | |||||
| int Wavegen_KlattSP(WGEN_DATA *wdata, voice_t *wvoice, int length, int resume, frame_t *fr1, frame_t *fr2); | int Wavegen_KlattSP(WGEN_DATA *wdata, voice_t *wvoice, int length, int resume, frame_t *fr1, frame_t *fr2); | ||||
| #ifdef __cplusplus | #ifdef __cplusplus |
| #endif | #endif | ||||
| } | } | ||||
| void WavegenFini(void) | |||||
| { | |||||
| #ifdef INCLUDE_KLATT | |||||
| KlattFini(); | |||||
| #endif | |||||
| } | |||||
| int GetAmplitude(void) | int GetAmplitude(void) | ||||
| { | { | ||||
| int amp; | int amp; |
| void WavegenInit(int rate, | void WavegenInit(int rate, | ||||
| int wavemult_fact); | int wavemult_fact); | ||||
| void WavegenFini(void); | |||||
| int WavegenFill(void); | int WavegenFill(void); | ||||
| void WavegenSetVoice(voice_t *v); | void WavegenSetVoice(voice_t *v); |