xaudio2: Implement CreateFX for legacy xaudio2 versions.

The various xapofx versions all use the same CLSID to identify the
same effect types. In order to differentiate the versions in Wine
without duplicating a ton of code into each xapofx DLL, I made new
internal CLSIDs for each version of xapofx, which xaudio2_7 registers
and uses to tell them apart.

Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Andrew Eikum 2015-10-23 14:31:09 -05:00 committed by Alexandre Julliard
parent 8b353f5409
commit 539d7fb4e4
18 changed files with 372 additions and 23 deletions

View File

@ -1,4 +1,5 @@
MODULE = xapofx1_1.dll MODULE = xapofx1_1.dll
IMPORTS = ole32
C_SRCS = \ C_SRCS = \
main.c main.c

View File

@ -19,8 +19,11 @@
#include "config.h" #include "config.h"
#include <stdarg.h> #include <stdarg.h>
#include "initguid.h"
#include "windef.h" #include "windef.h"
#include "winbase.h" #include "winbase.h"
#include "compobj.h"
#include "xapofx.h"
#include "wine/debug.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(xapofx); WINE_DEFAULT_DEBUG_CHANNEL(xapofx);
@ -43,3 +46,16 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
} }
return TRUE; 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_FXReverb11;
return CoCreateInstance(class, NULL, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void**)out);
}

View File

@ -1 +1 @@
@ cdecl CreateFX(ptr ptr) xapofx1_5.CreateFX @ cdecl CreateFX(ptr ptr)

View File

@ -1,4 +1,5 @@
MODULE = xapofx1_2.dll MODULE = xapofx1_2.dll
IMPORTS = ole32
C_SRCS = \ C_SRCS = \
main.c main.c

View File

@ -19,8 +19,11 @@
#include "config.h" #include "config.h"
#include <stdarg.h> #include <stdarg.h>
#include "initguid.h"
#include "windef.h" #include "windef.h"
#include "winbase.h" #include "winbase.h"
#include "compobj.h"
#include "xapofx.h"
#include "wine/debug.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(xapofx); WINE_DEFAULT_DEBUG_CHANNEL(xapofx);
@ -43,3 +46,16 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
} }
return TRUE; 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_FXReverb12;
return CoCreateInstance(class, NULL, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void**)out);
}

View File

@ -1 +1 @@
@ cdecl CreateFX(ptr ptr) xapofx1_5.CreateFX @ cdecl CreateFX(ptr ptr)

View File

@ -1,4 +1,5 @@
MODULE = xapofx1_3.dll MODULE = xapofx1_3.dll
IMPORTS = ole32
C_SRCS = \ C_SRCS = \
main.c main.c

View File

@ -17,11 +17,16 @@
*/ */
#include "config.h" #include "config.h"
#include <stdarg.h> #include <stdarg.h>
#include "initguid.h"
#include "windef.h" #include "windef.h"
#include "winbase.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) BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved)
{ {
@ -36,3 +41,16 @@ BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved)
return TRUE; 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_FXReverb13;
return CoCreateInstance(class, NULL, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void**)out);
}

View File

@ -1 +1 @@
@ cdecl CreateFX(ptr ptr) xapofx1_5.CreateFX @ cdecl CreateFX(ptr ptr)

View File

@ -1,4 +1,5 @@
MODULE = xapofx1_4.dll MODULE = xapofx1_4.dll
IMPORTS = ole32
C_SRCS = \ C_SRCS = \
main.c main.c

View File

@ -15,12 +15,18 @@
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include "config.h"
#include "config.h"
#include <stdarg.h> #include <stdarg.h>
#include "initguid.h"
#include "windef.h" #include "windef.h"
#include "winbase.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) BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved)
{ {
@ -35,3 +41,16 @@ BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved)
return TRUE; 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;
return CoCreateInstance(class, NULL, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void**)out);
}

View File

@ -1 +1 @@
@ cdecl CreateFX(ptr ptr) xapofx1_5.CreateFX @ cdecl CreateFX(ptr ptr)

View File

@ -15,14 +15,15 @@
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include "config.h"
#include "config.h"
#include <stdarg.h> #include <stdarg.h>
#include "initguid.h" #include "initguid.h"
#include "windef.h" #include "windef.h"
#include "winbase.h" #include "winbase.h"
#include "compobj.h" #include "compobj.h"
#include "xapofx.h"
#include "wine/debug.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(xaudio2); WINE_DEFAULT_DEBUG_CHANNEL(xaudio2);
@ -43,6 +44,13 @@ BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved)
HRESULT CDECL CreateFX(REFCLSID clsid, IUnknown **out) HRESULT CDECL CreateFX(REFCLSID clsid, IUnknown **out)
{ {
const GUID *class = clsid;
TRACE("%s %p\n", debugstr_guid(clsid), out); TRACE("%s %p\n", debugstr_guid(clsid), out);
return CoCreateInstance(clsid, NULL, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void**)out);
if(IsEqualGUID(clsid, &CLSID_FXReverb27) ||
IsEqualGUID(clsid, &CLSID_FXReverb))
class = &CLSID_WINE_FXReverb15;
return CoCreateInstance(class, NULL, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void**)out);
} }

View File

@ -25,6 +25,7 @@
#include "xaudio2.h" #include "xaudio2.h"
#include "xaudio2fx.h" #include "xaudio2fx.h"
#include "xapo.h" #include "xapo.h"
#include "xapofx.h"
#include "mmsystem.h" #include "mmsystem.h"
static BOOL xaudio27; static BOOL xaudio27;
@ -246,12 +247,26 @@ static void test_simple_streaming(IXAudio2 *xa)
/* hook up volume meter */ /* hook up volume meter */
if(xaudio27){ if(xaudio27){
IXAPO *xapo;
hr = CoCreateInstance(&CLSID_AudioVolumeMeter, NULL, hr = CoCreateInstance(&CLSID_AudioVolumeMeter, NULL,
CLSCTX_INPROC_SERVER, &IID_IUnknown, (void**)&vumeter); CLSCTX_INPROC_SERVER, &IID_IUnknown, (void**)&vumeter);
ok(hr == S_OK, "CoCreateInstance(AudioVolumeMeter) failed: %08x\n", hr); ok(hr == S_OK, "CoCreateInstance(AudioVolumeMeter) failed: %08x\n", hr);
hr = IUnknown_QueryInterface(vumeter, &IID_IXAPO27, (void**)&xapo);
ok(hr == S_OK, "Couldn't get IXAPO27 interface: %08x\n", hr);
if(SUCCEEDED(hr))
IXAPO_Release(xapo);
}else{ }else{
IXAPO *xapo;
hr = pCreateAudioVolumeMeter(&vumeter); hr = pCreateAudioVolumeMeter(&vumeter);
ok(hr == S_OK, "CreateAudioVolumeMeter failed: %08x\n", hr); ok(hr == S_OK, "CreateAudioVolumeMeter failed: %08x\n", hr);
hr = IUnknown_QueryInterface(vumeter, &IID_IXAPO, (void**)&xapo);
ok(hr == S_OK, "Couldn't get IXAPO interface: %08x\n", hr);
if(SUCCEEDED(hr))
IXAPO_Release(xapo);
} }
effect.InitialState = TRUE; effect.InitialState = TRUE;
@ -778,6 +793,126 @@ static UINT32 test_DeviceDetails(IXAudio27 *xa)
return count; return count;
} }
static void test_xapo_creation_legacy(const char *module, unsigned int version)
{
HANDLE xapofxdll;
HRESULT hr;
IUnknown *fx_unk;
unsigned int i;
HRESULT (CDECL *pCreateFX)(REFCLSID,IUnknown**) = NULL;
/* CLSIDs are the same across all versions */
static struct {
const GUID *clsid;
BOOL todo;
} const_clsids[] = {
{ &CLSID_FXEQ27, TRUE },
{ &CLSID_FXMasteringLimiter27, TRUE },
{ &CLSID_FXReverb27, FALSE },
{ &CLSID_FXEcho27, TRUE},
/* older versions of xapofx actually have support for new clsids */
{ &CLSID_FXEQ, TRUE },
{ &CLSID_FXMasteringLimiter, TRUE },
{ &CLSID_FXReverb, FALSE },
{ &CLSID_FXEcho, TRUE}
};
/* different CLSID for each version */
static const GUID *avm_clsids[] = {
&CLSID_AudioVolumeMeter20,
&CLSID_AudioVolumeMeter21,
&CLSID_AudioVolumeMeter22,
&CLSID_AudioVolumeMeter23,
&CLSID_AudioVolumeMeter24,
&CLSID_AudioVolumeMeter25,
&CLSID_AudioVolumeMeter26,
&CLSID_AudioVolumeMeter
};
static const GUID *ar_clsids[] = {
&CLSID_AudioReverb20,
&CLSID_AudioReverb21,
&CLSID_AudioReverb22,
&CLSID_AudioReverb23,
&CLSID_AudioReverb24,
&CLSID_AudioReverb25,
&CLSID_AudioReverb26,
&CLSID_AudioReverb
};
xapofxdll = LoadLibraryA(module);
if(xapofxdll){
pCreateFX = (void*)GetProcAddress(xapofxdll, "CreateFX");
ok(pCreateFX != NULL, "%s did not have CreateFX?\n", module);
if(!pCreateFX){
FreeLibrary(xapofxdll);
return;
}
}else{
win_skip("Couldn't load %s\n", module);
return;
}
if(pCreateFX){
for(i = 0; i < sizeof(const_clsids) / sizeof(*const_clsids); ++i){
hr = pCreateFX(const_clsids[i].clsid, &fx_unk);
if(const_clsids[i].todo)
todo_wine ok(hr == S_OK, "%s: CreateFX(%s) failed: %08x\n", module, wine_dbgstr_guid(const_clsids[i].clsid), hr);
else
ok(hr == S_OK, "%s: CreateFX(%s) failed: %08x\n", module, wine_dbgstr_guid(const_clsids[i].clsid), hr);
if(SUCCEEDED(hr)){
IXAPO *xapo;
hr = IUnknown_QueryInterface(fx_unk, &IID_IXAPO27, (void**)&xapo);
ok(hr == S_OK, "Couldn't get IXAPO27 interface: %08x\n", hr);
if(SUCCEEDED(hr))
IXAPO_Release(xapo);
IUnknown_Release(fx_unk);
}
hr = CoCreateInstance(const_clsids[i].clsid, NULL, CLSCTX_INPROC_SERVER,
&IID_IUnknown, (void**)&fx_unk);
ok(hr == REGDB_E_CLASSNOTREG, "CoCreateInstance should have failed: %08x\n", hr);
if(SUCCEEDED(hr))
IUnknown_Release(fx_unk);
}
hr = pCreateFX(avm_clsids[version - 20], &fx_unk);
ok(hr == S_OK, "%s: CreateFX(%s) failed: %08x\n", module, wine_dbgstr_guid(avm_clsids[version - 20]), hr);
if(SUCCEEDED(hr)){
IXAPO *xapo;
hr = IUnknown_QueryInterface(fx_unk, &IID_IXAPO27, (void**)&xapo);
ok(hr == S_OK, "Couldn't get IXAPO27 interface: %08x\n", hr);
if(SUCCEEDED(hr))
IXAPO_Release(xapo);
IUnknown_Release(fx_unk);
}
hr = pCreateFX(ar_clsids[version - 20], &fx_unk);
ok(hr == S_OK, "%s: CreateFX(%s) failed: %08x\n", module, wine_dbgstr_guid(ar_clsids[version - 20]), hr);
if(SUCCEEDED(hr)){
IXAPO *xapo;
hr = IUnknown_QueryInterface(fx_unk, &IID_IXAPO27, (void**)&xapo);
ok(hr == S_OK, "Couldn't get IXAPO27 interface: %08x\n", hr);
if(SUCCEEDED(hr))
IXAPO_Release(xapo);
IUnknown_Release(fx_unk);
}
}
FreeLibrary(xapofxdll);
}
static void test_xapo_creation(void)
{
test_xapo_creation_legacy("xapofx1_1.dll", 22);
test_xapo_creation_legacy("xapofx1_2.dll", 23);
test_xapo_creation_legacy("xapofx1_3.dll", 24);
test_xapo_creation_legacy("xapofx1_3.dll", 25);
test_xapo_creation_legacy("xapofx1_4.dll", 26);
test_xapo_creation_legacy("xapofx1_5.dll", 27);
}
static UINT32 check_has_devices(IXAudio2 *xa) static UINT32 check_has_devices(IXAudio2 *xa)
{ {
HRESULT hr; HRESULT hr;
@ -808,6 +943,8 @@ START_TEST(xaudio2)
pCreateAudioVolumeMeter = (void*)GetProcAddress(xa28dll, "CreateAudioVolumeMeter"); pCreateAudioVolumeMeter = (void*)GetProcAddress(xa28dll, "CreateAudioVolumeMeter");
} }
test_xapo_creation();
/* XAudio 2.7 (Jun 2010 DirectX) */ /* XAudio 2.7 (Jun 2010 DirectX) */
hr = CoCreateInstance(&CLSID_XAudio2, NULL, CLSCTX_INPROC_SERVER, hr = CoCreateInstance(&CLSID_XAudio2, NULL, CLSCTX_INPROC_SERVER,
&IID_IXAudio27, (void**)&xa27); &IID_IXAudio27, (void**)&xa27);

View File

@ -47,3 +47,38 @@ coclass AudioReverb { interface IUnknown; }
uuid(962f5027-99be-4692-a468-85802cf8de61) uuid(962f5027-99be-4692-a468-85802cf8de61)
] ]
coclass XACT31 { interface IUnknown; } coclass XACT31 { interface IUnknown; }
[
helpstring("XAPOFX1.1 FXReverb Class (Wine)"),
threading(both),
uuid(a90bc001-e897-e897-7439-43FF02000101)
]
coclass FXReverb11 { interface IXAPO; }
[
helpstring("XAPOFX1.2 FXReverb Class (Wine)"),
threading(both),
uuid(a90bc001-e897-e897-7439-43FF02000102)
]
coclass FXReverb12 { interface IXAPO; }
[
helpstring("XAPOFX1.3 FXReverb Class (Wine)"),
threading(both),
uuid(a90bc001-e897-e897-7439-43FF02000103)
]
coclass FXReverb13 { interface IXAPO; }
[
helpstring("XAPOFX1.4 FXReverb Class (Wine)"),
threading(both),
uuid(a90bc001-e897-e897-7439-43FF02000104)
]
coclass FXReverb14 { interface IXAPO; }
[
helpstring("XAPOFX1.5 FXReverb Class (Wine)"),
threading(both),
uuid(a90bc001-e897-e897-7439-43FF02000105)
]
coclass FXReverb15 { interface IXAPO; }

View File

@ -29,6 +29,8 @@
#include "ole2.h" #include "ole2.h"
#include "rpcproxy.h" #include "rpcproxy.h"
#include "xapofx.h"
#include "wine/debug.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(xaudio2); WINE_DEFAULT_DEBUG_CHANNEL(xaudio2);
@ -2507,13 +2509,13 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void **ppv)
TRACE("(%s, %s, %p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); TRACE("(%s, %s, %p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
if IsEqualGUID(rclsid, &CLSID_XAudio20){ if(IsEqualGUID(rclsid, &CLSID_XAudio20)){
factory = make_xaudio2_factory(20); factory = make_xaudio2_factory(20);
}else if IsEqualGUID(rclsid, &CLSID_XAudio21){ }else if(IsEqualGUID(rclsid, &CLSID_XAudio21)){
factory = make_xaudio2_factory(21); factory = make_xaudio2_factory(21);
}else if IsEqualGUID(rclsid, &CLSID_XAudio22){ }else if(IsEqualGUID(rclsid, &CLSID_XAudio22)){
factory = make_xaudio2_factory(22); factory = make_xaudio2_factory(22);
}else if IsEqualGUID(rclsid, &CLSID_XAudio23){ }else if(IsEqualGUID(rclsid, &CLSID_XAudio23)){
factory = make_xaudio2_factory(23); factory = make_xaudio2_factory(23);
}else if(IsEqualGUID(rclsid, &CLSID_XAudio24)){ }else if(IsEqualGUID(rclsid, &CLSID_XAudio24)){
factory = make_xaudio2_factory(24); factory = make_xaudio2_factory(24);
@ -2524,13 +2526,13 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void **ppv)
}else if(IsEqualGUID(rclsid, &CLSID_XAudio2)){ }else if(IsEqualGUID(rclsid, &CLSID_XAudio2)){
factory = make_xaudio2_factory(27); factory = make_xaudio2_factory(27);
}else if IsEqualGUID(rclsid, &CLSID_AudioVolumeMeter20){ }else if(IsEqualGUID(rclsid, &CLSID_AudioVolumeMeter20)){
factory = make_xapo_factory(&CLSID_AudioVolumeMeter, 20); factory = make_xapo_factory(&CLSID_AudioVolumeMeter, 20);
}else if IsEqualGUID(rclsid, &CLSID_AudioVolumeMeter21){ }else if(IsEqualGUID(rclsid, &CLSID_AudioVolumeMeter21)){
factory = make_xapo_factory(&CLSID_AudioVolumeMeter, 21); factory = make_xapo_factory(&CLSID_AudioVolumeMeter, 21);
}else if IsEqualGUID(rclsid, &CLSID_AudioVolumeMeter22){ }else if(IsEqualGUID(rclsid, &CLSID_AudioVolumeMeter22)){
factory = make_xapo_factory(&CLSID_AudioVolumeMeter, 22); factory = make_xapo_factory(&CLSID_AudioVolumeMeter, 22);
}else if IsEqualGUID(rclsid, &CLSID_AudioVolumeMeter23){ }else if(IsEqualGUID(rclsid, &CLSID_AudioVolumeMeter23)){
factory = make_xapo_factory(&CLSID_AudioVolumeMeter, 23); factory = make_xapo_factory(&CLSID_AudioVolumeMeter, 23);
}else if(IsEqualGUID(rclsid, &CLSID_AudioVolumeMeter24)){ }else if(IsEqualGUID(rclsid, &CLSID_AudioVolumeMeter24)){
factory = make_xapo_factory(&CLSID_AudioVolumeMeter, 24); factory = make_xapo_factory(&CLSID_AudioVolumeMeter, 24);
@ -2541,23 +2543,40 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void **ppv)
}else if(IsEqualGUID(rclsid, &CLSID_AudioVolumeMeter)){ }else if(IsEqualGUID(rclsid, &CLSID_AudioVolumeMeter)){
factory = make_xapo_factory(&CLSID_AudioVolumeMeter, 27); factory = make_xapo_factory(&CLSID_AudioVolumeMeter, 27);
}else if IsEqualGUID(rclsid, &CLSID_AudioReverb20){ }else if(IsEqualGUID(rclsid, &CLSID_AudioReverb20)){
factory = make_xapo_factory(&CLSID_AudioReverb, 20); factory = make_xapo_factory(&CLSID_AudioReverb, 20);
}else if IsEqualGUID(rclsid, &CLSID_AudioReverb21){
}else if(IsEqualGUID(rclsid, &CLSID_AudioReverb21) ||
IsEqualGUID(rclsid, &CLSID_WINE_FXReverb10)){
factory = make_xapo_factory(&CLSID_AudioReverb, 21); factory = make_xapo_factory(&CLSID_AudioReverb, 21);
}else if IsEqualGUID(rclsid, &CLSID_AudioReverb22){
}else if(IsEqualGUID(rclsid, &CLSID_AudioReverb22) ||
IsEqualGUID(rclsid, &CLSID_WINE_FXReverb11)){
factory = make_xapo_factory(&CLSID_AudioReverb, 22); factory = make_xapo_factory(&CLSID_AudioReverb, 22);
}else if IsEqualGUID(rclsid, &CLSID_AudioReverb23){
}else if(IsEqualGUID(rclsid, &CLSID_AudioReverb23) ||
IsEqualGUID(rclsid, &CLSID_WINE_FXReverb12)){
factory = make_xapo_factory(&CLSID_AudioReverb, 23); factory = make_xapo_factory(&CLSID_AudioReverb, 23);
}else if(IsEqualGUID(rclsid, &CLSID_AudioReverb24)){
}else if(IsEqualGUID(rclsid, &CLSID_AudioReverb24) ||
IsEqualGUID(rclsid, &CLSID_WINE_FXReverb13)){
factory = make_xapo_factory(&CLSID_AudioReverb, 24); factory = make_xapo_factory(&CLSID_AudioReverb, 24);
}else if(IsEqualGUID(rclsid, &CLSID_AudioReverb25)){ }else if(IsEqualGUID(rclsid, &CLSID_AudioReverb25)){
factory = make_xapo_factory(&CLSID_AudioReverb, 25); factory = make_xapo_factory(&CLSID_AudioReverb, 25);
}else if(IsEqualGUID(rclsid, &CLSID_AudioReverb26)){
}else if(IsEqualGUID(rclsid, &CLSID_AudioReverb26) ||
IsEqualGUID(rclsid, &CLSID_WINE_FXReverb14)){
factory = make_xapo_factory(&CLSID_AudioReverb, 26); factory = make_xapo_factory(&CLSID_AudioReverb, 26);
}else if(IsEqualGUID(rclsid, &CLSID_AudioReverb)){
}else if(IsEqualGUID(rclsid, &CLSID_AudioReverb) ||
IsEqualGUID(rclsid, &CLSID_WINE_FXReverb15)){
factory = make_xapo_factory(&CLSID_AudioReverb, 27); factory = make_xapo_factory(&CLSID_AudioReverb, 27);
}else if(IsEqualGUID(rclsid, &CLSID_WINE_FXReverb28)){
factory = make_xapo_factory(&CLSID_AudioReverb, 28);
} }
if(!factory) return CLASS_E_CLASSNOTAVAILABLE; if(!factory) return CLASS_E_CLASSNOTAVAILABLE;
return IClassFactory_QueryInterface(factory, riid, ppv); return IClassFactory_QueryInterface(factory, riid, ppv);

View File

@ -669,6 +669,7 @@ SRCDIR_INCLUDES = \
wsnwlink.h \ wsnwlink.h \
wtsapi32.h \ wtsapi32.h \
x3daudio.h \ x3daudio.h \
xapofx.h \
xcmc.h \ xcmc.h \
xinput.h \ xinput.h \
xmldom.h \ xmldom.h \

76
include/xapofx.h Normal file
View File

@ -0,0 +1,76 @@
/*
* 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
*/
/* CLSIDs used by CreateFX, but never registered */
#ifndef _XAPOFX_H
#define _XAPOFX_H
/* xapofx 1.0 through 1.5 */
DEFINE_GUID(CLSID_FXEQ27, 0xa90bc001, 0xe897, 0xe897, 0x74, 0x39, 0x43, 0x55, 0x00, 0x00, 0x00, 0x00);
/* xaudio 2.8 */
DEFINE_GUID(CLSID_FXEQ, 0xf5e01117, 0xd6c4, 0x485a, 0xa3, 0xf5, 0x69, 0x51, 0x96, 0xf3, 0xdb, 0xfa);
/* wine internal */
DEFINE_GUID(CLSID_WINE_FXEQ10, 0xa90bc001, 0xe897, 0xe897, 0x74, 0x39, 0x43, 0xFF, 0x00, 0x00, 0x01, 0x00);
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);
DEFINE_GUID(CLSID_WINE_FXEQ15, 0xa90bc001, 0xe897, 0xe897, 0x74, 0x39, 0x43, 0xFF, 0x00, 0x00, 0x01, 0x05);
DEFINE_GUID(CLSID_WINE_FXEQ28, 0xa90bc001, 0xe897, 0xe897, 0x74, 0x39, 0x43, 0xFF, 0x00, 0x00, 0x02, 0x08);
/* xapofx 1.0 through 1.5 */
DEFINE_GUID(CLSID_FXMasteringLimiter27, 0xa90bc001, 0xe897, 0xe897, 0x74, 0x39, 0x43, 0x55, 0x00, 0x00, 0x00, 0x01);
/* xaudio 2.8 */
DEFINE_GUID(CLSID_FXMasteringLimiter, 0xc4137916, 0x2be1, 0x46fd, 0x85, 0x99, 0x44, 0x15, 0x36, 0xf4, 0x98, 0x56);
/* wine internal */
DEFINE_GUID(CLSID_WINE_FXMasteringLimiter10, 0xa90bc001, 0xe897, 0xe897, 0x74, 0x39, 0x43, 0xFF, 0x01, 0x00, 0x01, 0x00);
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);
DEFINE_GUID(CLSID_WINE_FXMasteringLimiter15, 0xa90bc001, 0xe897, 0xe897, 0x74, 0x39, 0x43, 0xFF, 0x01, 0x00, 0x01, 0x05);
DEFINE_GUID(CLSID_WINE_FXMasteringLimiter28, 0xa90bc001, 0xe897, 0xe897, 0x74, 0x39, 0x43, 0xFF, 0x01, 0x00, 0x02, 0x08);
/* xapofx 1.0 through 1.5 */
DEFINE_GUID(CLSID_FXReverb27, 0xa90bc001, 0xe897, 0xe897, 0x74, 0x39, 0x43, 0x55, 0x00, 0x00, 0x00, 0x02);
/* xaudio 2.8 */
DEFINE_GUID(CLSID_FXReverb, 0x7d9aca56, 0xcb68, 0x4807, 0xb6, 0x32, 0xb1, 0x37, 0x35, 0x2e, 0x85, 0x96);
/* wine internal */
DEFINE_GUID(CLSID_WINE_FXReverb10, 0xa90bc001, 0xe897, 0xe897, 0x74, 0x39, 0x43, 0xFF, 0x02, 0x00, 0x01, 0x00);
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);
DEFINE_GUID(CLSID_WINE_FXReverb15, 0xa90bc001, 0xe897, 0xe897, 0x74, 0x39, 0x43, 0xFF, 0x02, 0x00, 0x01, 0x05);
DEFINE_GUID(CLSID_WINE_FXReverb28, 0xa90bc001, 0xe897, 0xe897, 0x74, 0x39, 0x43, 0xFF, 0x02, 0x00, 0x02, 0x08);
/* xapofx 1.0 through 1.5 */
DEFINE_GUID(CLSID_FXEcho27, 0xa90bc001, 0xe897, 0xe897, 0x74, 0x39, 0x43, 0x55, 0x00, 0x00, 0x00, 0x03);
/* xaudio 2.8 */
DEFINE_GUID(CLSID_FXEcho, 0x5039d740, 0xf736, 0x449a, 0x84, 0xd3, 0xa5, 0x62, 0x02, 0x55, 0x7b, 0x87);
/* wine internal */
DEFINE_GUID(CLSID_WINE_FXEcho10, 0xa90bc001, 0xe897, 0xe897, 0x74, 0x39, 0x43, 0xFF, 0x03, 0x00, 0x01, 0x00);
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);
DEFINE_GUID(CLSID_WINE_FXEcho15, 0xa90bc001, 0xe897, 0xe897, 0x74, 0x39, 0x43, 0xFF, 0x03, 0x00, 0x01, 0x05);
DEFINE_GUID(CLSID_WINE_FXEcho28, 0xa90bc001, 0xe897, 0xe897, 0x74, 0x39, 0x43, 0xFF, 0x03, 0x00, 0x02, 0x08);
#endif