xaudio2_2: Use shared source.
authorAndrew Eikum <aeikum@codeweavers.com>
Tue, 12 Jan 2016 19:31:20 +0000 (13:31 -0600)
committerAlexandre Julliard <julliard@winehq.org>
Wed, 13 Jan 2016 06:52:19 +0000 (15:52 +0900)
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
configure
configure.ac
dlls/xaudio2_2/Makefile.in
dlls/xaudio2_2/xaudio2_2.spec
dlls/xaudio2_2/xaudio_classes.idl [deleted file]
dlls/xaudio2_2/xaudio_dll.c [deleted file]
dlls/xaudio2_7/xaudio_classes.idl

index 8bd9e35bf08a792e6c1d48ef79be30cfdd883b84..ddfce47346aaaea46514592c9480000be3c8cca2 100755 (executable)
--- 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_2=${enable_xaudio2_2:-no}
     enable_xaudio2_3=${enable_xaudio2_3:-no}
     enable_xaudio2_4=${enable_xaudio2_4:-no}
     enable_xaudio2_5=${enable_xaudio2_5:-no}
index 9ee7b747b0748dc3ddfd415da14c498e21cfa9aa..60e2f2864cc43a3210691791f7db5fe298b80ae5 100644 (file)
@@ -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_2=${enable_xaudio2_2:-no}
     enable_xaudio2_3=${enable_xaudio2_3:-no}
     enable_xaudio2_4=${enable_xaudio2_4:-no}
     enable_xaudio2_5=${enable_xaudio2_5:-no}
index 94701995a4c3cce22679506346d6878c22025b6b..77f21bdd0778b233c3acba9f89875e15d590d734 100644 (file)
@@ -1,7 +1,12 @@
+EXTRADEFS = -DXAUDIO2_VER=2
 MODULE    = xaudio2_2.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
index cb263d4836b29dfe06185061b692ef72b7680d7b..b16365d0c9fc216f15ba2cbb479440656177b77e 100644 (file)
@@ -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_2/xaudio_classes.idl b/dlls/xaudio2_2/xaudio_classes.idl
deleted file mode 100644 (file)
index 1d49ffb..0000000
+++ /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.2 Class"),
-    threading(both),
-    uuid(b802058a-464a-42db-bc10-b650d6f2586a)
-]
-coclass XAudio22 { interface IXAudio22; }
-
-[
-    helpstring("XAudio2.2 AudioReverb Class"),
-    threading(both),
-    uuid(629cf0de-3ecc-41e7-9926-f7e43eebec51)
-]
-coclass AudioReverb22 { interface IXAPO; }
-
-[
-    helpstring("XAudio2.2 AudioVolumeMeter Class"),
-    threading(both),
-    uuid(f5ca7b34-8055-42c0-b836-216129eb7e30)
-]
-coclass AudioVolumeMeter22 { interface IXAPO; }
diff --git a/dlls/xaudio2_2/xaudio_dll.c b/dlls/xaudio2_2/xaudio_dll.c
deleted file mode 100644 (file)
index e55861c..0000000
+++ /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 <stdarg.h>
-#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);
-}
index 5ec42fdb2a47fedf788e9fb3d407b3531d08f0ad..27b74c96779bf8624e148b0b2c235bb4213f13ea 100644 (file)
@@ -211,3 +211,26 @@ coclass AudioReverb23 { interface IXAPO; }
 ]
 coclass AudioVolumeMeter23 { interface IXAPO; }
 #endif /* XAUDIO2_VER == 3 */
+
+#if XAUDIO2_VER == 2
+[
+    helpstring("XAudio2.2 Class"),
+    threading(both),
+    uuid(b802058a-464a-42db-bc10-b650d6f2586a)
+]
+coclass XAudio22 { interface IXAudio22; }
+
+[
+    helpstring("XAudio2.2 AudioReverb Class"),
+    threading(both),
+    uuid(629cf0de-3ecc-41e7-9926-f7e43eebec51)
+]
+coclass AudioReverb22 { interface IXAPO; }
+
+[
+    helpstring("XAudio2.2 AudioVolumeMeter Class"),
+    threading(both),
+    uuid(f5ca7b34-8055-42c0-b836-216129eb7e30)
+]
+coclass AudioVolumeMeter22 { interface IXAPO; }
+#endif /* XAUDIO2_VER == 2 */