Browse Source

Move the MBROLA API definitions for Windows to mbrowrap.h,

master
Reece H. Dunn 9 years ago
parent
commit
706d546182

+ 30
- 0
src/libespeak-ng/mbrowrap.h View File

@@ -3,6 +3,7 @@
* providing a subset of the API from the Windows mbrola DLL.
*
* Copyright (C) 2010 by Nicolas Pitre <[email protected]>
* 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

+ 2
- 19
src/libespeak-ng/synth_mbrola.c View File

@@ -48,26 +48,9 @@ extern unsigned char *outbuf;
#include "mbrowrap.h"

#else

#include <windows.h>
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 "mbrowrap.h"

HINSTANCE hinstDllMBR = NULL;


+ 1
- 0
src/windows/libespeak-ng.vcxproj View File

@@ -178,6 +178,7 @@
<ClInclude Include="..\include\espeak\speak_lib.h" />
<ClInclude Include="..\libespeak-ng\error.h" />
<ClInclude Include="..\libespeak-ng\klatt.h" />
<ClInclude Include="..\libespeak-ng\mbrowrap.h" />
<ClInclude Include="..\libespeak-ng\phoneme.h" />
<ClInclude Include="..\libespeak-ng\sintab.h" />
<ClInclude Include="..\libespeak-ng\spect.h" />

+ 3
- 0
src/windows/libespeak-ng.vcxproj.filters View File

@@ -122,5 +122,8 @@
<ClInclude Include="..\libespeak-ng\klatt.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\libespeak-ng\mbrowrap.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
</Project>

Loading…
Cancel
Save