[PATCH 2/5] xapofx1_4: Use shared source

Andrew Eikum aeikum at codeweavers.com
Thu Jan 14 08:09:59 CST 2016


Signed-off-by: Andrew Eikum <aeikum at codeweavers.com>
---
 dlls/xapofx1_4/Makefile.in        |  4 ++-
 dlls/xapofx1_4/main.c             | 59 ---------------------------------------
 dlls/xaudio2_7/xaudio_classes.idl | 14 ----------
 dlls/xaudio2_7/xaudio_dll.c       |  5 +---
 include/xapofx.h                  |  4 ---
 5 files changed, 4 insertions(+), 82 deletions(-)
 delete mode 100644 dlls/xapofx1_4/main.c

diff --git a/dlls/xapofx1_4/Makefile.in b/dlls/xapofx1_4/Makefile.in
index b65ea90..b49e464 100644
--- a/dlls/xapofx1_4/Makefile.in
+++ b/dlls/xapofx1_4/Makefile.in
@@ -1,5 +1,7 @@
+EXTRADEFS = -DXAPOFX1_VER=4 -DXAUDIO2_VER=6
 MODULE    = xapofx1_4.dll
 IMPORTS   = ole32
+PARENTSRC = ../xaudio2_7
 
 C_SRCS = \
-	main.c
+	xapofx.c
diff --git a/dlls/xapofx1_4/main.c b/dlls/xapofx1_4/main.c
deleted file mode 100644
index 15219ce..0000000
--- a/dlls/xapofx1_4/main.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (C) 2015 Austin English
- *
- * 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 <stdarg.h>
-
-#include "initguid.h"
-#include "windef.h"
-#include "winbase.h"
-#include "compobj.h"
-#include "xapofx.h"
-#include "wine/debug.h"
-
-WINE_DEFAULT_DEBUG_CHANNEL(xaudio2);
-
-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;
-}
-
-HRESULT CDECL CreateFX(REFCLSID clsid, IUnknown **out)
-{
-    const GUID *class = clsid;
-
-    TRACE("%s %p\n", debugstr_guid(clsid), out);
-
-    if(IsEqualGUID(clsid, &CLSID_FXReverb27) ||
-            IsEqualGUID(clsid, &CLSID_FXReverb))
-        class = &CLSID_WINE_FXReverb14;
-    else if(IsEqualGUID(clsid, &CLSID_FXEQ27) ||
-            IsEqualGUID(clsid, &CLSID_FXEQ))
-        class = &CLSID_WINE_FXEQ14;
-
-    return CoCreateInstance(class, NULL, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void**)out);
-}
diff --git a/dlls/xaudio2_7/xaudio_classes.idl b/dlls/xaudio2_7/xaudio_classes.idl
index a4ad4ab..03b94e2 100644
--- a/dlls/xaudio2_7/xaudio_classes.idl
+++ b/dlls/xaudio2_7/xaudio_classes.idl
@@ -71,13 +71,6 @@ coclass FXReverb12 { interface IXAPO; }
 coclass FXReverb13 { interface IXAPO; }
 
 [
-    helpstring("XAPOFX1.4 FXReverb Class (Wine)"),
-    threading(both),
-    uuid(a90bc001-e897-e897-7439-43FF02000104)
-]
-coclass FXReverb14 { interface IXAPO; }
-
-[
     helpstring("XAPOFX1.1 FXEQ Class (Wine)"),
     threading(both),
     uuid(a90bc001-e897-e897-7439-43FF00000101)
@@ -97,13 +90,6 @@ coclass FXEQ12 { interface IXAPO; }
     uuid(a90bc001-e897-e897-7439-43FF00000103)
 ]
 coclass FXEQ13 { interface IXAPO; }
-
-[
-    helpstring("XAPOFX1.4 FXEQ Class (Wine)"),
-    threading(both),
-    uuid(a90bc001-e897-e897-7439-43FF00000104)
-]
-coclass FXEQ14 { interface IXAPO; }
 #endif /* XAUDIO2_VER == 7 */
 
 #if XAUDIO2_VER == 6
diff --git a/dlls/xaudio2_7/xaudio_dll.c b/dlls/xaudio2_7/xaudio_dll.c
index 0c492f7..e43b5b4 100644
--- a/dlls/xaudio2_7/xaudio_dll.c
+++ b/dlls/xaudio2_7/xaudio_dll.c
@@ -2064,8 +2064,7 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void **ppv)
     }else if(IsEqualGUID(rclsid, &CLSID_AudioReverb25)){
         factory = make_xapo_factory(&CLSID_AudioReverb27, 25);
 
-    }else if(IsEqualGUID(rclsid, &CLSID_AudioReverb26) ||
-            IsEqualGUID(rclsid, &CLSID_WINE_FXReverb14)){
+    }else if(IsEqualGUID(rclsid, &CLSID_AudioReverb26)){
         factory = make_xapo_factory(&CLSID_AudioReverb27, 26);
 
     }else if(IsEqualGUID(rclsid, &CLSID_AudioReverb27)){
@@ -2079,8 +2078,6 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void **ppv)
         factory = make_xapo_factory(&CLSID_FXEQ, 23);
     }else if(IsEqualGUID(rclsid, &CLSID_WINE_FXEQ13)){
         factory = make_xapo_factory(&CLSID_FXEQ, 24);
-    }else if(IsEqualGUID(rclsid, &CLSID_WINE_FXEQ14)){
-        factory = make_xapo_factory(&CLSID_FXEQ, 26);
     }
 
     if(!factory) return CLASS_E_CLASSNOTAVAILABLE;
diff --git a/include/xapofx.h b/include/xapofx.h
index d7e1841..681ccf4 100644
--- a/include/xapofx.h
+++ b/include/xapofx.h
@@ -30,7 +30,6 @@ DEFINE_GUID(CLSID_WINE_FXEQ10, 0xa90bc001, 0xe897, 0xe897, 0x74, 0x39, 0x43, 0xF
 DEFINE_GUID(CLSID_WINE_FXEQ11, 0xa90bc001, 0xe897, 0xe897, 0x74, 0x39, 0x43, 0xFF, 0x00, 0x00, 0x01, 0x01);
 DEFINE_GUID(CLSID_WINE_FXEQ12, 0xa90bc001, 0xe897, 0xe897, 0x74, 0x39, 0x43, 0xFF, 0x00, 0x00, 0x01, 0x02);
 DEFINE_GUID(CLSID_WINE_FXEQ13, 0xa90bc001, 0xe897, 0xe897, 0x74, 0x39, 0x43, 0xFF, 0x00, 0x00, 0x01, 0x03);
-DEFINE_GUID(CLSID_WINE_FXEQ14, 0xa90bc001, 0xe897, 0xe897, 0x74, 0x39, 0x43, 0xFF, 0x00, 0x00, 0x01, 0x04);
 
 /* xapofx 1.0 through 1.5 */
 DEFINE_GUID(CLSID_FXMasteringLimiter27, 0xa90bc001, 0xe897, 0xe897, 0x74, 0x39, 0x43, 0x55, 0x00, 0x00, 0x00, 0x01);
@@ -41,7 +40,6 @@ DEFINE_GUID(CLSID_WINE_FXMasteringLimiter10, 0xa90bc001, 0xe897, 0xe897, 0x74, 0
 DEFINE_GUID(CLSID_WINE_FXMasteringLimiter11, 0xa90bc001, 0xe897, 0xe897, 0x74, 0x39, 0x43, 0xFF, 0x01, 0x00, 0x01, 0x01);
 DEFINE_GUID(CLSID_WINE_FXMasteringLimiter12, 0xa90bc001, 0xe897, 0xe897, 0x74, 0x39, 0x43, 0xFF, 0x01, 0x00, 0x01, 0x02);
 DEFINE_GUID(CLSID_WINE_FXMasteringLimiter13, 0xa90bc001, 0xe897, 0xe897, 0x74, 0x39, 0x43, 0xFF, 0x01, 0x00, 0x01, 0x03);
-DEFINE_GUID(CLSID_WINE_FXMasteringLimiter14, 0xa90bc001, 0xe897, 0xe897, 0x74, 0x39, 0x43, 0xFF, 0x01, 0x00, 0x01, 0x04);
 
 /* xapofx 1.0 through 1.5 */
 DEFINE_GUID(CLSID_FXReverb27, 0xa90bc001, 0xe897, 0xe897, 0x74, 0x39, 0x43, 0x55, 0x00, 0x00, 0x00, 0x02);
@@ -52,7 +50,6 @@ DEFINE_GUID(CLSID_WINE_FXReverb10, 0xa90bc001, 0xe897, 0xe897, 0x74, 0x39, 0x43,
 DEFINE_GUID(CLSID_WINE_FXReverb11, 0xa90bc001, 0xe897, 0xe897, 0x74, 0x39, 0x43, 0xFF, 0x02, 0x00, 0x01, 0x01);
 DEFINE_GUID(CLSID_WINE_FXReverb12, 0xa90bc001, 0xe897, 0xe897, 0x74, 0x39, 0x43, 0xFF, 0x02, 0x00, 0x01, 0x02);
 DEFINE_GUID(CLSID_WINE_FXReverb13, 0xa90bc001, 0xe897, 0xe897, 0x74, 0x39, 0x43, 0xFF, 0x02, 0x00, 0x01, 0x03);
-DEFINE_GUID(CLSID_WINE_FXReverb14, 0xa90bc001, 0xe897, 0xe897, 0x74, 0x39, 0x43, 0xFF, 0x02, 0x00, 0x01, 0x04);
 
 /* xapofx 1.0 through 1.5 */
 DEFINE_GUID(CLSID_FXEcho27, 0xa90bc001, 0xe897, 0xe897, 0x74, 0x39, 0x43, 0x55, 0x00, 0x00, 0x00, 0x03);
@@ -63,6 +60,5 @@ DEFINE_GUID(CLSID_WINE_FXEcho10, 0xa90bc001, 0xe897, 0xe897, 0x74, 0x39, 0x43, 0
 DEFINE_GUID(CLSID_WINE_FXEcho11, 0xa90bc001, 0xe897, 0xe897, 0x74, 0x39, 0x43, 0xFF, 0x03, 0x00, 0x01, 0x01);
 DEFINE_GUID(CLSID_WINE_FXEcho12, 0xa90bc001, 0xe897, 0xe897, 0x74, 0x39, 0x43, 0xFF, 0x03, 0x00, 0x01, 0x02);
 DEFINE_GUID(CLSID_WINE_FXEcho13, 0xa90bc001, 0xe897, 0xe897, 0x74, 0x39, 0x43, 0xFF, 0x03, 0x00, 0x01, 0x03);
-DEFINE_GUID(CLSID_WINE_FXEcho14, 0xa90bc001, 0xe897, 0xe897, 0x74, 0x39, 0x43, 0xFF, 0x03, 0x00, 0x01, 0x04);
 
 #endif
-- 
2.7.0





More information about the wine-patches mailing list