From b2b5a085b5e288bbbb673c57eb6e6a04156735ff Mon Sep 17 00:00:00 2001 From: Andrew Eikum Date: Tue, 6 Oct 2015 13:01:24 -0500 Subject: [PATCH] x3daudio: Forward older DLLs to x3daudio1_7. Signed-off-by: Andrew Eikum --- configure | 4 +++- configure.ac | 3 ++- dlls/x3daudio1_0/Makefile.in | 4 ++++ dlls/x3daudio1_0/main.c | 36 +++++++++++++++++++++++++++++++ dlls/x3daudio1_0/x3daudio1_0.spec | 2 ++ dlls/x3daudio1_1/x3daudio1_1.spec | 4 ++-- dlls/x3daudio1_2/x3daudio1_2.spec | 4 ++-- dlls/x3daudio1_3/x3daudio1_3.spec | 4 ++-- dlls/x3daudio1_4/x3daudio1_4.spec | 4 ++-- dlls/x3daudio1_5/x3daudio1_5.spec | 4 ++-- dlls/x3daudio1_6/Makefile.in | 1 + dlls/x3daudio1_6/main.c | 9 ++++++++ dlls/x3daudio1_6/x3daudio1_6.spec | 4 ++-- dlls/x3daudio1_7/Makefile.in | 1 + 14 files changed, 70 insertions(+), 14 deletions(-) create mode 100644 dlls/x3daudio1_0/Makefile.in create mode 100644 dlls/x3daudio1_0/main.c create mode 100644 dlls/x3daudio1_0/x3daudio1_0.spec diff --git a/configure b/configure index 6fdf7a6eb04..33f034352a1 100755 --- a/configure +++ b/configure @@ -1364,6 +1364,7 @@ enable_wsock32 enable_wtsapi32 enable_wuapi enable_wuaueng +enable_x3daudio1_0 enable_x3daudio1_1 enable_x3daudio1_2 enable_x3daudio1_3 @@ -17935,13 +17936,14 @@ wine_fn_config_dll wtsapi32 enable_wtsapi32 implib wine_fn_config_test dlls/wtsapi32/tests wtsapi32_test wine_fn_config_dll wuapi enable_wuapi clean wine_fn_config_dll wuaueng enable_wuaueng +wine_fn_config_dll x3daudio1_0 enable_x3daudio1_0 wine_fn_config_dll x3daudio1_1 enable_x3daudio1_1 wine_fn_config_dll x3daudio1_2 enable_x3daudio1_2 wine_fn_config_dll x3daudio1_3 enable_x3daudio1_3 wine_fn_config_dll x3daudio1_4 enable_x3daudio1_4 wine_fn_config_dll x3daudio1_5 enable_x3daudio1_5 wine_fn_config_dll x3daudio1_6 enable_x3daudio1_6 -wine_fn_config_dll x3daudio1_7 enable_x3daudio1_7 +wine_fn_config_dll x3daudio1_7 enable_x3daudio1_7 implib wine_fn_config_dll xapofx1_1 enable_xapofx1_1 wine_fn_config_dll xapofx1_2 enable_xapofx1_2 wine_fn_config_dll xapofx1_3 enable_xapofx1_3 diff --git a/configure.ac b/configure.ac index 7e6e855e226..74ab2026e35 100644 --- a/configure.ac +++ b/configure.ac @@ -3450,13 +3450,14 @@ WINE_CONFIG_DLL(wtsapi32,,[implib]) WINE_CONFIG_TEST(dlls/wtsapi32/tests) WINE_CONFIG_DLL(wuapi,,[clean]) WINE_CONFIG_DLL(wuaueng) +WINE_CONFIG_DLL(x3daudio1_0) WINE_CONFIG_DLL(x3daudio1_1) WINE_CONFIG_DLL(x3daudio1_2) WINE_CONFIG_DLL(x3daudio1_3) WINE_CONFIG_DLL(x3daudio1_4) WINE_CONFIG_DLL(x3daudio1_5) WINE_CONFIG_DLL(x3daudio1_6) -WINE_CONFIG_DLL(x3daudio1_7) +WINE_CONFIG_DLL(x3daudio1_7,,[implib]) WINE_CONFIG_DLL(xapofx1_1) WINE_CONFIG_DLL(xapofx1_2) WINE_CONFIG_DLL(xapofx1_3) diff --git a/dlls/x3daudio1_0/Makefile.in b/dlls/x3daudio1_0/Makefile.in new file mode 100644 index 00000000000..16d28686c79 --- /dev/null +++ b/dlls/x3daudio1_0/Makefile.in @@ -0,0 +1,4 @@ +MODULE = x3daudio1_0.dll + +C_SRCS = \ + main.c diff --git a/dlls/x3daudio1_0/main.c b/dlls/x3daudio1_0/main.c new file mode 100644 index 00000000000..52a5e3d6cd1 --- /dev/null +++ b/dlls/x3daudio1_0/main.c @@ -0,0 +1,36 @@ +/* + * Copyright 2015 Andrew Eikum for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ +#include "config.h" +#include + +#include "windef.h" +#include "winbase.h" + +BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved) +{ + switch (reason) + { + case DLL_WINE_PREATTACH: + return FALSE; /* prefer native version */ + case DLL_PROCESS_ATTACH: + DisableThreadLibraryCalls(instance); + break; + } + + return TRUE; +} diff --git a/dlls/x3daudio1_0/x3daudio1_0.spec b/dlls/x3daudio1_0/x3daudio1_0.spec new file mode 100644 index 00000000000..6351da4f29c --- /dev/null +++ b/dlls/x3daudio1_0/x3daudio1_0.spec @@ -0,0 +1,2 @@ +@ cdecl X3DAudioCalculate(ptr ptr ptr long ptr) x3daudio1_6.X3DAudioCalculate +@ cdecl X3DAudioInitialize(long float ptr) x3daudio1_6.X3DAudioInitialize diff --git a/dlls/x3daudio1_1/x3daudio1_1.spec b/dlls/x3daudio1_1/x3daudio1_1.spec index 9a51f1badea..6351da4f29c 100644 --- a/dlls/x3daudio1_1/x3daudio1_1.spec +++ b/dlls/x3daudio1_1/x3daudio1_1.spec @@ -1,2 +1,2 @@ -@ stub X3DAudioCalculate -@ stub X3DAudioInitialize +@ cdecl X3DAudioCalculate(ptr ptr ptr long ptr) x3daudio1_6.X3DAudioCalculate +@ cdecl X3DAudioInitialize(long float ptr) x3daudio1_6.X3DAudioInitialize diff --git a/dlls/x3daudio1_2/x3daudio1_2.spec b/dlls/x3daudio1_2/x3daudio1_2.spec index 9a51f1badea..6351da4f29c 100644 --- a/dlls/x3daudio1_2/x3daudio1_2.spec +++ b/dlls/x3daudio1_2/x3daudio1_2.spec @@ -1,2 +1,2 @@ -@ stub X3DAudioCalculate -@ stub X3DAudioInitialize +@ cdecl X3DAudioCalculate(ptr ptr ptr long ptr) x3daudio1_6.X3DAudioCalculate +@ cdecl X3DAudioInitialize(long float ptr) x3daudio1_6.X3DAudioInitialize diff --git a/dlls/x3daudio1_3/x3daudio1_3.spec b/dlls/x3daudio1_3/x3daudio1_3.spec index 9a51f1badea..6351da4f29c 100644 --- a/dlls/x3daudio1_3/x3daudio1_3.spec +++ b/dlls/x3daudio1_3/x3daudio1_3.spec @@ -1,2 +1,2 @@ -@ stub X3DAudioCalculate -@ stub X3DAudioInitialize +@ cdecl X3DAudioCalculate(ptr ptr ptr long ptr) x3daudio1_6.X3DAudioCalculate +@ cdecl X3DAudioInitialize(long float ptr) x3daudio1_6.X3DAudioInitialize diff --git a/dlls/x3daudio1_4/x3daudio1_4.spec b/dlls/x3daudio1_4/x3daudio1_4.spec index 9a51f1badea..6351da4f29c 100644 --- a/dlls/x3daudio1_4/x3daudio1_4.spec +++ b/dlls/x3daudio1_4/x3daudio1_4.spec @@ -1,2 +1,2 @@ -@ stub X3DAudioCalculate -@ stub X3DAudioInitialize +@ cdecl X3DAudioCalculate(ptr ptr ptr long ptr) x3daudio1_6.X3DAudioCalculate +@ cdecl X3DAudioInitialize(long float ptr) x3daudio1_6.X3DAudioInitialize diff --git a/dlls/x3daudio1_5/x3daudio1_5.spec b/dlls/x3daudio1_5/x3daudio1_5.spec index 9a51f1badea..6351da4f29c 100644 --- a/dlls/x3daudio1_5/x3daudio1_5.spec +++ b/dlls/x3daudio1_5/x3daudio1_5.spec @@ -1,2 +1,2 @@ -@ stub X3DAudioCalculate -@ stub X3DAudioInitialize +@ cdecl X3DAudioCalculate(ptr ptr ptr long ptr) x3daudio1_6.X3DAudioCalculate +@ cdecl X3DAudioInitialize(long float ptr) x3daudio1_6.X3DAudioInitialize diff --git a/dlls/x3daudio1_6/Makefile.in b/dlls/x3daudio1_6/Makefile.in index ad59b8f91f6..fa9046e28e0 100644 --- a/dlls/x3daudio1_6/Makefile.in +++ b/dlls/x3daudio1_6/Makefile.in @@ -1,4 +1,5 @@ MODULE = x3daudio1_6.dll +IMPORTS = x3daudio1_7 C_SRCS = \ main.c diff --git a/dlls/x3daudio1_6/main.c b/dlls/x3daudio1_6/main.c index ea6732f7735..ab06cd6431c 100644 --- a/dlls/x3daudio1_6/main.c +++ b/dlls/x3daudio1_6/main.c @@ -23,6 +23,8 @@ #include "windef.h" #include "winbase.h" +#include "x3daudio.h" + BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { switch (fdwReason) @@ -38,3 +40,10 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) return TRUE; } + +void CDECL X3DA16_X3DAudioInitialize(UINT32 chanmask, float speedofsound, + X3DAUDIO_HANDLE handle) +{ + /* forward to 1.7 */ + X3DAudioInitialize(chanmask, speedofsound, handle); +} diff --git a/dlls/x3daudio1_6/x3daudio1_6.spec b/dlls/x3daudio1_6/x3daudio1_6.spec index 9a51f1badea..6103b1b63ef 100644 --- a/dlls/x3daudio1_6/x3daudio1_6.spec +++ b/dlls/x3daudio1_6/x3daudio1_6.spec @@ -1,2 +1,2 @@ -@ stub X3DAudioCalculate -@ stub X3DAudioInitialize +@ cdecl X3DAudioCalculate(ptr ptr ptr long ptr) x3daudio1_7.X3DAudioCalculate +@ cdecl X3DAudioInitialize(long float ptr) X3DA16_X3DAudioInitialize diff --git a/dlls/x3daudio1_7/Makefile.in b/dlls/x3daudio1_7/Makefile.in index 7487ca8a21c..f3110e4c1c1 100644 --- a/dlls/x3daudio1_7/Makefile.in +++ b/dlls/x3daudio1_7/Makefile.in @@ -1,4 +1,5 @@ MODULE = x3daudio1_7.dll +IMPORTLIB = x3daudio1_7 C_SRCS = \ main.c