| @@ -17,12 +17,17 @@ | |||
| * along with this program; if not, see: <http://www.gnu.org/licenses/>. | |||
| */ | |||
| #include "config.h" | |||
| #include <stdio.h> | |||
| #include <string.h> | |||
| #include <strings.h> | |||
| #include <ctype.h> | |||
| #include <stdlib.h> | |||
| #include <time.h> | |||
| #if HAVE_STDINT_H | |||
| #include <stdint.h> | |||
| #endif | |||
| #include "speak_lib.h" | |||
| #include "espeak_ng.h" | |||
| @@ -18,11 +18,16 @@ | |||
| * <http://www.gnu.org/licenses/>. | |||
| */ | |||
| #include "config.h" | |||
| #include <stdio.h> | |||
| #include <ctype.h> | |||
| #include <stdlib.h> | |||
| #include <string.h> | |||
| #include <wctype.h> | |||
| #if HAVE_STDINT_H | |||
| #include <stdint.h> | |||
| #endif | |||
| #include "speak_lib.h" | |||
| #include "speech.h" | |||
| @@ -17,9 +17,14 @@ | |||
| * along with this program; if not, see: <http://www.gnu.org/licenses/>. | |||
| */ | |||
| #include "config.h" | |||
| #include <stdio.h> | |||
| #include <stdlib.h> | |||
| #include <string.h> | |||
| #if HAVE_STDINT_H | |||
| #include <stdint.h> | |||
| #endif | |||
| #include "speak_lib.h" | |||
| #include "espeak_ng.h" | |||
| @@ -16,6 +16,8 @@ | |||
| * along with this program; if not, see: <http://www.gnu.org/licenses/>. | |||
| */ | |||
| #include "config.h" | |||
| #include <stdio.h> | |||
| #include <stdarg.h> | |||
| #include "speech.h" | |||
| @@ -17,10 +17,15 @@ | |||
| * along with this program; if not, see: <http://www.gnu.org/licenses/>. | |||
| */ | |||
| #include "config.h" | |||
| #include <stdio.h> | |||
| #include <ctype.h> | |||
| #include <stdlib.h> | |||
| #include <string.h> | |||
| #if HAVE_STDINT_H | |||
| #include <stdint.h> | |||
| #endif | |||
| #include <wctype.h> | |||
| #include <wchar.h> | |||
| @@ -153,7 +158,7 @@ static void InitGroups(Translator *tr) | |||
| if(p[0] == RULE_REPLACEMENTS) | |||
| { | |||
| pw = (unsigned int *)(((long64)p+4) & ~3); // advance to next word boundary | |||
| pw = (unsigned int *)(((intptr_t)p+4) & ~3); // advance to next word boundary | |||
| tr->langopts.replace_chars = pw; | |||
| while(pw[0] != 0) | |||
| { | |||
| @@ -16,6 +16,8 @@ | |||
| * along with this program; if not, see: <http://www.gnu.org/licenses/>. | |||
| */ | |||
| #include "config.h" | |||
| #include "speech.h" | |||
| #include "espeak_command.h" | |||
| #include <stdlib.h> | |||
| @@ -18,6 +18,8 @@ | |||
| // This source file is only used for asynchronious modes | |||
| #include "config.h" | |||
| #ifndef PLATFORM_WINDOWS | |||
| #include <unistd.h> | |||
| #endif | |||
| @@ -18,6 +18,8 @@ | |||
| // This source file is only used for asynchronious modes | |||
| #include "config.h" | |||
| #ifndef PLATFORM_WINDOWS | |||
| #include <unistd.h> | |||
| #endif | |||
| @@ -17,10 +17,15 @@ | |||
| * along with this program; if not, see: <http://www.gnu.org/licenses/>. | |||
| */ | |||
| #include "config.h" | |||
| #include <stdio.h> | |||
| #include <string.h> | |||
| #include <stdlib.h> | |||
| #include <wctype.h> | |||
| #if HAVE_STDINT_H | |||
| #include <stdint.h> | |||
| #endif | |||
| #include "speak_lib.h" | |||
| #include "speech.h" | |||
| @@ -23,10 +23,15 @@ | |||
| // See URL: ftp://svr-ftp.eng.cam.ac.uk/pub/comp.speech/synthesis/klatt.3.04.tar.gz | |||
| #include "config.h" | |||
| #include <stdio.h> | |||
| #include <stdlib.h> | |||
| #include <math.h> | |||
| #include <string.h> | |||
| #if HAVE_STDINT_H | |||
| #include <stdint.h> | |||
| #endif | |||
| #include "speak_lib.h" | |||
| #include "speech.h" | |||
| @@ -16,6 +16,8 @@ | |||
| * GNU General Public License for more details. | |||
| */ | |||
| #include "config.h" | |||
| #include "speech.h" | |||
| #include <stdarg.h> | |||
| @@ -17,11 +17,16 @@ | |||
| * along with this program; if not, see: <http://www.gnu.org/licenses/>. | |||
| */ | |||
| #include "config.h" | |||
| #include <stdbool.h> | |||
| #include <stdio.h> | |||
| #include <ctype.h> | |||
| #include <stdlib.h> | |||
| #include <string.h> | |||
| #if HAVE_STDINT_H | |||
| #include <stdint.h> | |||
| #endif | |||
| #include <wctype.h> | |||
| #include <wchar.h> | |||
| @@ -17,9 +17,14 @@ | |||
| * along with this program; if not, see: <http://www.gnu.org/licenses/>. | |||
| */ | |||
| #include "config.h" | |||
| #include <stdio.h> | |||
| #include <stdlib.h> | |||
| #include <string.h> | |||
| #if HAVE_STDINT_H | |||
| #include <stdint.h> | |||
| #endif | |||
| #include "speak_lib.h" | |||
| #include "speech.h" | |||
| @@ -17,6 +17,8 @@ | |||
| * along with this program; if not, see: <http://www.gnu.org/licenses/>. | |||
| */ | |||
| #include "config.h" | |||
| #include <stdio.h> | |||
| #include <ctype.h> | |||
| #include <stdlib.h> | |||
| @@ -24,6 +26,9 @@ | |||
| #include <wctype.h> | |||
| #include <wchar.h> | |||
| #include <math.h> | |||
| #if HAVE_STDINT_H | |||
| #include <stdint.h> | |||
| #endif | |||
| #include "speak_lib.h" | |||
| #include "speech.h" | |||
| @@ -17,9 +17,14 @@ | |||
| * along with this program; if not, see: <http://www.gnu.org/licenses/>. | |||
| */ | |||
| #include "config.h" | |||
| #include <stdlib.h> | |||
| #include <stdio.h> | |||
| #include <wctype.h> | |||
| #if HAVE_STDINT_H | |||
| #include <stdint.h> | |||
| #endif | |||
| #include "speak_lib.h" | |||
| #include "speech.h" | |||
| @@ -24,7 +24,6 @@ | |||
| #include <string.h> | |||
| #include <stdarg.h> | |||
| #include "speech.h" | |||
| #include "sonic.h" | |||
| struct sonicStreamStruct { | |||
| @@ -17,6 +17,8 @@ | |||
| * along with this program; if not, see: <http://www.gnu.org/licenses/>. | |||
| */ | |||
| #include "config.h" | |||
| #include "stdio.h" | |||
| #include "ctype.h" | |||
| #include "string.h" | |||
| @@ -17,6 +17,12 @@ | |||
| * along with this program; if not, see: <http://www.gnu.org/licenses/>. | |||
| */ | |||
| #include "config.h" | |||
| #if HAVE_STDINT_H | |||
| #include <stdint.h> | |||
| #endif | |||
| #include "speak_lib.h" | |||
| #include "speech.h" | |||
| #include "phoneme.h" | |||
| @@ -25,7 +31,6 @@ | |||
| #include "spect.h" | |||
| #include <math.h> | |||
| #include <stdint.h> | |||
| #include <stdlib.h> | |||
| #include <string.h> | |||
| @@ -64,10 +64,13 @@ extern "C" | |||
| typedef unsigned short USHORT; | |||
| typedef unsigned char UCHAR; | |||
| typedef double DOUBLEX; | |||
| #if !HAVE_STDINT_H | |||
| #ifdef _WIN64 | |||
| typedef uint64_t long64; // use this for conversion between pointers and integers | |||
| typedef signed __int64 intptr_t; | |||
| #else | |||
| typedef unsigned long long64; // use this for conversion between pointers and integers | |||
| typedef signed __int32 intptr_t; | |||
| #endif | |||
| #endif | |||
| @@ -17,12 +17,17 @@ | |||
| * along with this program; if not, see: <http://www.gnu.org/licenses/>. | |||
| */ | |||
| #include "config.h" | |||
| #include <stdio.h> | |||
| #include <ctype.h> | |||
| #include <wctype.h> | |||
| #include <stdlib.h> | |||
| #include <string.h> | |||
| #include <math.h> | |||
| #if HAVE_STDINT_H | |||
| #include <stdint.h> | |||
| #endif | |||
| #include "speak_lib.h" | |||
| #include "speech.h" | |||
| @@ -17,12 +17,17 @@ | |||
| * along with this program; if not, see: <http://www.gnu.org/licenses/>. | |||
| */ | |||
| #include "config.h" | |||
| #include <stdbool.h> | |||
| #include <stdio.h> | |||
| #include <stdlib.h> | |||
| #include <ctype.h> | |||
| #include <wctype.h> | |||
| #include <string.h> | |||
| #if HAVE_STDINT_H | |||
| #include <stdint.h> | |||
| #endif | |||
| #include "speak_lib.h" | |||
| @@ -17,12 +17,17 @@ | |||
| * along with this program; if not, see: <http://www.gnu.org/licenses/>. | |||
| */ | |||
| #include "config.h" | |||
| #include <stdio.h> | |||
| #include <ctype.h> | |||
| #include <wctype.h> | |||
| #include <stdlib.h> | |||
| #include <string.h> | |||
| #include <math.h> | |||
| #if HAVE_STDINT_H | |||
| #include <stdint.h> | |||
| #endif | |||
| #include "speak_lib.h" | |||
| #include "speech.h" | |||
| @@ -139,7 +144,7 @@ static void EndPitch(int voice_break) | |||
| static void DoAmplitude(int amp, unsigned char *amp_env) | |||
| { | |||
| long64 *q; | |||
| intptr_t *q; | |||
| last_amp_cmd = wcmdq_tail; | |||
| amp_length = 0; // total length of vowel with this amplitude envelope | |||
| @@ -147,7 +152,7 @@ static void DoAmplitude(int amp, unsigned char *amp_env) | |||
| q = wcmdq[wcmdq_tail]; | |||
| q[0] = WCMD_AMPLITUDE; | |||
| q[1] = 0; // fill in later from amp_length | |||
| q[2] = (long64)amp_env; | |||
| q[2] = (intptr_t)amp_env; | |||
| q[3] = amp; | |||
| WcmdqInc(); | |||
| } | |||
| @@ -156,7 +161,7 @@ static void DoAmplitude(int amp, unsigned char *amp_env) | |||
| static void DoPitch(unsigned char *env, int pitch1, int pitch2) | |||
| { | |||
| long64 *q; | |||
| intptr_t *q; | |||
| EndPitch(0); | |||
| @@ -176,7 +181,7 @@ static void DoPitch(unsigned char *env, int pitch1, int pitch2) | |||
| q = wcmdq[wcmdq_tail]; | |||
| q[0] = WCMD_PITCH; | |||
| q[1] = 0; // length, fill in later from pitch_length | |||
| q[2] = (long64)env; | |||
| q[2] = (intptr_t)env; | |||
| q[3] = (pitch1 << 16) + pitch2; | |||
| WcmdqInc(); | |||
| } | |||
| @@ -255,7 +260,7 @@ static int DoSample2(int index, int which, int std_length, int control, int leng | |||
| int min_length; | |||
| int x; | |||
| int len4; | |||
| long64 *q; | |||
| intptr_t *q; | |||
| unsigned char *p; | |||
| index = index & 0x7fffff; | |||
| @@ -331,7 +336,7 @@ static int DoSample2(int index, int which, int std_length, int control, int leng | |||
| q = wcmdq[wcmdq_tail]; | |||
| q[0] = WCMD_WAVE2; | |||
| q[1] = length | (wav_length << 16); // length in samples | |||
| q[2] = (long64)(&wavefile_data[index]); | |||
| q[2] = (intptr_t)(&wavefile_data[index]); | |||
| q[3] = wav_scale + (amp << 8); | |||
| WcmdqInc(); | |||
| return(length); | |||
| @@ -352,7 +357,7 @@ static int DoSample2(int index, int which, int std_length, int control, int leng | |||
| q = wcmdq[wcmdq_tail]; | |||
| q[0] = WCMD_WAVE; | |||
| q[1] = x; // length in samples | |||
| q[2] = (long64)(&wavefile_data[index]); | |||
| q[2] = (intptr_t)(&wavefile_data[index]); | |||
| q[3] = wav_scale + (amp << 8); | |||
| WcmdqInc(); | |||
| @@ -367,7 +372,7 @@ static int DoSample2(int index, int which, int std_length, int control, int leng | |||
| q = wcmdq[wcmdq_tail]; | |||
| q[0] = WCMD_WAVE; | |||
| q[1] = len4*2; // length in samples | |||
| q[2] = (long64)(&wavefile_data[index+x]); | |||
| q[2] = (intptr_t)(&wavefile_data[index+x]); | |||
| q[3] = wav_scale + (amp << 8); | |||
| WcmdqInc(); | |||
| @@ -383,7 +388,7 @@ static int DoSample2(int index, int which, int std_length, int control, int leng | |||
| q = wcmdq[wcmdq_tail]; | |||
| q[0] = WCMD_WAVE; | |||
| q[1] = length; // length in samples | |||
| q[2] = (long64)(&wavefile_data[index+x]); | |||
| q[2] = (intptr_t)(&wavefile_data[index+x]); | |||
| q[3] = wav_scale + (amp << 8); | |||
| WcmdqInc(); | |||
| } | |||
| @@ -764,7 +769,7 @@ static void SmoothSpect(void) | |||
| { | |||
| // Limit the rate of frequence change of formants, to reduce chirping | |||
| long64 *q; | |||
| intptr_t *q; | |||
| frame_t *frame; | |||
| frame_t *frame2; | |||
| frame_t *frame1; | |||
| @@ -806,7 +811,7 @@ static void SmoothSpect(void) | |||
| frame1 = (frame_t *)q[3]; | |||
| if(frame1 == frame) | |||
| { | |||
| q[3] = (long64)frame2; | |||
| q[3] = (intptr_t)frame2; | |||
| frame1 = frame2; | |||
| } | |||
| else | |||
| @@ -854,7 +859,7 @@ static void SmoothSpect(void) | |||
| modified = 1; | |||
| } | |||
| frame2->ffreq[pk] = frame1->ffreq[pk] + allowed; | |||
| q[2] = (long64)frame2; | |||
| q[2] = (intptr_t)frame2; | |||
| } | |||
| else | |||
| if(diff < -allowed) | |||
| @@ -865,7 +870,7 @@ static void SmoothSpect(void) | |||
| modified = 1; | |||
| } | |||
| frame2->ffreq[pk] = frame1->ffreq[pk] - allowed; | |||
| q[2] = (long64)frame2; | |||
| q[2] = (intptr_t)frame2; | |||
| } | |||
| } | |||
| } | |||
| @@ -896,7 +901,7 @@ static void SmoothSpect(void) | |||
| { | |||
| if(frame1 == frame) | |||
| { | |||
| q[2] = (long64)frame2; | |||
| q[2] = (intptr_t)frame2; | |||
| frame1 = frame2; | |||
| } | |||
| else | |||
| @@ -938,7 +943,7 @@ static void SmoothSpect(void) | |||
| modified = 1; | |||
| } | |||
| frame2->ffreq[pk] = frame1->ffreq[pk] + allowed; | |||
| q[3] = (long64)frame2; | |||
| q[3] = (intptr_t)frame2; | |||
| } | |||
| else | |||
| if(diff < -allowed) | |||
| @@ -949,7 +954,7 @@ static void SmoothSpect(void) | |||
| modified = 1; | |||
| } | |||
| frame2->ffreq[pk] = frame1->ffreq[pk] - allowed; | |||
| q[3] = (long64)frame2; | |||
| q[3] = (intptr_t)frame2; | |||
| } | |||
| } | |||
| } | |||
| @@ -986,7 +991,7 @@ int DoSpect2(PHONEME_TAB *this_ph, int which, FMT_PARAMS *fmt_params, PHONEME_L | |||
| frame_t *frame2; | |||
| frame_t *fr; | |||
| int ix; | |||
| long64 *q; | |||
| intptr_t *q; | |||
| int len; | |||
| int frame_length; | |||
| int length_factor; | |||
| @@ -1072,7 +1077,7 @@ int DoSpect2(PHONEME_TAB *this_ph, int which, FMT_PARAMS *fmt_params, PHONEME_L | |||
| && !(last_frame->frflags & FRFLAG_BREAK)) | |||
| { | |||
| // last frame of previous sequence was zero-length, replace with first of this sequence | |||
| wcmdq[last_wcmdq][3] = (long64)frame1; | |||
| wcmdq[last_wcmdq][3] = (intptr_t)frame1; | |||
| if(last_frame->frflags & FRFLAG_BREAK_LF) | |||
| { | |||
| @@ -1084,7 +1089,7 @@ int DoSpect2(PHONEME_TAB *this_ph, int which, FMT_PARAMS *fmt_params, PHONEME_L | |||
| fr->ffreq[ix] = last_frame->ffreq[ix]; | |||
| fr->fheight[ix] = last_frame->fheight[ix]; | |||
| } | |||
| wcmdq[last_wcmdq][3] = (long64)fr; | |||
| wcmdq[last_wcmdq][3] = (intptr_t)fr; | |||
| } | |||
| } | |||
| } | |||
| @@ -1169,8 +1174,8 @@ int DoSpect2(PHONEME_TAB *this_ph, int which, FMT_PARAMS *fmt_params, PHONEME_L | |||
| q = wcmdq[wcmdq_tail]; | |||
| q[0] = wcmd_spect; | |||
| q[1] = len + (modulation << 16); | |||
| q[2] = (long64)frame1; | |||
| q[3] = (long64)frame2; | |||
| q[2] = (intptr_t)frame1; | |||
| q[3] = (intptr_t)frame2; | |||
| WcmdqInc(); | |||
| } | |||
| @@ -1245,7 +1250,7 @@ void DoVoiceChange(voice_t *v) | |||
| v2 = (voice_t *)malloc(sizeof(voice_t)); | |||
| memcpy(v2,v,sizeof(voice_t)); | |||
| wcmdq[wcmdq_tail][0] = WCMD_VOICE; | |||
| wcmdq[wcmdq_tail][2] = (long64)v2; | |||
| wcmdq[wcmdq_tail][2] = (intptr_t)v2; | |||
| WcmdqInc(); | |||
| } | |||
| @@ -1282,7 +1287,7 @@ void DoEmbedded(int *embix, int sourceix) | |||
| DoPause(10,0); // ensure a break in the speech | |||
| wcmdq[wcmdq_tail][0] = WCMD_WAVE; | |||
| wcmdq[wcmdq_tail][1] = soundicon_tab[value].length; | |||
| wcmdq[wcmdq_tail][2] = (long64)soundicon_tab[value].data + 44; // skip WAV header | |||
| wcmdq[wcmdq_tail][2] = (intptr_t)soundicon_tab[value].data + 44; // skip WAV header | |||
| wcmdq[wcmdq_tail][3] = 0x1500; // 16 bit data, amp=21 | |||
| WcmdqInc(); | |||
| } | |||
| @@ -477,7 +477,7 @@ extern unsigned char pitch_adjust_tab[MAX_PITCH_VALUE+1]; | |||
| #define N_WCMDQ 170 | |||
| #define MIN_WCMDQ 25 // need this many free entries before adding new phoneme | |||
| extern long64 wcmdq[N_WCMDQ][4]; | |||
| extern intptr_t wcmdq[N_WCMDQ][4]; | |||
| extern int wcmdq_head; | |||
| extern int wcmdq_tail; | |||
| @@ -17,12 +17,17 @@ | |||
| * along with this program; if not, see: <http://www.gnu.org/licenses/>. | |||
| */ | |||
| #include "config.h" | |||
| #include <stdio.h> | |||
| #include <ctype.h> | |||
| #include <wctype.h> | |||
| #include <stdlib.h> | |||
| #include <string.h> | |||
| #include <locale.h> | |||
| #if HAVE_STDINT_H | |||
| #include <stdint.h> | |||
| #endif | |||
| #include <wctype.h> | |||
| @@ -17,10 +17,15 @@ | |||
| * along with this program; if not, see: <http://www.gnu.org/licenses/>. | |||
| */ | |||
| #include "config.h" | |||
| #include <stdio.h> | |||
| #include <ctype.h> | |||
| #include <stdlib.h> | |||
| #include <string.h> | |||
| #if HAVE_STDINT_H | |||
| #include <stdint.h> | |||
| #endif | |||
| #include <wctype.h> | |||
| #include <wchar.h> | |||
| @@ -17,11 +17,17 @@ | |||
| * along with this program; if not, see: <http://www.gnu.org/licenses/>. | |||
| */ | |||
| #include "config.h" | |||
| #include "stdio.h" | |||
| #include "ctype.h" | |||
| #include "wctype.h" | |||
| #include "string.h" | |||
| #include "stdlib.h" | |||
| #if HAVE_STDINT_H | |||
| #include <stdint.h> | |||
| #endif | |||
| #include "speech.h" | |||
| #ifdef PLATFORM_WINDOWS | |||
| @@ -17,6 +17,8 @@ | |||
| * along with this program; if not, see: <http://www.gnu.org/licenses/>. | |||
| */ | |||
| #include "config.h" | |||
| #include "speech.h" | |||
| #ifdef USE_ASYNC | |||
| @@ -24,6 +24,8 @@ | |||
| // * prebuf,... size? | |||
| // * 0.9.6: pb pulse_free using tlength=8820 (max size never returned -> tlength=10000 ok, but higher drain). | |||
| // | |||
| #include "config.h" | |||
| #include "speech.h" | |||
| #ifdef USE_ASYNC | |||
| @@ -20,10 +20,15 @@ | |||
| // this version keeps wavemult window as a constant fraction | |||
| // of the cycle length - but that spreads out the HF peaks too much | |||
| #include "config.h" | |||
| #include <stdio.h> | |||
| #include <string.h> | |||
| #include <stdlib.h> | |||
| #include <math.h> | |||
| #if HAVE_STDINT_H | |||
| #include <stdint.h> | |||
| #endif | |||
| @@ -129,7 +134,7 @@ unsigned char *out_end; | |||
| int outbuf_size = 0; | |||
| // the queue of operations passed to wavegen from sythesize | |||
| long64 wcmdq[N_WCMDQ][4]; | |||
| intptr_t wcmdq[N_WCMDQ][4]; | |||
| int wcmdq_head=0; | |||
| int wcmdq_tail=0; | |||
| @@ -1823,7 +1828,7 @@ int WavegenFill2(int fill_zeros) | |||
| // return: 0 output buffer has been filled | |||
| // return: 1 input command queue is now empty | |||
| long64 *q; | |||
| intptr_t *q; | |||
| int length; | |||
| int result; | |||
| int marker_type; | |||
| @@ -17,6 +17,8 @@ | |||
| * along with this program; if not, see: <http://www.gnu.org/licenses/>. | |||
| */ | |||
| #include "config.h" | |||
| #include "speech.h" | |||
| #include <stdbool.h> | |||