Browse Source

Merge remote-tracking branch 'yorkie/fix/dup-symbol'

master
Reece H. Dunn 8 years ago
parent
commit
b72754b439
2 changed files with 22 additions and 13 deletions
  1. 12
    3
      src/libespeak-ng/mbrowrap.c
  2. 10
    10
      src/libespeak-ng/mbrowrap.h

+ 12
- 3
src/libespeak-ng/mbrowrap.c View File

*/ */


#include "config.h" #include "config.h"
#include "mbrowrap.h"

int (WINAPI *init_MBR)(char *voice_path);
void (WINAPI *close_MBR)(void);
void (WINAPI *reset_MBR)(void);
int (WINAPI *read_MBR)(short *buffer, int nb_samples);
int (WINAPI *write_MBR)(char *data);
int (WINAPI *flush_MBR)(void);
int (WINAPI *getFreq_MBR)(void);
void (WINAPI *setVolumeRatio_MBR)(float value);
char * (WINAPI *lastErrorStr_MBR)(char *buffer, int bufsize);
void (WINAPI *setNoError_MBR)(int no_error);


#if defined(_WIN32) || defined(_WIN64) #if defined(_WIN32) || defined(_WIN64)


#include <windows.h> #include <windows.h>


#include "mbrowrap.h"


HINSTANCE hinstDllMBR = NULL; HINSTANCE hinstDllMBR = NULL;


#include <unistd.h> #include <unistd.h>


#include <espeak-ng/espeak_ng.h> #include <espeak-ng/espeak_ng.h>

#include "mbrowrap.h"
#include "speech.h" #include "speech.h"


/* /*

+ 10
- 10
src/libespeak-ng/mbrowrap.h View File

* error reason. If this is successful, then close_MBR() must be called * error reason. If this is successful, then close_MBR() must be called
* before init_MBR() can be called again. * before init_MBR() can be called again.
*/ */
int (WINAPI *init_MBR)(char *voice_path);
extern int (WINAPI *init_MBR)(char *voice_path);


/* /*
* Stop mbrola and release any resources. It is necessary to call * Stop mbrola and release any resources. It is necessary to call
* this after a successful call to init_MBR() before init_MBR() can be * this after a successful call to init_MBR() before init_MBR() can be
* called again. * called again.
*/ */
void (WINAPI *close_MBR)(void);
extern void (WINAPI *close_MBR)(void);


/* /*
* Stop any ongoing processing and flush all buffers. After this call * Stop any ongoing processing and flush all buffers. After this call
* any synthesis request will start afresh. * any synthesis request will start afresh.
*/ */
void (WINAPI *reset_MBR)(void);
extern void (WINAPI *reset_MBR)(void);


/* /*
* Return at most 'nb_samples' audio samples into 'buffer'. The returned * Return at most 'nb_samples' audio samples into 'buffer'. The returned
* If not successful, lastErrorStr_MBR() will provide the error reason. * If not successful, lastErrorStr_MBR() will provide the error reason.
* Samples are always 16-bit little endian. * Samples are always 16-bit little endian.
*/ */
int (WINAPI *read_MBR)(short *buffer, int nb_samples);
extern int (WINAPI *read_MBR)(short *buffer, int nb_samples);


/* /*
* Write a NULL terminated string of phoneme in the input buffer. * Write a NULL terminated string of phoneme in the input buffer.
* Return the number of chars actually written, or -1 on error. * Return the number of chars actually written, or -1 on error.
* If not successful, lastErrorStr_MBR() will provide the error reason. * If not successful, lastErrorStr_MBR() will provide the error reason.
*/ */
int (WINAPI *write_MBR)(char *data);
extern int (WINAPI *write_MBR)(char *data);


/* /*
* Send a flush command to the mbrola input stream. * Send a flush command to the mbrola input stream.
* or 0 on failure. If not successful, lastErrorStr_MBR() will provide * or 0 on failure. If not successful, lastErrorStr_MBR() will provide
* the error reason. * the error reason.
*/ */
int (WINAPI *flush_MBR)(void);
extern int (WINAPI *flush_MBR)(void);


/* /*
* Return the audio sample frequency of the used voice database. * Return the audio sample frequency of the used voice database.
*/ */
int (WINAPI *getFreq_MBR)(void);
extern int (WINAPI *getFreq_MBR)(void);


/* /*
* Overall volume. * Overall volume.
*/ */
void (WINAPI *setVolumeRatio_MBR)(float value);
extern void (WINAPI *setVolumeRatio_MBR)(float value);


/* /*
* Copy into 'buffer' at most 'bufsize' bytes from the latest error * Copy into 'buffer' at most 'bufsize' bytes from the latest error
* no error message is pending then an empty string is returned. * no error message is pending then an empty string is returned.
* Consecutive calls to lastErrorStr_MBR() will return the same message. * Consecutive calls to lastErrorStr_MBR() will return the same message.
*/ */
char * (WINAPI *lastErrorStr_MBR)(char *buffer, int bufsize);
extern char * (WINAPI *lastErrorStr_MBR)(char *buffer, int bufsize);


/* /*
* Tolerance to missing diphones. * Tolerance to missing diphones.
*/ */
void (WINAPI *setNoError_MBR)(int no_error);
extern void (WINAPI *setNoError_MBR)(int no_error);


BOOL load_MBR(void); BOOL load_MBR(void);
void unload_MBR(void); void unload_MBR(void);

Loading…
Cancel
Save