From f9860002f45e159f704af3dd41b6b24e1879c796 Mon Sep 17 00:00:00 2001 From: Andrew Eikum Date: Mon, 26 Oct 2015 14:20:43 -0500 Subject: [PATCH] xaudio2_8: Add 3D audio function stubs. Signed-off-by: Andrew Eikum Signed-off-by: Alexandre Julliard --- configure | 4 ++-- configure.ac | 4 ++-- dlls/x3daudio1_0/x3daudio1_0.spec | 4 ++-- 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 | 7 ------- dlls/x3daudio1_6/x3daudio1_6.spec | 4 ++-- dlls/x3daudio1_7/Makefile.in | 2 +- dlls/x3daudio1_7/main.c | 26 +++----------------------- dlls/x3daudio1_7/x3daudio1_7.spec | 4 ++-- dlls/xaudio2_8/Makefile.in | 1 + dlls/xaudio2_8/xaudio2_8.spec | 2 ++ dlls/xaudio2_8/xaudio_dll.c | 28 ++++++++++++++++++++++++++++ 17 files changed, 55 insertions(+), 52 deletions(-) diff --git a/configure b/configure index 1dac6ce9ea0..139a32c451a 100755 --- a/configure +++ b/configure @@ -18000,7 +18000,7 @@ 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 implib +wine_fn_config_dll x3daudio1_7 enable_x3daudio1_7 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 @@ -18015,7 +18015,7 @@ wine_fn_config_dll xaudio2_5 enable_xaudio2_5 clean wine_fn_config_dll xaudio2_6 enable_xaudio2_6 clean wine_fn_config_dll xaudio2_7 enable_xaudio2_7 clean wine_fn_config_test dlls/xaudio2_7/tests xaudio2_7_test -wine_fn_config_dll xaudio2_8 enable_xaudio2_8 +wine_fn_config_dll xaudio2_8 enable_xaudio2_8 implib wine_fn_config_dll xinput1_1 enable_xinput1_1 wine_fn_config_dll xinput1_2 enable_xinput1_2 wine_fn_config_dll xinput1_3 enable_xinput1_3 implib xinput diff --git a/configure.ac b/configure.ac index b2cd9324772..c4ba1a32dc3 100644 --- a/configure.ac +++ b/configure.ac @@ -3473,7 +3473,7 @@ 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,,[implib]) +WINE_CONFIG_DLL(x3daudio1_7) WINE_CONFIG_DLL(xapofx1_1) WINE_CONFIG_DLL(xapofx1_2) WINE_CONFIG_DLL(xapofx1_3) @@ -3488,7 +3488,7 @@ WINE_CONFIG_DLL(xaudio2_5,,[clean]) WINE_CONFIG_DLL(xaudio2_6,,[clean]) WINE_CONFIG_DLL(xaudio2_7,,[clean]) WINE_CONFIG_TEST(dlls/xaudio2_7/tests) -WINE_CONFIG_DLL(xaudio2_8) +WINE_CONFIG_DLL(xaudio2_8,,[implib]) WINE_CONFIG_DLL(xinput1_1) WINE_CONFIG_DLL(xinput1_2) WINE_CONFIG_DLL(xinput1_3,,[implib],[xinput]) diff --git a/dlls/x3daudio1_0/x3daudio1_0.spec b/dlls/x3daudio1_0/x3daudio1_0.spec index 6351da4f29c..30da23c0213 100644 --- a/dlls/x3daudio1_0/x3daudio1_0.spec +++ b/dlls/x3daudio1_0/x3daudio1_0.spec @@ -1,2 +1,2 @@ -@ cdecl X3DAudioCalculate(ptr ptr ptr long ptr) x3daudio1_6.X3DAudioCalculate -@ cdecl X3DAudioInitialize(long float ptr) x3daudio1_6.X3DAudioInitialize +@ cdecl X3DAudioCalculate(ptr ptr ptr long ptr) xaudio2_8.X3DAudioCalculate +@ cdecl X3DAudioInitialize(long float ptr) x3daudio1_7.X3DAudioInitialize diff --git a/dlls/x3daudio1_1/x3daudio1_1.spec b/dlls/x3daudio1_1/x3daudio1_1.spec index 6351da4f29c..30da23c0213 100644 --- a/dlls/x3daudio1_1/x3daudio1_1.spec +++ b/dlls/x3daudio1_1/x3daudio1_1.spec @@ -1,2 +1,2 @@ -@ cdecl X3DAudioCalculate(ptr ptr ptr long ptr) x3daudio1_6.X3DAudioCalculate -@ cdecl X3DAudioInitialize(long float ptr) x3daudio1_6.X3DAudioInitialize +@ cdecl X3DAudioCalculate(ptr ptr ptr long ptr) xaudio2_8.X3DAudioCalculate +@ cdecl X3DAudioInitialize(long float ptr) x3daudio1_7.X3DAudioInitialize diff --git a/dlls/x3daudio1_2/x3daudio1_2.spec b/dlls/x3daudio1_2/x3daudio1_2.spec index 6351da4f29c..30da23c0213 100644 --- a/dlls/x3daudio1_2/x3daudio1_2.spec +++ b/dlls/x3daudio1_2/x3daudio1_2.spec @@ -1,2 +1,2 @@ -@ cdecl X3DAudioCalculate(ptr ptr ptr long ptr) x3daudio1_6.X3DAudioCalculate -@ cdecl X3DAudioInitialize(long float ptr) x3daudio1_6.X3DAudioInitialize +@ cdecl X3DAudioCalculate(ptr ptr ptr long ptr) xaudio2_8.X3DAudioCalculate +@ cdecl X3DAudioInitialize(long float ptr) x3daudio1_7.X3DAudioInitialize diff --git a/dlls/x3daudio1_3/x3daudio1_3.spec b/dlls/x3daudio1_3/x3daudio1_3.spec index 6351da4f29c..30da23c0213 100644 --- a/dlls/x3daudio1_3/x3daudio1_3.spec +++ b/dlls/x3daudio1_3/x3daudio1_3.spec @@ -1,2 +1,2 @@ -@ cdecl X3DAudioCalculate(ptr ptr ptr long ptr) x3daudio1_6.X3DAudioCalculate -@ cdecl X3DAudioInitialize(long float ptr) x3daudio1_6.X3DAudioInitialize +@ cdecl X3DAudioCalculate(ptr ptr ptr long ptr) xaudio2_8.X3DAudioCalculate +@ cdecl X3DAudioInitialize(long float ptr) x3daudio1_7.X3DAudioInitialize diff --git a/dlls/x3daudio1_4/x3daudio1_4.spec b/dlls/x3daudio1_4/x3daudio1_4.spec index 6351da4f29c..30da23c0213 100644 --- a/dlls/x3daudio1_4/x3daudio1_4.spec +++ b/dlls/x3daudio1_4/x3daudio1_4.spec @@ -1,2 +1,2 @@ -@ cdecl X3DAudioCalculate(ptr ptr ptr long ptr) x3daudio1_6.X3DAudioCalculate -@ cdecl X3DAudioInitialize(long float ptr) x3daudio1_6.X3DAudioInitialize +@ cdecl X3DAudioCalculate(ptr ptr ptr long ptr) xaudio2_8.X3DAudioCalculate +@ cdecl X3DAudioInitialize(long float ptr) x3daudio1_7.X3DAudioInitialize diff --git a/dlls/x3daudio1_5/x3daudio1_5.spec b/dlls/x3daudio1_5/x3daudio1_5.spec index 6351da4f29c..30da23c0213 100644 --- a/dlls/x3daudio1_5/x3daudio1_5.spec +++ b/dlls/x3daudio1_5/x3daudio1_5.spec @@ -1,2 +1,2 @@ -@ cdecl X3DAudioCalculate(ptr ptr ptr long ptr) x3daudio1_6.X3DAudioCalculate -@ cdecl X3DAudioInitialize(long float ptr) x3daudio1_6.X3DAudioInitialize +@ cdecl X3DAudioCalculate(ptr ptr ptr long ptr) xaudio2_8.X3DAudioCalculate +@ cdecl X3DAudioInitialize(long float ptr) x3daudio1_7.X3DAudioInitialize diff --git a/dlls/x3daudio1_6/Makefile.in b/dlls/x3daudio1_6/Makefile.in index fa9046e28e0..ad59b8f91f6 100644 --- a/dlls/x3daudio1_6/Makefile.in +++ b/dlls/x3daudio1_6/Makefile.in @@ -1,5 +1,4 @@ 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 ab06cd6431c..d39863ceb71 100644 --- a/dlls/x3daudio1_6/main.c +++ b/dlls/x3daudio1_6/main.c @@ -40,10 +40,3 @@ 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 6103b1b63ef..30da23c0213 100644 --- a/dlls/x3daudio1_6/x3daudio1_6.spec +++ b/dlls/x3daudio1_6/x3daudio1_6.spec @@ -1,2 +1,2 @@ -@ cdecl X3DAudioCalculate(ptr ptr ptr long ptr) x3daudio1_7.X3DAudioCalculate -@ cdecl X3DAudioInitialize(long float ptr) X3DA16_X3DAudioInitialize +@ cdecl X3DAudioCalculate(ptr ptr ptr long ptr) xaudio2_8.X3DAudioCalculate +@ cdecl X3DAudioInitialize(long float ptr) x3daudio1_7.X3DAudioInitialize diff --git a/dlls/x3daudio1_7/Makefile.in b/dlls/x3daudio1_7/Makefile.in index f3110e4c1c1..299351ebee8 100644 --- a/dlls/x3daudio1_7/Makefile.in +++ b/dlls/x3daudio1_7/Makefile.in @@ -1,5 +1,5 @@ MODULE = x3daudio1_7.dll -IMPORTLIB = x3daudio1_7 +IMPORTS = xaudio2_8 C_SRCS = \ main.c diff --git a/dlls/x3daudio1_7/main.c b/dlls/x3daudio1_7/main.c index eece4fcf103..7f64112ad82 100644 --- a/dlls/x3daudio1_7/main.c +++ b/dlls/x3daudio1_7/main.c @@ -40,29 +40,9 @@ BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved) return TRUE; } -HRESULT CDECL X3DAudioInitialize(UINT32 chanmask, float speedofsound, +void CDECL X3DA17_X3DAudioInitialize(UINT32 chanmask, float speedofsound, X3DAUDIO_HANDLE handle) { - FIXME("0x%x, %f, %p: Stub!\n", chanmask, speedofsound, handle); - return S_OK; -} - -void CDECL X3DAudioCalculate(const X3DAUDIO_HANDLE handle, - const X3DAUDIO_LISTENER *listener, const X3DAUDIO_EMITTER *emitter, - UINT32 flags, X3DAUDIO_DSP_SETTINGS *out) -{ - static int once = 0; - if(!once){ - FIXME("%p %p %p 0x%x %p: Stub!\n", handle, listener, emitter, flags, out); - ++once; - } - - out->LPFDirectCoefficient = 0; - out->LPFReverbCoefficient = 0; - out->ReverbLevel = 0; - out->DopplerFactor = 1; - out->EmitterToListenerAngle = 0; - out->EmitterToListenerDistance = 0; - out->EmitterVelocityComponent = 0; - out->ListenerVelocityComponent = 0; + /* forward to xaudio2_8 */ + X3DAudioInitialize(chanmask, speedofsound, handle); } diff --git a/dlls/x3daudio1_7/x3daudio1_7.spec b/dlls/x3daudio1_7/x3daudio1_7.spec index 7432b84094d..78926efde51 100644 --- a/dlls/x3daudio1_7/x3daudio1_7.spec +++ b/dlls/x3daudio1_7/x3daudio1_7.spec @@ -1,2 +1,2 @@ -@ cdecl X3DAudioCalculate(ptr ptr ptr long ptr) -@ cdecl X3DAudioInitialize(long float ptr) +@ cdecl X3DAudioCalculate(ptr ptr ptr long ptr) xaudio2_8.X3DAudioCalculate +@ cdecl X3DAudioInitialize(long float ptr) X3DA17_X3DAudioInitialize diff --git a/dlls/xaudio2_8/Makefile.in b/dlls/xaudio2_8/Makefile.in index d5fb624b881..3ec8adc0634 100644 --- a/dlls/xaudio2_8/Makefile.in +++ b/dlls/xaudio2_8/Makefile.in @@ -1,4 +1,5 @@ MODULE = xaudio2_8.dll +IMPORTLIB = xaudio2_8 IMPORTS = ole32 C_SRCS = \ diff --git a/dlls/xaudio2_8/xaudio2_8.spec b/dlls/xaudio2_8/xaudio2_8.spec index 09032f9c623..0b9f23866b3 100644 --- a/dlls/xaudio2_8/xaudio2_8.spec +++ b/dlls/xaudio2_8/xaudio2_8.spec @@ -2,3 +2,5 @@ @ stdcall CreateAudioVolumeMeter(ptr) @ stdcall CreateAudioReverb(ptr) @ cdecl CreateFX(ptr ptr ptr long) +@ cdecl X3DAudioCalculate(ptr ptr ptr long ptr) +@ cdecl X3DAudioInitialize(long float ptr) diff --git a/dlls/xaudio2_8/xaudio_dll.c b/dlls/xaudio2_8/xaudio_dll.c index b1c5fd494fc..0a0ef4a9b38 100644 --- a/dlls/xaudio2_8/xaudio_dll.c +++ b/dlls/xaudio2_8/xaudio_dll.c @@ -30,6 +30,7 @@ #include "xaudio2fx.h" #include "xapo.h" #include "xapofx.h" +#include "x3daudio.h" WINE_DEFAULT_DEBUG_CHANNEL(xaudio2); @@ -130,3 +131,30 @@ HRESULT CDECL CreateFX(REFCLSID clsid, IUnknown **out, void *initdata, UINT32 in return S_OK; } + +HRESULT CDECL X3DAudioInitialize(UINT32 chanmask, float speedofsound, + X3DAUDIO_HANDLE handle) +{ + FIXME("0x%x, %f, %p: Stub!\n", chanmask, speedofsound, handle); + return S_OK; +} + +void CDECL X3DAudioCalculate(const X3DAUDIO_HANDLE handle, + const X3DAUDIO_LISTENER *listener, const X3DAUDIO_EMITTER *emitter, + UINT32 flags, X3DAUDIO_DSP_SETTINGS *out) +{ + static int once = 0; + if(!once){ + FIXME("%p %p %p 0x%x %p: Stub!\n", handle, listener, emitter, flags, out); + ++once; + } + + out->LPFDirectCoefficient = 0; + out->LPFReverbCoefficient = 0; + out->ReverbLevel = 0; + out->DopplerFactor = 1; + out->EmitterToListenerAngle = 0; + out->EmitterToListenerDistance = 0; + out->EmitterVelocityComponent = 0; + out->ListenerVelocityComponent = 0; +}