diff --git a/configure b/configure index ddfce47346a..09869ac29e3 100755 --- a/configure +++ b/configure @@ -13719,6 +13719,7 @@ fi if test "x$ac_cv_have_openalsoft" != xyes then as_fn_append wine_notices "|openal-soft ${notice_platform}development files not found (or too old), XAudio2 won't be supported" + enable_xaudio2_1=${enable_xaudio2_1:-no} enable_xaudio2_2=${enable_xaudio2_2:-no} enable_xaudio2_3=${enable_xaudio2_3:-no} enable_xaudio2_4=${enable_xaudio2_4:-no} diff --git a/configure.ac b/configure.ac index 60e2f2864cc..cb3de0723f0 100644 --- a/configure.ac +++ b/configure.ac @@ -1662,6 +1662,7 @@ fi if test "x$ac_cv_have_openalsoft" != xyes then WINE_NOTICE([openal-soft ${notice_platform}development files not found (or too old), XAudio2 won't be supported]) + enable_xaudio2_1=${enable_xaudio2_1:-no} enable_xaudio2_2=${enable_xaudio2_2:-no} enable_xaudio2_3=${enable_xaudio2_3:-no} enable_xaudio2_4=${enable_xaudio2_4:-no} diff --git a/dlls/xaudio2_1/Makefile.in b/dlls/xaudio2_1/Makefile.in index 282513b94b1..7aab50320e6 100644 --- a/dlls/xaudio2_1/Makefile.in +++ b/dlls/xaudio2_1/Makefile.in @@ -1,7 +1,12 @@ +EXTRADEFS = -DXAUDIO2_VER=1 MODULE = xaudio2_1.dll -IMPORTS = ole32 +IMPORTS = advapi32 kernel32 ole32 user32 uuid +EXTRALIBS = $(OPENAL_LIBS) +PARENTSRC = ../xaudio2_7 C_SRCS = \ + compat.c \ + xapofx.c \ xaudio_dll.c IDL_SRCS = xaudio_classes.idl diff --git a/dlls/xaudio2_1/xaudio2_1.spec b/dlls/xaudio2_1/xaudio2_1.spec index cb263d4836b..b16365d0c9f 100644 --- a/dlls/xaudio2_1/xaudio2_1.spec +++ b/dlls/xaudio2_1/xaudio2_1.spec @@ -1,4 +1,4 @@ @ stdcall -private DllCanUnloadNow() -@ stdcall -private DllGetClassObject(ptr ptr ptr) xaudio2_7.DllGetClassObject +@ stdcall -private DllGetClassObject(ptr ptr ptr) @ stdcall -private DllRegisterServer() @ stdcall -private DllUnregisterServer() diff --git a/dlls/xaudio2_1/xaudio_classes.idl b/dlls/xaudio2_1/xaudio_classes.idl deleted file mode 100644 index 80fe781aa84..00000000000 --- a/dlls/xaudio2_1/xaudio_classes.idl +++ /dev/null @@ -1,42 +0,0 @@ -/* - * COM Classes for xaudio - * - * 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 - */ - -#pragma makedep register - -[ - helpstring("XAudio2.1 Class"), - threading(both), - uuid(e21a7345-eb21-468e-be50-804db97cf708) -] -coclass XAudio21 { interface IXAudio22; } - -[ - helpstring("XAudio2.1 AudioReverb Class"), - threading(both), - uuid(f4769300-b949-4df9-b333-00d33932e9a6) -] -coclass AudioReverb21 { interface IXAPO; } - -[ - helpstring("XAudio2.1 AudioVolumeMeter Class"), - threading(both), - uuid(c1e3f122-a2ea-442c-854f-20d98f8357a1) -] -coclass AudioVolumeMeter21 { interface IXAPO; } diff --git a/dlls/xaudio2_1/xaudio_dll.c b/dlls/xaudio2_1/xaudio_dll.c deleted file mode 100644 index e55861c100a..00000000000 --- a/dlls/xaudio2_1/xaudio_dll.c +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 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 -#include "windef.h" -#include "winbase.h" -#include "objbase.h" -#include "rpcproxy.h" - -static HINSTANCE instance; - -BOOL WINAPI DllMain(HINSTANCE hinstance, DWORD reason, LPVOID reserved) -{ - switch (reason) - { - case DLL_WINE_PREATTACH: - return FALSE; /* prefer native version */ - case DLL_PROCESS_ATTACH: - instance = hinstance; - DisableThreadLibraryCalls(hinstance); - break; - } - return TRUE; -} - -HRESULT WINAPI DllCanUnloadNow(void) -{ - return S_FALSE; -} - -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources(instance); -} - -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources(instance); -} diff --git a/dlls/xaudio2_7/xaudio_classes.idl b/dlls/xaudio2_7/xaudio_classes.idl index 27b74c96779..6e460ac7801 100644 --- a/dlls/xaudio2_7/xaudio_classes.idl +++ b/dlls/xaudio2_7/xaudio_classes.idl @@ -234,3 +234,26 @@ coclass AudioReverb22 { interface IXAPO; } ] coclass AudioVolumeMeter22 { interface IXAPO; } #endif /* XAUDIO2_VER == 2 */ + +#if XAUDIO2_VER == 1 +[ + helpstring("XAudio2.1 Class"), + threading(both), + uuid(e21a7345-eb21-468e-be50-804db97cf708) +] +coclass XAudio21 { interface IXAudio22; } + +[ + helpstring("XAudio2.1 AudioReverb Class"), + threading(both), + uuid(f4769300-b949-4df9-b333-00d33932e9a6) +] +coclass AudioReverb21 { interface IXAPO; } + +[ + helpstring("XAudio2.1 AudioVolumeMeter Class"), + threading(both), + uuid(c1e3f122-a2ea-442c-854f-20d98f8357a1) +] +coclass AudioVolumeMeter21 { interface IXAPO; } +#endif /* XAUDIO2_VER == 1 */