Browse Source

Fix building mbrowrap.c on Windows.

master
Reece H. Dunn 9 years ago
parent
commit
5f39c2e1d0
2 changed files with 7 additions and 10 deletions
  1. 2
    3
      src/libespeak-ng/mbrowrap.c
  2. 5
    7
      src/libespeak-ng/mbrowrap.h

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

@@ -42,7 +42,6 @@ BOOL load_MBR()
read_MBR = (PROCISI)GetProcAddress(hinstDllMBR, "read_MBR");
close_MBR = (PROCVV)GetProcAddress(hinstDllMBR, "close_MBR");
reset_MBR = (PROCVV)GetProcAddress(hinstDllMBR, "reset_MBR");
lastError_MBR = (PROCIV)GetProcAddress(hinstDllMBR, "lastError_MBR");
lastErrorStr_MBR = (PROCVCI)GetProcAddress(hinstDllMBR, "lastErrorStr_MBR");
setNoError_MBR = (PROCVI)GetProcAddress(hinstDllMBR, "setNoError_MBR");
setVolumeRatio_MBR = (PROCVF)GetProcAddress(hinstDllMBR, "setVolumeRatio_MBR");
@@ -635,13 +634,13 @@ void setVolumeRatio_mbrola(float value)
init_MBR(mbr_voice_path);
}

int lastErrorStr_mbrola(char *buffer, int bufsize)
char *lastErrorStr_mbrola(char *buffer, int bufsize)
{
int result;
if (mbr_pid)
mbrola_has_errors();
result = snprintf(buffer, bufsize, "%s", mbr_errorbuf);
return result >= bufsize ? (bufsize - 1) : result;
return buffer;
}

void setNoError_mbrola(int no_error)

+ 5
- 7
src/libespeak-ng/mbrowrap.h View File

@@ -29,7 +29,7 @@ extern "C"
typedef void (WINAPI *PROCVV)(void);
typedef void (WINAPI *PROCVI)(int);
typedef void (WINAPI *PROCVF)(float);
typedef int (WINAPI *PROCIV)();
typedef int (WINAPI *PROCIV)(void);
typedef int (WINAPI *PROCIC)(char *);
typedef int (WINAPI *PROCISI)(short *, int);
typedef char * (WINAPI *PROCVCI)(char *, int);
@@ -99,13 +99,11 @@ void (WINAPI *setVolumeRatio_MBR)(float value);

/*
* Copy into 'buffer' at most 'bufsize' bytes from the latest error
* message. This may also contain non-fatal errors from mbrola. The
* returned value is the actual number of bytes copied. When no error
* message is pending then an empty string is returned. Consecutive
* calls to lastErrorStr_MBR() will return the same message unless it
* is explicitly cleared with resetError_MBR().
* message. This may also contain non-fatal errors from mbrola. When
* no error message is pending then an empty string is returned.
* Consecutive calls to lastErrorStr_MBR() will return the same message.
*/
int (WINAPI *lastErrorStr_MBR)(char *buffer, int bufsize);
char * (WINAPI *lastErrorStr_MBR)(char *buffer, int bufsize);

/*
* Tolerance to missing diphones.

Loading…
Cancel
Save