diff --git a/src/libespeak-ng/mbrowrap.h b/src/libespeak-ng/mbrowrap.h index b319e945..d492f5a6 100644 --- a/src/libespeak-ng/mbrowrap.h +++ b/src/libespeak-ng/mbrowrap.h @@ -3,6 +3,7 @@ * providing a subset of the API from the Windows mbrola DLL. * * Copyright (C) 2010 by Nicolas Pitre + * Copyright (C) 2016 Reece H. Dunn * * 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 @@ -23,6 +24,33 @@ extern "C" { #endif +#if defined(_WIN32) || defined(_WIN64) + +typedef void (WINAPI *PROCVV)(void); +typedef void (WINAPI *PROCVI)(int); +typedef void (WINAPI *PROCVF)(float); +typedef int (WINAPI *PROCIV)(); +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 + /* * Initialize mbrola. The 'voice_path' argument must contain the * path and file name to the mbrola voice database to be used. Returned @@ -104,6 +132,8 @@ static inline void setNoError_MBR(int no_error) (void)no_error; // unused } +#endif + #ifdef __cplusplus } #endif diff --git a/src/libespeak-ng/synth_mbrola.c b/src/libespeak-ng/synth_mbrola.c index 9ff54055..48f65255 100644 --- a/src/libespeak-ng/synth_mbrola.c +++ b/src/libespeak-ng/synth_mbrola.c @@ -48,26 +48,9 @@ extern unsigned char *outbuf; #include "mbrowrap.h" #else -#include -typedef void (WINAPI *PROCVV)(void); -typedef void (WINAPI *PROCVI)(int); -typedef void (WINAPI *PROCVF)(float); -typedef int (WINAPI *PROCIV)(); -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; +#include +#include "mbrowrap.h" HINSTANCE hinstDllMBR = NULL; diff --git a/src/windows/libespeak-ng.vcxproj b/src/windows/libespeak-ng.vcxproj index e243d9f1..4f20041e 100644 --- a/src/windows/libespeak-ng.vcxproj +++ b/src/windows/libespeak-ng.vcxproj @@ -178,6 +178,7 @@ + diff --git a/src/windows/libespeak-ng.vcxproj.filters b/src/windows/libespeak-ng.vcxproj.filters index 994fb6e4..0527363c 100644 --- a/src/windows/libespeak-ng.vcxproj.filters +++ b/src/windows/libespeak-ng.vcxproj.filters @@ -122,5 +122,8 @@ Header Files + + Header Files + \ No newline at end of file