diff options
Diffstat (limited to 'third_party/resample')
-rw-r--r-- | third_party/resample/include/resamplesubs.h | 16 | ||||
-rw-r--r-- | third_party/resample/src/libresample_dll.c | 12 | ||||
-rw-r--r-- | third_party/resample/src/resamplesubs.c | 10 |
3 files changed, 28 insertions, 10 deletions
diff --git a/third_party/resample/include/resamplesubs.h b/third_party/resample/include/resamplesubs.h index 76563b7b..ab0771b6 100644 --- a/third_party/resample/include/resamplesubs.h +++ b/third_party/resample/include/resamplesubs.h @@ -7,11 +7,17 @@ typedef int RES_WORD; typedef unsigned short RES_UHWORD; typedef unsigned int RES_UWORD; -int res_SrcLinear(const RES_HWORD X[], RES_HWORD Y[], - double pFactor, RES_UHWORD nx); -int res_Resample(const RES_HWORD X[], RES_HWORD Y[], double pFactor, - RES_UHWORD nx, RES_BOOL LargeF, RES_BOOL Interp); -int res_GetXOFF(double pFactor, RES_BOOL LargeF); +#ifdef _USRDLL +# define DECL(T) __declspec(dllexport) T +#else +# define DECL(T) T +#endif + +DECL(int) res_SrcLinear(const RES_HWORD X[], RES_HWORD Y[], + double pFactor, RES_UHWORD nx); +DECL(int) res_Resample(const RES_HWORD X[], RES_HWORD Y[], double pFactor, + RES_UHWORD nx, RES_BOOL LargeF, RES_BOOL Interp); +DECL(int) res_GetXOFF(double pFactor, RES_BOOL LargeF); #endif diff --git a/third_party/resample/src/libresample_dll.c b/third_party/resample/src/libresample_dll.c new file mode 100644 index 00000000..28ab9ec4 --- /dev/null +++ b/third_party/resample/src/libresample_dll.c @@ -0,0 +1,12 @@ +// libresample_dll.cpp : Defines the entry point for the DLL application. +// +#include <windows.h> + +BOOL APIENTRY DllMain( HANDLE hModule, + DWORD ul_reason_for_call, + LPVOID lpReserved + ) +{ + return TRUE; +} + diff --git a/third_party/resample/src/resamplesubs.c b/third_party/resample/src/resamplesubs.c index ae78add8..2cb04eb5 100644 --- a/third_party/resample/src/resamplesubs.c +++ b/third_party/resample/src/resamplesubs.c @@ -319,14 +319,14 @@ static int SrcUD(const RES_HWORD X[], RES_HWORD Y[], double pFactor, } -int res_SrcLinear(const RES_HWORD X[], RES_HWORD Y[], - double pFactor, RES_UHWORD nx) +DECL(int) res_SrcLinear(const RES_HWORD X[], RES_HWORD Y[], + double pFactor, RES_UHWORD nx) { return SrcLinear(X, Y, pFactor, nx); } -int res_Resample(const RES_HWORD X[], RES_HWORD Y[], double pFactor, - RES_UHWORD nx, RES_BOOL LargeF, RES_BOOL Interp) +DECL(int) res_Resample(const RES_HWORD X[], RES_HWORD Y[], double pFactor, + RES_UHWORD nx, RES_BOOL LargeF, RES_BOOL Interp) { if (pFactor >= 1) { @@ -353,7 +353,7 @@ int res_Resample(const RES_HWORD X[], RES_HWORD Y[], double pFactor, } } -int res_GetXOFF(double pFactor, RES_BOOL LargeF) +DECL(int) res_GetXOFF(double pFactor, RES_BOOL LargeF) { if (LargeF) return (LARGE_FILTER_NMULT + 1) / 2.0 * |