The libespeak files are supposed to be C code, so use C linkage for all the functions defined in that code when they are being referenced in the C++ code (i.e. espeakedit).master
extern void FindPhonemesUsed(void); | extern void FindPhonemesUsed(void); | ||||
extern void DisplayErrorFile(const char *fname); | extern void DisplayErrorFile(const char *fname); | ||||
extern int utf8_in(int *c, const char *buf); | |||||
extern int utf8_out(unsigned int c, char *buf); | |||||
extern "C" int utf8_in(int *c, const char *buf); | |||||
extern "C" int utf8_out(unsigned int c, char *buf); | |||||
extern void DrawEnvelopes(); | extern void DrawEnvelopes(); | ||||
extern void ReadPhondataManifest(); | extern void ReadPhondataManifest(); | ||||
char path_source[sizeof(path_home)+20]; | char path_source[sizeof(path_home)+20]; |
#ifndef DEBUG_H | #ifndef DEBUG_H | ||||
#define DEBUG_H | #define DEBUG_H | ||||
#ifdef __cplusplus | |||||
extern "C" | |||||
{ | |||||
#endif | |||||
//#define DEBUG_ENABLED | //#define DEBUG_ENABLED | ||||
#ifdef DEBUG_ENABLED | #ifdef DEBUG_ENABLED | ||||
#define ENTER(text) | #define ENTER(text) | ||||
#endif | #endif | ||||
#ifdef __cplusplus | |||||
} | |||||
#endif | |||||
#endif | #endif |
#endif | #endif | ||||
#include "speak_lib.h" | #include "speak_lib.h" | ||||
#ifdef __cplusplus | |||||
extern "C" | |||||
{ | |||||
#endif | |||||
enum t_espeak_type | enum t_espeak_type | ||||
{ | { | ||||
ET_TEXT, | ET_TEXT, | ||||
int sync_espeak_terminated_msg(unsigned int unique_identifier, void* user_data); | int sync_espeak_terminated_msg(unsigned int unique_identifier, void* user_data); | ||||
#ifdef __cplusplus | |||||
} | |||||
#endif | |||||
//> | //> | ||||
#endif | #endif |
#include "speak_lib.h" | #include "speak_lib.h" | ||||
#ifdef __cplusplus | |||||
extern "C" | |||||
{ | |||||
#endif | |||||
// Initialize the event component. | // Initialize the event component. | ||||
// First function to be called. | // First function to be called. | ||||
// the callback will be called when the event actually occurs. | // the callback will be called when the event actually occurs. | ||||
// Last function to be called. | // Last function to be called. | ||||
void event_terminate(); | void event_terminate(); | ||||
#ifdef __cplusplus | |||||
} | |||||
#endif | |||||
#endif | #endif |
#include "espeak_command.h" | #include "espeak_command.h" | ||||
#include "speak_lib.h" | #include "speak_lib.h" | ||||
#ifdef __cplusplus | |||||
extern "C" | |||||
{ | |||||
#endif | |||||
// Initialize the fifo component. | // Initialize the fifo component. | ||||
// First function to be called. | // First function to be called. | ||||
void fifo_init(); | void fifo_init(); | ||||
// Returns 1 if yes, or 0 otherwise. | // Returns 1 if yes, or 0 otherwise. | ||||
int fifo_is_command_enabled(); | int fifo_is_command_enabled(); | ||||
#ifdef __cplusplus | |||||
} | |||||
#endif | |||||
#endif | #endif |
#ifdef __cplusplus | |||||
extern "C" | |||||
{ | |||||
#endif | |||||
#define CASCADE_PARALLEL 1 /* Type of synthesis model */ | #define CASCADE_PARALLEL 1 /* Type of synthesis model */ | ||||
#define ALL_PARALLEL 2 | #define ALL_PARALLEL 2 | ||||
} klatt_peaks_t; | } klatt_peaks_t; | ||||
#ifdef __cplusplus | |||||
} | |||||
#endif |
/*************************************************************************** | /*************************************************************************** | ||||
* Copyright (C) 2005 to 2013 by Jonathan Duddington * | * Copyright (C) 2005 to 2013 by Jonathan Duddington * | ||||
* email: [email protected] * | * email: [email protected] * | ||||
* Copyright (C) 2013 by Reece H. Dunn * | |||||
* Copyright (C) 2013-2015 by Reece H. Dunn * | |||||
* * | * * | ||||
* This program is free software; you can redistribute it and/or modify * | * This program is free software; you can redistribute it and/or modify * | ||||
* it under the terms of the GNU General Public License as published by * | * it under the terms of the GNU General Public License as published by * | ||||
#include "options.h" | #include "options.h" | ||||
extern void WavegenInit(int samplerate, int wavemult_fact); | |||||
extern "C" void WavegenInit(int samplerate, int wavemult_fact); | |||||
extern void strncpy0(char *to,const char *from, int size); | extern void strncpy0(char *to,const char *from, int size); | ||||
extern int GetNumeric(wxTextCtrl *t); | extern int GetNumeric(wxTextCtrl *t); | ||||
extern void SetNumeric(wxTextCtrl *t, int value); | extern void SetNumeric(wxTextCtrl *t, int value); |
/*************************************************************************** | /*************************************************************************** | ||||
* Copyright (C) 2005 to 2010 by Jonathan Duddington * | * Copyright (C) 2005 to 2010 by Jonathan Duddington * | ||||
* email: [email protected] * | * email: [email protected] * | ||||
* Copyright (C) 2015 by Reece H. Dunn * | |||||
* * | * * | ||||
* This program is free software; you can redistribute it and/or modify * | * This program is free software; you can redistribute it and/or modify * | ||||
* it under the terms of the GNU General Public License as published by * | * it under the terms of the GNU General Public License as published by * | ||||
* <http://www.gnu.org/licenses/>. * | * <http://www.gnu.org/licenses/>. * | ||||
***************************************************************************/ | ***************************************************************************/ | ||||
#ifdef __cplusplus | |||||
extern "C" | |||||
{ | |||||
#endif | |||||
// phoneme types | // phoneme types | ||||
extern PHONEME_TAB_LIST phoneme_tab_list[N_PHONEME_TABS]; | extern PHONEME_TAB_LIST phoneme_tab_list[N_PHONEME_TABS]; | ||||
extern int phoneme_tab_number; | extern int phoneme_tab_number; | ||||
#ifdef __cplusplus | |||||
} | |||||
#endif |
#ifdef __cplusplus | |||||
extern "C" | |||||
{ | |||||
#endif | |||||
short int sin_tab[2048] = { | short int sin_tab[2048] = { | ||||
0, -25, -50, -75, -100, -125, -150, -175, | 0, -25, -50, -75, -100, -125, -150, -175, | ||||
-201, -226, -251, -276, -301, -326, -351, -376, | -201, -226, -251, -276, -301, -326, -351, -376, | ||||
401, 376, 351, 326, 301, 276, 251, 226, | 401, 376, 351, 326, 301, 276, 251, 226, | ||||
201, 175, 150, 125, 100, 75, 50, 25, | 201, 175, 150, 125, 100, 75, 50, 25, | ||||
}; | }; | ||||
#ifdef __cplusplus | |||||
} | |||||
#endif |
/*************************************************************************** | /*************************************************************************** | ||||
* Copyright (C) 2005 to 2007 by Jonathan Duddington * | * Copyright (C) 2005 to 2007 by Jonathan Duddington * | ||||
* email: [email protected] * | * email: [email protected] * | ||||
* Copyright (C) 2013 Reece H. Dunn * | |||||
* Copyright (C) 2013-2015 Reece H. Dunn * | |||||
* * | * * | ||||
* This program is free software; you can redistribute it and/or modify * | * This program is free software; you can redistribute it and/or modify * | ||||
* it under the terms of the GNU General Public License as published by * | * it under the terms of the GNU General Public License as published by * | ||||
#include <sys/types.h> | #include <sys/types.h> | ||||
#ifdef __cplusplus | |||||
extern "C" | |||||
{ | |||||
#endif | |||||
#if defined(BYTE_ORDER) && BYTE_ORDER == BIG_ENDIAN | #if defined(BYTE_ORDER) && BYTE_ORDER == BIG_ENDIAN | ||||
#define ARCH_BIG | #define ARCH_BIG | ||||
#endif | #endif | ||||
char *Alloc(int size); | char *Alloc(int size); | ||||
void Free(void *ptr); | void Free(void *ptr); | ||||
#ifdef __cplusplus | |||||
} | |||||
#endif | |||||
#endif // SPEECH_H | #endif // SPEECH_H |
/*************************************************************************** | /*************************************************************************** | ||||
* Copyright (C) 2005 to 2014 by Jonathan Duddington * | * Copyright (C) 2005 to 2014 by Jonathan Duddington * | ||||
* email: [email protected] * | * email: [email protected] * | ||||
* Copyright (C) 2015 by Reece H. Dunn * | |||||
* * | * * | ||||
* This program is free software; you can redistribute it and/or modify * | * This program is free software; you can redistribute it and/or modify * | ||||
* it under the terms of the GNU General Public License as published by * | * it under the terms of the GNU General Public License as published by * | ||||
* <http://www.gnu.org/licenses/>. * | * <http://www.gnu.org/licenses/>. * | ||||
***************************************************************************/ | ***************************************************************************/ | ||||
#ifdef __cplusplus | |||||
extern "C" | |||||
{ | |||||
#endif | |||||
#define espeakINITIALIZE_PHONEME_IPA 0x0002 // move this to speak_lib.h, after eSpeak version 1.46.02 | #define espeakINITIALIZE_PHONEME_IPA 0x0002 // move this to speak_lib.h, after eSpeak version 1.46.02 | ||||
void KlattReset(int control); | void KlattReset(int control); | ||||
int Wavegen_Klatt2(int length, int modulation, int resume, frame_t *fr1, frame_t *fr2); | int Wavegen_Klatt2(int length, int modulation, int resume, frame_t *fr1, frame_t *fr2); | ||||
#ifdef __cplusplus | |||||
} | |||||
#endif |
/*************************************************************************** | /*************************************************************************** | ||||
* Copyright (C) 2005 to 2014 by Jonathan Duddington * | * Copyright (C) 2005 to 2014 by Jonathan Duddington * | ||||
* email: [email protected] * | * email: [email protected] * | ||||
* Copyright (C) 2015 by Reece H. Dunn * | |||||
* * | * * | ||||
* This program is free software; you can redistribute it and/or modify * | * This program is free software; you can redistribute it and/or modify * | ||||
* it under the terms of the GNU General Public License as published by * | * it under the terms of the GNU General Public License as published by * | ||||
* <http://www.gnu.org/licenses/>. * | * <http://www.gnu.org/licenses/>. * | ||||
***************************************************************************/ | ***************************************************************************/ | ||||
#ifdef __cplusplus | |||||
extern "C" | |||||
{ | |||||
#endif | |||||
#define L(c1,c2) (c1<<8)+c2 // combine two characters into an integer for translator name | #define L(c1,c2) (c1<<8)+c2 // combine two characters into an integer for translator name | ||||
extern FILE *f_trans; // for logging | extern FILE *f_trans; // for logging | ||||
extern FILE *f_logespeak; | extern FILE *f_logespeak; | ||||
extern int logging_type; // from config file | extern int logging_type; // from config file | ||||
#ifdef __cplusplus | |||||
} | |||||
#endif |
/*************************************************************************** | /*************************************************************************** | ||||
* Copyright (C) 2005 to 2007 by Jonathan Duddington * | * Copyright (C) 2005 to 2007 by Jonathan Duddington * | ||||
* email: [email protected] * | * email: [email protected] * | ||||
* Copyright (C) 2015 by Reece H. Dunn * | |||||
* * | * * | ||||
* This program is free software; you can redistribute it and/or modify * | * This program is free software; you can redistribute it and/or modify * | ||||
* it under the terms of the GNU General Public License as published by * | * it under the terms of the GNU General Public License as published by * | ||||
* <http://www.gnu.org/licenses/>. * | * <http://www.gnu.org/licenses/>. * | ||||
***************************************************************************/ | ***************************************************************************/ | ||||
#ifdef __cplusplus | |||||
extern "C" | |||||
{ | |||||
#endif | |||||
typedef struct { | typedef struct { | ||||
void ReadTonePoints(char *string, int *tone_pts); | void ReadTonePoints(char *string, int *tone_pts); | ||||
void VoiceReset(int control); | void VoiceReset(int control); | ||||
#ifdef __cplusplus | |||||
} | |||||
#endif |
#include "stdint.h" | #include "stdint.h" | ||||
#endif | #endif | ||||
#ifdef __cplusplus | |||||
extern "C" | |||||
{ | |||||
#endif | |||||
extern int option_device_number; | extern int option_device_number; | ||||
extern int wave_init(int samplerate); | extern int wave_init(int samplerate); | ||||
// for tests | // for tests | ||||
extern void *wave_test_get_write_buffer(); | extern void *wave_test_get_write_buffer(); | ||||
#ifdef __cplusplus | |||||
} | |||||
#endif | |||||
#endif | #endif |