|
|
@@ -34,23 +34,13 @@ typedef int (WINAPI *PROCIC)(char *); |
|
|
|
typedef int (WINAPI *PROCISI)(short *, int); |
|
|
|
typedef char * (WINAPI *PROCVCI)(char *, int); |
|
|
|
|
|
|
|
PROCIC init_MBR; |
|
|
|
PROCIC write_MBR; |
|
|
|
PROCIV flush_MBR; |
|
|
|
PROCISI read_MBR; |
|
|
|
PROCVV close_MBR; |
|
|
|
PROCVV reset_MBR; |
|
|
|
PROCIV lastError_MBR; |
|
|
|
PROCVCI lastErrorStr_MBR; |
|
|
|
PROCVI setNoError_MBR; |
|
|
|
PROCIV getFreq_MBR; |
|
|
|
PROCVF setVolumeRatio_MBR; |
|
|
|
|
|
|
|
BOOL load_MBR(); |
|
|
|
void unload_MBR(); |
|
|
|
|
|
|
|
#else |
|
|
|
|
|
|
|
#define WINAPI |
|
|
|
typedef int BOOL; |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
/* |
|
|
|
* Initialize mbrola. The 'voice_path' argument must contain the |
|
|
|
* path and file name to the mbrola voice database to be used. Returned |
|
|
@@ -59,22 +49,20 @@ void unload_MBR(); |
|
|
|
* error reason. If this is successful, then close_MBR() must be called |
|
|
|
* before init_MBR() can be called again. |
|
|
|
*/ |
|
|
|
int init_MBR(const char *voice_path); |
|
|
|
int (WINAPI *init_MBR)(char *voice_path); |
|
|
|
|
|
|
|
/* |
|
|
|
* Stop mbrola and release any resources. It is necessary to call |
|
|
|
* this after a successful call to init_MBR() before init_MBR() can be |
|
|
|
* called again. |
|
|
|
*/ |
|
|
|
void close_MBR(void); |
|
|
|
void (WINAPI *close_MBR)(void); |
|
|
|
|
|
|
|
/* |
|
|
|
* Stop any ongoing processing and flush all buffers. After this call |
|
|
|
* any synthesis request will start afresh. A non-zero value is returned |
|
|
|
* on success, or 0 on failure. If not successful, lastErrorStr_MBR() will |
|
|
|
* provide the error reason. |
|
|
|
* any synthesis request will start afresh. |
|
|
|
*/ |
|
|
|
int reset_MBR(); |
|
|
|
void (WINAPI *reset_MBR)(void); |
|
|
|
|
|
|
|
/* |
|
|
|
* Return at most 'nb_samples' audio samples into 'buffer'. The returned |
|
|
@@ -82,14 +70,14 @@ int reset_MBR(); |
|
|
|
* If not successful, lastErrorStr_MBR() will provide the error reason. |
|
|
|
* Samples are always 16-bit little endian. |
|
|
|
*/ |
|
|
|
int read_MBR(void *buffer, int nb_samples); |
|
|
|
int (WINAPI *read_MBR)(short *buffer, int nb_samples); |
|
|
|
|
|
|
|
/* |
|
|
|
* Write a NULL terminated string of phoneme in the input buffer. |
|
|
|
* Return the number of chars actually written, or -1 on error. |
|
|
|
* If not successful, lastErrorStr_MBR() will provide the error reason. |
|
|
|
*/ |
|
|
|
int write_MBR(const char *data); |
|
|
|
int (WINAPI *write_MBR)(char *data); |
|
|
|
|
|
|
|
/* |
|
|
|
* Send a flush command to the mbrola input stream. |
|
|
@@ -97,17 +85,17 @@ int write_MBR(const char *data); |
|
|
|
* or 0 on failure. If not successful, lastErrorStr_MBR() will provide |
|
|
|
* the error reason. |
|
|
|
*/ |
|
|
|
int flush_MBR(void); |
|
|
|
int (WINAPI *flush_MBR)(void); |
|
|
|
|
|
|
|
/* |
|
|
|
* Return the audio sample frequency of the used voice database. |
|
|
|
*/ |
|
|
|
int getFreq_MBR(void); |
|
|
|
int (WINAPI *getFreq_MBR)(void); |
|
|
|
|
|
|
|
/* |
|
|
|
* Overall volume. |
|
|
|
*/ |
|
|
|
void setVolumeRatio_MBR(float value); |
|
|
|
void (WINAPI *setVolumeRatio_MBR)(float value); |
|
|
|
|
|
|
|
/* |
|
|
|
* Copy into 'buffer' at most 'bufsize' bytes from the latest error |
|
|
@@ -117,22 +105,15 @@ void setVolumeRatio_MBR(float value); |
|
|
|
* calls to lastErrorStr_MBR() will return the same message unless it |
|
|
|
* is explicitly cleared with resetError_MBR(). |
|
|
|
*/ |
|
|
|
int lastErrorStr_MBR(char *buffer, int bufsize); |
|
|
|
|
|
|
|
/* |
|
|
|
* Clear any pending error message. |
|
|
|
*/ |
|
|
|
void resetError_MBR(void); |
|
|
|
int (WINAPI *lastErrorStr_MBR)(char *buffer, int bufsize); |
|
|
|
|
|
|
|
/* |
|
|
|
* Tolerance to missing diphones (always active so this is ignored) |
|
|
|
* Tolerance to missing diphones. |
|
|
|
*/ |
|
|
|
static inline void setNoError_MBR(int no_error) |
|
|
|
{ |
|
|
|
(void)no_error; // unused |
|
|
|
} |
|
|
|
void (WINAPI *setNoError_MBR)(int no_error); |
|
|
|
|
|
|
|
#endif |
|
|
|
BOOL load_MBR(void); |
|
|
|
void unload_MBR(void); |
|
|
|
|
|
|
|
#ifdef __cplusplus |
|
|
|
} |