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

* providing a subset of the API from the Windows mbrola DLL. * providing a subset of the API from the Windows mbrola DLL.
* *
* Copyright (C) 2010 by Nicolas Pitre <[email protected]> * 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 * 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 * it under the terms of the GNU General Public License as published by
{ {
#endif #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 * Initialize mbrola. The 'voice_path' argument must contain the
* path and file name to the mbrola voice database to be used. Returned * path and file name to the mbrola voice database to be used. Returned
(void)no_error; // unused (void)no_error; // unused
} }


#endif

#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

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

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


#else #else

#include <windows.h> #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; HINSTANCE hinstDllMBR = NULL;



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

<ClInclude Include="..\include\espeak\speak_lib.h" /> <ClInclude Include="..\include\espeak\speak_lib.h" />
<ClInclude Include="..\libespeak-ng\error.h" /> <ClInclude Include="..\libespeak-ng\error.h" />
<ClInclude Include="..\libespeak-ng\klatt.h" /> <ClInclude Include="..\libespeak-ng\klatt.h" />
<ClInclude Include="..\libespeak-ng\mbrowrap.h" />
<ClInclude Include="..\libespeak-ng\phoneme.h" /> <ClInclude Include="..\libespeak-ng\phoneme.h" />
<ClInclude Include="..\libespeak-ng\sintab.h" /> <ClInclude Include="..\libespeak-ng\sintab.h" />
<ClInclude Include="..\libespeak-ng\spect.h" /> <ClInclude Include="..\libespeak-ng\spect.h" />

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

<ClInclude Include="..\libespeak-ng\klatt.h"> <ClInclude Include="..\libespeak-ng\klatt.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\libespeak-ng\mbrowrap.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup> </ItemGroup>
</Project> </Project>

Loading…
Cancel
Save