From fd3b1a04e70a3ab20c2bcc03ca511f72d9dba94d Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Thu, 19 Sep 2019 11:54:33 +1000 Subject: [PATCH] Added dsdmo-new-dll patchset --- .../dsdmo-new-dll/0001-dsdmo-Added-dll.patch | 164 +++++ ...dsdmo-Add-IDirectSoundFXEcho-support.patch | 592 ++++++++++++++++++ ...dmo-Add-IDirectSoundFXChorus-support.patch | 494 +++++++++++++++ ...Add-IDirectSoundFXCompressor-support.patch | 495 +++++++++++++++ ...Add-IDirectSoundFXDistortion-support.patch | 496 +++++++++++++++ ...mo-Add-IDirectSoundFXFlanger-support.patch | 497 +++++++++++++++ ...dmo-Add-IDirectSoundFXGargle-support.patch | 498 +++++++++++++++ ...mo-Add-IDirectSoundFXParamEq-support.patch | 500 +++++++++++++++ ...dd-IDirectSoundFXWavesReverb-support.patch | 501 +++++++++++++++ ...dd-IDirectSoundFXI3DL2Reverb-support.patch | 537 ++++++++++++++++ ...-IDirectSoundFXEcho-GetAllParameters.patch | 70 +++ ...IDirectSoundFXGargle-GetAllParameter.patch | 67 ++ ...IDirectSoundFXChorus-GetAllParameter.patch | 72 +++ ...IDirectSoundFXFlanger-GetAllParamete.patch | 72 +++ ...IDirectSoundFXDistortion-GetAllParam.patch | 71 +++ ...IDirectSoundFXCompressor-GetAllParam.patch | 71 +++ ...IDirectSoundFXParamEq-GetAllParamete.patch | 68 ++ ...IDirectSoundFXI3DL2Reverb-GetAllPara.patch | 77 +++ ...undBuffer8-GetObjectInPath-loops-for.patch | 111 ++++ ...-IDirectSoundFXEcho-SetAllParameters.patch | 87 +++ ...IDirectSoundFXGargle-SetAllParameter.patch | 80 +++ ...IDirectSoundFXChorus-SetAllParameter.patch | 89 +++ ...IDirectSoundFXFlanger-SetAllParamete.patch | 89 +++ ...IDirectSoundFXDistortion-SetAllParam.patch | 85 +++ ...IDirectSoundFXCompressor-SetAllParam.patch | 85 +++ ...IDirectSoundFXParamEq-SetAllParamete.patch | 80 +++ ...IDirectSoundFXI3DL2Reverb-SetAllPara.patch | 94 +++ patches/dsdmo-new-dll/defination | 3 + patches/patchinstall.sh | 71 +++ 29 files changed, 6216 insertions(+) create mode 100644 patches/dsdmo-new-dll/0001-dsdmo-Added-dll.patch create mode 100644 patches/dsdmo-new-dll/0002-dsdmo-Add-IDirectSoundFXEcho-support.patch create mode 100644 patches/dsdmo-new-dll/0003-dsdmo-Add-IDirectSoundFXChorus-support.patch create mode 100644 patches/dsdmo-new-dll/0004-dsdmo-Add-IDirectSoundFXCompressor-support.patch create mode 100644 patches/dsdmo-new-dll/0005-dsdmo-Add-IDirectSoundFXDistortion-support.patch create mode 100644 patches/dsdmo-new-dll/0006-dsdmo-Add-IDirectSoundFXFlanger-support.patch create mode 100644 patches/dsdmo-new-dll/0007-dsdmo-Add-IDirectSoundFXGargle-support.patch create mode 100644 patches/dsdmo-new-dll/0008-dsdmo-Add-IDirectSoundFXParamEq-support.patch create mode 100644 patches/dsdmo-new-dll/0009-dsdmo-Add-IDirectSoundFXWavesReverb-support.patch create mode 100644 patches/dsdmo-new-dll/0010-dsdmo-Add-IDirectSoundFXI3DL2Reverb-support.patch create mode 100644 patches/dsdmo-new-dll/0011-dsdmo-Implement-IDirectSoundFXEcho-GetAllParameters.patch create mode 100644 patches/dsdmo-new-dll/0012-dsdmo-Implement-IDirectSoundFXGargle-GetAllParameter.patch create mode 100644 patches/dsdmo-new-dll/0013-dsdmo-Implemnet-IDirectSoundFXChorus-GetAllParameter.patch create mode 100644 patches/dsdmo-new-dll/0014-dsdmo-Implemnet-IDirectSoundFXFlanger-GetAllParamete.patch create mode 100644 patches/dsdmo-new-dll/0015-dsdmo-Implemnet-IDirectSoundFXDistortion-GetAllParam.patch create mode 100644 patches/dsdmo-new-dll/0016-dsdmo-Implemnet-IDirectSoundFXCompressor-GetAllParam.patch create mode 100644 patches/dsdmo-new-dll/0017-dsdmo-Implemnet-IDirectSoundFXParamEq-GetAllParamete.patch create mode 100644 patches/dsdmo-new-dll/0018-dsdmo-Implemnet-IDirectSoundFXI3DL2Reverb-GetAllPara.patch create mode 100644 patches/dsdmo-new-dll/0019-dsound-IDirectSoundBuffer8-GetObjectInPath-loops-for.patch create mode 100644 patches/dsdmo-new-dll/0020-dsdmo-Implement-IDirectSoundFXEcho-SetAllParameters.patch create mode 100644 patches/dsdmo-new-dll/0021-dsdmo-Implement-IDirectSoundFXGargle-SetAllParameter.patch create mode 100644 patches/dsdmo-new-dll/0022-dsdmo-Implement-IDirectSoundFXChorus-SetAllParameter.patch create mode 100644 patches/dsdmo-new-dll/0023-dsdmo-Implement-IDirectSoundFXFlanger-SetAllParamete.patch create mode 100644 patches/dsdmo-new-dll/0024-dsdmo-Implement-IDirectSoundFXDistortion-SetAllParam.patch create mode 100644 patches/dsdmo-new-dll/0025-dsdmo-Implement-IDirectSoundFXCompressor-SetAllParam.patch create mode 100644 patches/dsdmo-new-dll/0026-dsdmo-Implement-IDirectSoundFXParamEq-SetAllParamete.patch create mode 100644 patches/dsdmo-new-dll/0027-dsdmo-Implement-IDirectSoundFXI3DL2Reverb-SetAllPara.patch create mode 100644 patches/dsdmo-new-dll/defination diff --git a/patches/dsdmo-new-dll/0001-dsdmo-Added-dll.patch b/patches/dsdmo-new-dll/0001-dsdmo-Added-dll.patch new file mode 100644 index 00000000..7950ef46 --- /dev/null +++ b/patches/dsdmo-new-dll/0001-dsdmo-Added-dll.patch @@ -0,0 +1,164 @@ +From 4df02b9d23b868cf4e481d6461715f21d1b0f7e9 Mon Sep 17 00:00:00 2001 +From: Alistair Leslie-Hughes +Date: Wed, 14 Aug 2019 12:17:08 +1000 +Subject: [PATCH 01/27] dsdmo: Added dll + +--- + configure | 2 + + configure.ac | 1 + + dlls/dsdmo/Makefile.in | 6 +++ + dlls/dsdmo/dsdmo.spec | 4 ++ + dlls/dsdmo/main.c | 85 ++++++++++++++++++++++++++++++++++++++++++ + 5 files changed, 98 insertions(+) + create mode 100644 dlls/dsdmo/Makefile.in + create mode 100644 dlls/dsdmo/dsdmo.spec + create mode 100644 dlls/dsdmo/main.c + +diff --git a/configure b/configure +index 5ed6ed6c26..bea103fc37 100755 +--- a/configure ++++ b/configure +@@ -1257,6 +1257,7 @@ enable_dpnlobby + enable_dpvoice + enable_dpwsockx + enable_drmclien ++enable_dsdmo + enable_dsound + enable_dsquery + enable_dssenh +@@ -20364,6 +20365,7 @@ wine_fn_config_makefile dlls/dpvoice enable_dpvoice + wine_fn_config_makefile dlls/dpvoice/tests enable_tests + wine_fn_config_makefile dlls/dpwsockx enable_dpwsockx + wine_fn_config_makefile dlls/drmclien enable_drmclien ++wine_fn_config_makefile dlls/dsdmo enable_dsdmo + wine_fn_config_makefile dlls/dsound enable_dsound + wine_fn_config_makefile dlls/dsound/tests enable_tests + wine_fn_config_makefile dlls/dsquery enable_dsquery +diff --git a/configure.ac b/configure.ac +index 1c912a30a2..27547ae3c7 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -3232,6 +3232,7 @@ WINE_CONFIG_MAKEFILE(dlls/dpvoice) + WINE_CONFIG_MAKEFILE(dlls/dpvoice/tests) + WINE_CONFIG_MAKEFILE(dlls/dpwsockx) + WINE_CONFIG_MAKEFILE(dlls/drmclien) ++WINE_CONFIG_MAKEFILE(dlls/dsdmo) + WINE_CONFIG_MAKEFILE(dlls/dsound) + WINE_CONFIG_MAKEFILE(dlls/dsound/tests) + WINE_CONFIG_MAKEFILE(dlls/dsquery) +diff --git a/dlls/dsdmo/Makefile.in b/dlls/dsdmo/Makefile.in +new file mode 100644 +index 0000000000..99816ae0c0 +--- /dev/null ++++ b/dlls/dsdmo/Makefile.in +@@ -0,0 +1,6 @@ ++MODULE = dsdmo.dll ++ ++EXTRADLLFLAGS = -mno-cygwin ++ ++C_SRCS = \ ++ main.c +diff --git a/dlls/dsdmo/dsdmo.spec b/dlls/dsdmo/dsdmo.spec +new file mode 100644 +index 0000000000..b16365d0c9 +--- /dev/null ++++ b/dlls/dsdmo/dsdmo.spec +@@ -0,0 +1,4 @@ ++@ stdcall -private DllCanUnloadNow() ++@ stdcall -private DllGetClassObject(ptr ptr ptr) ++@ stdcall -private DllRegisterServer() ++@ stdcall -private DllUnregisterServer() +diff --git a/dlls/dsdmo/main.c b/dlls/dsdmo/main.c +new file mode 100644 +index 0000000000..61a67f44d8 +--- /dev/null ++++ b/dlls/dsdmo/main.c +@@ -0,0 +1,85 @@ ++/* ++ * Copyright 2019 Alistair Leslie-Hughes ++ * ++ * 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 ++ */ ++#define COBJMACROS ++ ++#include "ole2.h" ++#include "rpcproxy.h" ++ ++#include "wine/debug.h" ++ ++WINE_DEFAULT_DEBUG_CHANNEL(dsdmo); ++ ++static HINSTANCE dsdmo_instance; ++ ++/****************************************************************** ++ * DllMain ++ */ ++BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv) ++{ ++ TRACE("(%p %d %p)\n", hInstDLL, fdwReason, lpv); ++ ++ switch(fdwReason) ++ { ++ case DLL_WINE_PREATTACH: ++ return FALSE; /* prefer native version */ ++ case DLL_PROCESS_ATTACH: ++ dsdmo_instance = hInstDLL; ++ DisableThreadLibraryCalls(dsdmo_instance); ++ break; ++ case DLL_PROCESS_DETACH: ++ if (lpv) break; ++ break; ++ } ++ ++ return TRUE; ++} ++ ++/*********************************************************************** ++ * DllGetClassObject ++ */ ++HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) ++{ ++ FIXME("%s %s %p\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); ++ return CLASS_E_CLASSNOTAVAILABLE; ++} ++ ++/*********************************************************************** ++ * DllCanUnloadNow ++ */ ++HRESULT WINAPI DllCanUnloadNow(void) ++{ ++ return S_FALSE; ++} ++ ++/*********************************************************************** ++ * DllRegisterServer ++ */ ++HRESULT WINAPI DllRegisterServer(void) ++{ ++ TRACE("()\n"); ++ return __wine_register_resources(dsdmo_instance); ++} ++ ++/*********************************************************************** ++ * DllUnregisterServer ++ */ ++HRESULT WINAPI DllUnregisterServer(void) ++{ ++ TRACE("()\n"); ++ return __wine_unregister_resources(dsdmo_instance); ++} +-- +2.17.1 + diff --git a/patches/dsdmo-new-dll/0002-dsdmo-Add-IDirectSoundFXEcho-support.patch b/patches/dsdmo-new-dll/0002-dsdmo-Add-IDirectSoundFXEcho-support.patch new file mode 100644 index 00000000..5429a605 --- /dev/null +++ b/patches/dsdmo-new-dll/0002-dsdmo-Add-IDirectSoundFXEcho-support.patch @@ -0,0 +1,592 @@ +From 57c73f606deafc66230b16b5f2bea4dda86d85e0 Mon Sep 17 00:00:00 2001 +From: Alistair Leslie-Hughes +Date: Wed, 14 Aug 2019 14:23:21 +1000 +Subject: [PATCH 02/27] dsdmo: Add IDirectSoundFXEcho support + +--- + dlls/dsdmo/Makefile.in | 5 +- + dlls/dsdmo/dsdmo_classes.idl | 28 +++ + dlls/dsdmo/dsdmo_private.h | 32 +++ + dlls/dsdmo/echo.c | 397 +++++++++++++++++++++++++++++++++++ + dlls/dsdmo/main.c | 57 ++++- + 5 files changed, 517 insertions(+), 2 deletions(-) + create mode 100644 dlls/dsdmo/dsdmo_classes.idl + create mode 100644 dlls/dsdmo/dsdmo_private.h + create mode 100644 dlls/dsdmo/echo.c + +diff --git a/dlls/dsdmo/Makefile.in b/dlls/dsdmo/Makefile.in +index 99816ae0c0..cb4f8f8a4b 100644 +--- a/dlls/dsdmo/Makefile.in ++++ b/dlls/dsdmo/Makefile.in +@@ -1,6 +1,9 @@ + MODULE = dsdmo.dll +- ++IMPORTS = uuid + EXTRADLLFLAGS = -mno-cygwin + + C_SRCS = \ ++ echo.c \ + main.c ++ ++IDL_SRCS = dsdmo_classes.idl +diff --git a/dlls/dsdmo/dsdmo_classes.idl b/dlls/dsdmo/dsdmo_classes.idl +new file mode 100644 +index 0000000000..649db8f61b +--- /dev/null ++++ b/dlls/dsdmo/dsdmo_classes.idl +@@ -0,0 +1,28 @@ ++/* ++ * Copyright 2019 Alistair Leslie-Hughes ++ * ++ * 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 ++ ++[ ++ uuid(ef3e932c-d40b-4f51-8ccf-3f98f1b29d5d), ++ threading(both), ++ progid("Microsoft.DirectSoundEchoDMO.1"), ++ vi_progid("Microsoft.DirectSoundEchoDMO") ++] ++coclass DirectSoundEchoDMO ++{ ++} +diff --git a/dlls/dsdmo/dsdmo_private.h b/dlls/dsdmo/dsdmo_private.h +new file mode 100644 +index 0000000000..4abe5a9f60 +--- /dev/null ++++ b/dlls/dsdmo/dsdmo_private.h +@@ -0,0 +1,32 @@ ++/* ++ * Copyright 2019 Alistair Leslie-Hughes ++ * ++ * 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 ++ */ ++#ifndef WINE_DSDMO_PRIVATE ++#define WINE_DSDMO_PRIVATE ++ ++#include "windows.h" ++#include "mmsystem.h" ++#include "mediaobj.h" ++ ++#include "wine/heap.h" ++#include "wine/debug.h" ++ ++#include "dsound.h" ++ ++extern HRESULT WINAPI EchoFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) DECLSPEC_HIDDEN; ++ ++#endif +diff --git a/dlls/dsdmo/echo.c b/dlls/dsdmo/echo.c +new file mode 100644 +index 0000000000..3e8b0be115 +--- /dev/null ++++ b/dlls/dsdmo/echo.c +@@ -0,0 +1,397 @@ ++/* ++ * Copyright 2019 Alistair Leslie-Hughes ++ * ++ * 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 ++ */ ++#define COBJMACROS ++ ++#include "dsdmo_private.h" ++ ++WINE_DEFAULT_DEBUG_CHANNEL(dsdmo); ++ ++struct dmo_echofx ++{ ++ IDirectSoundFXEcho IDirectSoundFXEcho_iface; ++ IMediaObject IMediaObject_iface; ++ IMediaObjectInPlace IMediaObjectInPlace_iface; ++ LONG ref; ++}; ++ ++static inline struct dmo_echofx *impl_from_IDirectSoundFXEcho(IDirectSoundFXEcho *iface) ++{ ++ return CONTAINING_RECORD(iface, struct dmo_echofx, IDirectSoundFXEcho_iface); ++} ++ ++static inline struct dmo_echofx *impl_from_IMediaObject(IMediaObject *iface) ++{ ++ return CONTAINING_RECORD(iface, struct dmo_echofx, IMediaObject_iface); ++} ++ ++static inline struct dmo_echofx *impl_from_IMediaObjectInPlace(IMediaObjectInPlace *iface) ++{ ++ return CONTAINING_RECORD(iface, struct dmo_echofx, IMediaObjectInPlace_iface); ++} ++ ++static HRESULT WINAPI echo_mediaobj_QueryInterface(IMediaObject *iface, REFIID riid, void **obj) ++{ ++ struct dmo_echofx *This = impl_from_IMediaObject(iface); ++ return IDirectSoundFXEcho_QueryInterface(&This->IDirectSoundFXEcho_iface, riid, obj); ++} ++ ++static ULONG WINAPI echo_mediaobj_AddRef(IMediaObject *iface) ++{ ++ struct dmo_echofx *This = impl_from_IMediaObject(iface); ++ return IDirectSoundFXEcho_AddRef(&This->IDirectSoundFXEcho_iface); ++} ++ ++static ULONG WINAPI echo_mediaobj_Release(IMediaObject *iface) ++{ ++ struct dmo_echofx *This = impl_from_IMediaObject(iface); ++ return IDirectSoundFXEcho_Release(&This->IDirectSoundFXEcho_iface); ++} ++ ++static HRESULT WINAPI echo_mediaobj_GetStreamCount(IMediaObject *iface, DWORD *inputs, DWORD *outputs) ++{ ++ struct dmo_echofx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %p, %p\n", This, inputs, outputs); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI echo_mediaobj_GetInputStreamInfo(IMediaObject *iface, DWORD index, DWORD *flags) ++{ ++ struct dmo_echofx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p\n", This, index, flags); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI echo_mediaobj_GetOutputStreamInfo(IMediaObject *iface, DWORD index, DWORD *flags) ++{ ++ struct dmo_echofx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p\n", This, index, flags); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI echo_mediaobj_GetInputType(IMediaObject *iface, DWORD index, DWORD type, DMO_MEDIA_TYPE *pmt) ++{ ++ struct dmo_echofx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %d, %p\n", This, index, type, pmt); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI echo_mediaobj_GetOutputType(IMediaObject *iface, DWORD index, DWORD type, DMO_MEDIA_TYPE *pmt) ++{ ++ struct dmo_echofx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %d, %p\n", This, index, type, pmt); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI echo_mediaobj_SetInputType(IMediaObject *iface, DWORD index, const DMO_MEDIA_TYPE *pmt, DWORD flags) ++{ ++ struct dmo_echofx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p, %x\n", This, index, pmt, flags); ++ return S_OK; ++} ++ ++static HRESULT WINAPI echo_mediaobj_SetOutputType(IMediaObject *iface, DWORD index, const DMO_MEDIA_TYPE *pmt, DWORD flags) ++{ ++ struct dmo_echofx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p, %x\n", This, index, pmt, flags); ++ return S_OK; ++} ++ ++static HRESULT WINAPI echo_mediaobj_GetInputCurrentType(IMediaObject *iface, DWORD index, DMO_MEDIA_TYPE *pmt) ++{ ++ struct dmo_echofx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p\n", This, index, pmt); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI echo_mediaobj_GetOutputCurrentType(IMediaObject *iface, DWORD index, DMO_MEDIA_TYPE *pmt) ++{ ++ struct dmo_echofx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p\n", This, index, pmt); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI echo_mediaobj_GetInputSizeInfo(IMediaObject *iface, DWORD index, DWORD *size, DWORD *ahead, DWORD *alignment) ++{ ++ struct dmo_echofx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p, %p, %p\n", This, index, size, ahead, alignment); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI echo_mediaobj_GetOutputSizeInfo(IMediaObject *iface, DWORD index, DWORD *size, DWORD *alignment) ++{ ++ struct dmo_echofx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p, %p\n", This, index, size, alignment); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI echo_mediaobj_GetInputMaxLatency(IMediaObject *iface, DWORD index, REFERENCE_TIME *latency) ++{ ++ struct dmo_echofx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p\n", This, index, latency); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI echo_mediaobj_SetInputMaxLatency(IMediaObject *iface, DWORD index, REFERENCE_TIME latency) ++{ ++ struct dmo_echofx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %s\n", This, index, wine_dbgstr_longlong(latency)); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI echo_mediaobj_Flush(IMediaObject *iface) ++{ ++ struct dmo_echofx *This = impl_from_IMediaObject(iface); ++ FIXME("%p\n", This); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI echo_mediaobj_Discontinuity(IMediaObject *iface, DWORD index) ++{ ++ struct dmo_echofx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d\n", This, index); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI echo_mediaobj_AllocateStreamingResources(IMediaObject *iface) ++{ ++ struct dmo_echofx *This = impl_from_IMediaObject(iface); ++ FIXME("%p\n", This); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI echo_mediaobj_FreeStreamingResources(IMediaObject *iface) ++{ ++ struct dmo_echofx *This = impl_from_IMediaObject(iface); ++ FIXME("%p\n", This); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI echo_mediaobj_GetInputStatus(IMediaObject *iface, DWORD index, DWORD *flags) ++{ ++ struct dmo_echofx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p\n", This, index, flags); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI echo_mediaobj_ProcessInput(IMediaObject *iface, DWORD index, IMediaBuffer *buffer, ++ DWORD flags, REFERENCE_TIME timestamp, REFERENCE_TIME length) ++{ ++ struct dmo_echofx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p, %x, %s, %s\n", This, index, buffer, flags, wine_dbgstr_longlong(timestamp), wine_dbgstr_longlong(length)); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI echo_mediaobj_ProcessOutput(IMediaObject *iface, DWORD flags, DWORD count, ++ DMO_OUTPUT_DATA_BUFFER *buffers, DWORD *status) ++{ ++ struct dmo_echofx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %x, %d, %p, %p\n", This, flags, count, buffers, status); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI echo_mediaobj_Lock(IMediaObject *iface, LONG lock) ++{ ++ struct dmo_echofx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d\n", This, lock); ++ return E_NOTIMPL; ++} ++ ++static const IMediaObjectVtbl echo_mediaobjectVtbl = ++{ ++ echo_mediaobj_QueryInterface, ++ echo_mediaobj_AddRef, ++ echo_mediaobj_Release, ++ echo_mediaobj_GetStreamCount, ++ echo_mediaobj_GetInputStreamInfo, ++ echo_mediaobj_GetOutputStreamInfo, ++ echo_mediaobj_GetInputType, ++ echo_mediaobj_GetOutputType, ++ echo_mediaobj_SetInputType, ++ echo_mediaobj_SetOutputType, ++ echo_mediaobj_GetInputCurrentType, ++ echo_mediaobj_GetOutputCurrentType, ++ echo_mediaobj_GetInputSizeInfo, ++ echo_mediaobj_GetOutputSizeInfo, ++ echo_mediaobj_GetInputMaxLatency, ++ echo_mediaobj_SetInputMaxLatency, ++ echo_mediaobj_Flush, ++ echo_mediaobj_Discontinuity, ++ echo_mediaobj_AllocateStreamingResources, ++ echo_mediaobj_FreeStreamingResources, ++ echo_mediaobj_GetInputStatus, ++ echo_mediaobj_ProcessInput, ++ echo_mediaobj_ProcessOutput, ++ echo_mediaobj_Lock ++}; ++ ++static HRESULT WINAPI echo_mediainplace_QueryInterface(IMediaObjectInPlace *iface, REFIID riid, void **obj) ++{ ++ struct dmo_echofx *This = impl_from_IMediaObjectInPlace(iface); ++ return IDirectSoundFXEcho_QueryInterface(&This->IDirectSoundFXEcho_iface, riid, obj); ++} ++ ++static ULONG WINAPI echo_mediainplace_AddRef(IMediaObjectInPlace *iface) ++{ ++ struct dmo_echofx *This = impl_from_IMediaObjectInPlace(iface); ++ return IDirectSoundFXEcho_AddRef(&This->IDirectSoundFXEcho_iface); ++} ++ ++static ULONG WINAPI echo_mediainplace_Release(IMediaObjectInPlace *iface) ++{ ++ struct dmo_echofx *This = impl_from_IMediaObjectInPlace(iface); ++ return IDirectSoundFXEcho_Release(&This->IDirectSoundFXEcho_iface); ++} ++ ++static HRESULT WINAPI echo_mediainplace_Process(IMediaObjectInPlace *iface, ULONG size, BYTE *data, REFERENCE_TIME start, DWORD flags) ++{ ++ struct dmo_echofx *This = impl_from_IMediaObjectInPlace(iface); ++ static BOOL once = 0; ++ if(!once++) ++ FIXME("%p, %d, %p, %s, %x\n", This, size, data, wine_dbgstr_longlong(start), flags); ++ else ++ TRACE("%p, %d, %p, %s, %x\n", This, size, data, wine_dbgstr_longlong(start), flags); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI echo_mediainplace_Clone(IMediaObjectInPlace *iface, IMediaObjectInPlace **object) ++{ ++ struct dmo_echofx *This = impl_from_IMediaObjectInPlace(iface); ++ FIXME("%p, %p\n", This, object); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI echo_mediainplace_GetLatency(IMediaObjectInPlace *iface, REFERENCE_TIME *latency) ++{ ++ struct dmo_echofx *This = impl_from_IMediaObjectInPlace(iface); ++ FIXME("%p, %p\n", This, latency); ++ return E_NOTIMPL; ++} ++ ++static const IMediaObjectInPlaceVtbl echo_mediainplaceVtbl = ++{ ++ echo_mediainplace_QueryInterface, ++ echo_mediainplace_AddRef, ++ echo_mediainplace_Release, ++ echo_mediainplace_Process, ++ echo_mediainplace_Clone, ++ echo_mediainplace_GetLatency ++}; ++ ++static HRESULT WINAPI echofx_QueryInterface(IDirectSoundFXEcho *iface, REFIID riid, void **ppv) ++{ ++ struct dmo_echofx *This = impl_from_IDirectSoundFXEcho(iface); ++ ++ TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv); ++ ++ if (IsEqualGUID(riid, &IID_IUnknown) || ++ IsEqualGUID(riid, &IID_IDirectSoundFXEcho)) ++ { ++ *ppv = &This->IDirectSoundFXEcho_iface; ++ } ++ else if(IsEqualGUID(riid, &IID_IMediaObject)) ++ { ++ *ppv = &This->IMediaObject_iface; ++ } ++ else if(IsEqualGUID(riid, &IID_IMediaObjectInPlace)) ++ { ++ *ppv = &This->IMediaObjectInPlace_iface; ++ } ++ ++ if(!*ppv) ++ { ++ FIXME("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppv); ++ return E_NOINTERFACE; ++ } ++ ++ IUnknown_AddRef((IUnknown*)*ppv); ++ ++ return S_OK; ++} ++ ++static ULONG WINAPI echofx_AddRef(IDirectSoundFXEcho *iface) ++{ ++ struct dmo_echofx *This = impl_from_IDirectSoundFXEcho(iface); ++ ULONG ref = InterlockedIncrement(&This->ref); ++ ++ TRACE("(%p) ref=%u\n", This, ref); ++ ++ return ref; ++} ++ ++static ULONG WINAPI echofx_Release(IDirectSoundFXEcho *iface) ++{ ++ struct dmo_echofx *This = impl_from_IDirectSoundFXEcho(iface); ++ ULONG ref = InterlockedDecrement(&This->ref); ++ ++ TRACE("(%p) ref=%u\n", This, ref); ++ ++ if (!ref) ++ { ++ heap_free(This); ++ } ++ return ref; ++} ++ ++static HRESULT WINAPI echofx_SetAllParameters(IDirectSoundFXEcho *iface, const DSFXEcho *echo) ++{ ++ struct dmo_echofx *This = impl_from_IDirectSoundFXEcho(iface); ++ FIXME("(%p) %p\n", This, echo); ++ ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI echofx_GetAllParameters(IDirectSoundFXEcho *iface, DSFXEcho *echo) ++{ ++ struct dmo_echofx *This = impl_from_IDirectSoundFXEcho(iface); ++ FIXME("(%p) %p\n", This, echo); ++ ++ return E_NOTIMPL; ++} ++ ++static const struct IDirectSoundFXEchoVtbl echofxVtbl = ++{ ++ echofx_QueryInterface, ++ echofx_AddRef, ++ echofx_Release, ++ echofx_SetAllParameters, ++ echofx_GetAllParameters ++}; ++ ++HRESULT WINAPI EchoFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) ++{ ++ struct dmo_echofx *object; ++ HRESULT ret; ++ ++ TRACE("(%p, %s, %p)\n", outer, debugstr_guid(riid), ppv); ++ ++ *ppv = NULL; ++ ++ object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); ++ if (!object) ++ return E_OUTOFMEMORY; ++ ++ object->IDirectSoundFXEcho_iface.lpVtbl = &echofxVtbl; ++ object->IMediaObject_iface.lpVtbl = &echo_mediaobjectVtbl; ++ object->IMediaObjectInPlace_iface.lpVtbl = &echo_mediainplaceVtbl; ++ object->ref = 1; ++ ++ ret = echofx_QueryInterface(&object->IDirectSoundFXEcho_iface, riid, ppv); ++ echofx_Release(&object->IDirectSoundFXEcho_iface); ++ ++ return ret; ++} +diff --git a/dlls/dsdmo/main.c b/dlls/dsdmo/main.c +index 61a67f44d8..d751f90dc9 100644 +--- a/dlls/dsdmo/main.c ++++ b/dlls/dsdmo/main.c +@@ -17,10 +17,12 @@ + */ + #define COBJMACROS + ++#include "windows.h" + #include "ole2.h" + #include "rpcproxy.h" + +-#include "wine/debug.h" ++#include "initguid.h" ++#include "dsdmo_private.h" + + WINE_DEFAULT_DEBUG_CHANNEL(dsdmo); + +@@ -49,11 +51,64 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv) + return TRUE; + } + ++static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID riid, void **ppv) ++{ ++ *ppv = NULL; ++ ++ if(IsEqualGUID(&IID_IUnknown, riid) || IsEqualGUID(&IID_IClassFactory, riid)) { ++ *ppv = iface; ++ } ++ ++ if(*ppv) { ++ IUnknown_AddRef((IUnknown*)*ppv); ++ return S_OK; ++ } ++ ++ WARN("(%p)->(%s %p)\n", iface, debugstr_guid(riid), ppv); ++ return E_NOINTERFACE; ++} ++ ++static ULONG WINAPI ClassFactory_AddRef(IClassFactory *iface) ++{ ++ TRACE("(%p)\n", iface); ++ return 2; ++} ++ ++static ULONG WINAPI ClassFactory_Release(IClassFactory *iface) ++{ ++ TRACE("(%p)\n", iface); ++ return 1; ++} ++ ++static HRESULT WINAPI ClassFactory_LockServer(IClassFactory *iface, BOOL fLock) ++{ ++ TRACE("(%p)->(%x)\n", iface, fLock); ++ return S_OK; ++} ++ ++static const IClassFactoryVtbl EchoFactoryVtbl = { ++ ClassFactory_QueryInterface, ++ ClassFactory_AddRef, ++ ClassFactory_Release, ++ EchoFactory_CreateInstance, ++ ClassFactory_LockServer ++}; ++ ++static IClassFactory echofx_factory = { &EchoFactoryVtbl }; ++ + /*********************************************************************** + * DllGetClassObject + */ + HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) + { ++ TRACE("%s %s %p\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); ++ ++ if(IsEqualGUID(&GUID_DSFX_STANDARD_ECHO, rclsid)) ++ { ++ TRACE("GUID_DSFX_STANDARD_ECHO\n"); ++ return IClassFactory_QueryInterface(&echofx_factory, riid, ppv); ++ } ++ + FIXME("%s %s %p\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); + return CLASS_E_CLASSNOTAVAILABLE; + } +-- +2.17.1 + diff --git a/patches/dsdmo-new-dll/0003-dsdmo-Add-IDirectSoundFXChorus-support.patch b/patches/dsdmo-new-dll/0003-dsdmo-Add-IDirectSoundFXChorus-support.patch new file mode 100644 index 00000000..e88f37c0 --- /dev/null +++ b/patches/dsdmo-new-dll/0003-dsdmo-Add-IDirectSoundFXChorus-support.patch @@ -0,0 +1,494 @@ +From 6233bb9da6cf391db945440ed68f089b31b65e04 Mon Sep 17 00:00:00 2001 +From: Alistair Leslie-Hughes +Date: Sat, 24 Aug 2019 18:23:38 +1000 +Subject: [PATCH 03/27] dsdmo: Add IDirectSoundFXChorus support + +--- + dlls/dsdmo/Makefile.in | 1 + + dlls/dsdmo/chorus.c | 397 +++++++++++++++++++++++++++++++++++ + dlls/dsdmo/dsdmo_classes.idl | 10 + + dlls/dsdmo/dsdmo_private.h | 1 + + dlls/dsdmo/main.c | 14 ++ + 5 files changed, 423 insertions(+) + create mode 100644 dlls/dsdmo/chorus.c + +diff --git a/dlls/dsdmo/Makefile.in b/dlls/dsdmo/Makefile.in +index cb4f8f8a4b..34d0e89bf1 100644 +--- a/dlls/dsdmo/Makefile.in ++++ b/dlls/dsdmo/Makefile.in +@@ -3,6 +3,7 @@ IMPORTS = uuid + EXTRADLLFLAGS = -mno-cygwin + + C_SRCS = \ ++ chorus.c \ + echo.c \ + main.c + +diff --git a/dlls/dsdmo/chorus.c b/dlls/dsdmo/chorus.c +new file mode 100644 +index 0000000000..6d4076bcba +--- /dev/null ++++ b/dlls/dsdmo/chorus.c +@@ -0,0 +1,397 @@ ++/* ++ * Copyright 2019 Alistair Leslie-Hughes ++ * ++ * 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 ++ */ ++#define COBJMACROS ++ ++#include "dsdmo_private.h" ++ ++WINE_DEFAULT_DEBUG_CHANNEL(dsdmo); ++ ++struct dmo_chorusfx ++{ ++ IDirectSoundFXChorus IDirectSoundFXChorus_iface; ++ IMediaObject IMediaObject_iface; ++ IMediaObjectInPlace IMediaObjectInPlace_iface; ++ LONG ref; ++}; ++ ++static inline struct dmo_chorusfx *impl_from_IDirectSoundFXChorus(IDirectSoundFXChorus *iface) ++{ ++ return CONTAINING_RECORD(iface, struct dmo_chorusfx, IDirectSoundFXChorus_iface); ++} ++ ++static inline struct dmo_chorusfx *impl_from_IMediaObject(IMediaObject *iface) ++{ ++ return CONTAINING_RECORD(iface, struct dmo_chorusfx, IMediaObject_iface); ++} ++ ++static inline struct dmo_chorusfx *impl_from_IMediaObjectInPlace(IMediaObjectInPlace *iface) ++{ ++ return CONTAINING_RECORD(iface, struct dmo_chorusfx, IMediaObjectInPlace_iface); ++} ++ ++static HRESULT WINAPI chorus_mediaobj_QueryInterface(IMediaObject *iface, REFIID riid, void **obj) ++{ ++ struct dmo_chorusfx *This = impl_from_IMediaObject(iface); ++ return IDirectSoundFXChorus_QueryInterface(&This->IDirectSoundFXChorus_iface, riid, obj); ++} ++ ++static ULONG WINAPI chorus_mediaobj_AddRef(IMediaObject *iface) ++{ ++ struct dmo_chorusfx *This = impl_from_IMediaObject(iface); ++ return IDirectSoundFXChorus_AddRef(&This->IDirectSoundFXChorus_iface); ++} ++ ++static ULONG WINAPI chorus_mediaobj_Release(IMediaObject *iface) ++{ ++ struct dmo_chorusfx *This = impl_from_IMediaObject(iface); ++ return IDirectSoundFXChorus_Release(&This->IDirectSoundFXChorus_iface); ++} ++ ++static HRESULT WINAPI chorus_mediaobj_GetStreamCount(IMediaObject *iface, DWORD *inputs, DWORD *outputs) ++{ ++ struct dmo_chorusfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %p, %p\n", This, inputs, outputs); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI chorus_mediaobj_GetInputStreamInfo(IMediaObject *iface, DWORD index, DWORD *flags) ++{ ++ struct dmo_chorusfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p\n", This, index, flags); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI chorus_mediaobj_GetOutputStreamInfo(IMediaObject *iface, DWORD index, DWORD *flags) ++{ ++ struct dmo_chorusfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p\n", This, index, flags); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI chorus_mediaobj_GetInputType(IMediaObject *iface, DWORD index, DWORD type, DMO_MEDIA_TYPE *pmt) ++{ ++ struct dmo_chorusfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %d, %p\n", This, index, type, pmt); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI chorus_mediaobj_GetOutputType(IMediaObject *iface, DWORD index, DWORD type, DMO_MEDIA_TYPE *pmt) ++{ ++ struct dmo_chorusfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %d, %p\n", This, index, type, pmt); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI chorus_mediaobj_SetInputType(IMediaObject *iface, DWORD index, const DMO_MEDIA_TYPE *pmt, DWORD flags) ++{ ++ struct dmo_chorusfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p, %x\n", This, index, pmt, flags); ++ return S_OK; ++} ++ ++static HRESULT WINAPI chorus_mediaobj_SetOutputType(IMediaObject *iface, DWORD index, const DMO_MEDIA_TYPE *pmt, DWORD flags) ++{ ++ struct dmo_chorusfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p, %x\n", This, index, pmt, flags); ++ return S_OK; ++} ++ ++static HRESULT WINAPI chorus_mediaobj_GetInputCurrentType(IMediaObject *iface, DWORD index, DMO_MEDIA_TYPE *pmt) ++{ ++ struct dmo_chorusfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p\n", This, index, pmt); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI chorus_mediaobj_GetOutputCurrentType(IMediaObject *iface, DWORD index, DMO_MEDIA_TYPE *pmt) ++{ ++ struct dmo_chorusfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p\n", This, index, pmt); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI chorus_mediaobj_GetInputSizeInfo(IMediaObject *iface, DWORD index, DWORD *size, DWORD *ahead, DWORD *alignment) ++{ ++ struct dmo_chorusfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p, %p, %p\n", This, index, size, ahead, alignment); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI chorus_mediaobj_GetOutputSizeInfo(IMediaObject *iface, DWORD index, DWORD *size, DWORD *alignment) ++{ ++ struct dmo_chorusfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p, %p\n", This, index, size, alignment); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI chorus_mediaobj_GetInputMaxLatency(IMediaObject *iface, DWORD index, REFERENCE_TIME *latency) ++{ ++ struct dmo_chorusfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p\n", This, index, latency); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI chorus_mediaobj_SetInputMaxLatency(IMediaObject *iface, DWORD index, REFERENCE_TIME latency) ++{ ++ struct dmo_chorusfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %s\n", This, index, wine_dbgstr_longlong(latency)); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI chorus_mediaobj_Flush(IMediaObject *iface) ++{ ++ struct dmo_chorusfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p\n", This); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI chorus_mediaobj_Discontinuity(IMediaObject *iface, DWORD index) ++{ ++ struct dmo_chorusfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d\n", This, index); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI chorus_mediaobj_AllocateStreamingResources(IMediaObject *iface) ++{ ++ struct dmo_chorusfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p\n", This); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI chorus_mediaobj_FreeStreamingResources(IMediaObject *iface) ++{ ++ struct dmo_chorusfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p\n", This); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI chorus_mediaobj_GetInputStatus(IMediaObject *iface, DWORD index, DWORD *flags) ++{ ++ struct dmo_chorusfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p\n", This, index, flags); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI chorus_mediaobj_ProcessInput(IMediaObject *iface, DWORD index, IMediaBuffer *buffer, ++ DWORD flags, REFERENCE_TIME timestamp, REFERENCE_TIME length) ++{ ++ struct dmo_chorusfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p, %x, %s, %s\n", This, index, buffer, flags, wine_dbgstr_longlong(timestamp), wine_dbgstr_longlong(length)); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI chorus_mediaobj_ProcessOutput(IMediaObject *iface, DWORD flags, DWORD count, ++ DMO_OUTPUT_DATA_BUFFER *buffers, DWORD *status) ++{ ++ struct dmo_chorusfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %x, %d, %p, %p\n", This, flags, count, buffers, status); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI chorus_mediaobj_Lock(IMediaObject *iface, LONG lock) ++{ ++ struct dmo_chorusfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d\n", This, lock); ++ return E_NOTIMPL; ++} ++ ++static const IMediaObjectVtbl echo_mediaobjectVtbl = ++{ ++ chorus_mediaobj_QueryInterface, ++ chorus_mediaobj_AddRef, ++ chorus_mediaobj_Release, ++ chorus_mediaobj_GetStreamCount, ++ chorus_mediaobj_GetInputStreamInfo, ++ chorus_mediaobj_GetOutputStreamInfo, ++ chorus_mediaobj_GetInputType, ++ chorus_mediaobj_GetOutputType, ++ chorus_mediaobj_SetInputType, ++ chorus_mediaobj_SetOutputType, ++ chorus_mediaobj_GetInputCurrentType, ++ chorus_mediaobj_GetOutputCurrentType, ++ chorus_mediaobj_GetInputSizeInfo, ++ chorus_mediaobj_GetOutputSizeInfo, ++ chorus_mediaobj_GetInputMaxLatency, ++ chorus_mediaobj_SetInputMaxLatency, ++ chorus_mediaobj_Flush, ++ chorus_mediaobj_Discontinuity, ++ chorus_mediaobj_AllocateStreamingResources, ++ chorus_mediaobj_FreeStreamingResources, ++ chorus_mediaobj_GetInputStatus, ++ chorus_mediaobj_ProcessInput, ++ chorus_mediaobj_ProcessOutput, ++ chorus_mediaobj_Lock ++}; ++ ++static HRESULT WINAPI chorus_mediainplace_QueryInterface(IMediaObjectInPlace *iface, REFIID riid, void **obj) ++{ ++ struct dmo_chorusfx *This = impl_from_IMediaObjectInPlace(iface); ++ return IDirectSoundFXChorus_QueryInterface(&This->IDirectSoundFXChorus_iface, riid, obj); ++} ++ ++static ULONG WINAPI chorus_mediainplace_AddRef(IMediaObjectInPlace *iface) ++{ ++ struct dmo_chorusfx *This = impl_from_IMediaObjectInPlace(iface); ++ return IDirectSoundFXChorus_AddRef(&This->IDirectSoundFXChorus_iface); ++} ++ ++static ULONG WINAPI chorus_mediainplace_Release(IMediaObjectInPlace *iface) ++{ ++ struct dmo_chorusfx *This = impl_from_IMediaObjectInPlace(iface); ++ return IDirectSoundFXChorus_Release(&This->IDirectSoundFXChorus_iface); ++} ++ ++static HRESULT WINAPI chorus_mediainplace_Process(IMediaObjectInPlace *iface, ULONG size, BYTE *data, REFERENCE_TIME start, DWORD flags) ++{ ++ struct dmo_chorusfx *This = impl_from_IMediaObjectInPlace(iface); ++ static BOOL once = 0; ++ if(!once++) ++ FIXME("%p, %d, %p, %s, %x\n", This, size, data, wine_dbgstr_longlong(start), flags); ++ else ++ TRACE("%p, %d, %p, %s, %x\n", This, size, data, wine_dbgstr_longlong(start), flags); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI chorus_mediainplace_Clone(IMediaObjectInPlace *iface, IMediaObjectInPlace **object) ++{ ++ struct dmo_chorusfx *This = impl_from_IMediaObjectInPlace(iface); ++ FIXME("%p, %p\n", This, object); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI chorus_mediainplace_GetLatency(IMediaObjectInPlace *iface, REFERENCE_TIME *latency) ++{ ++ struct dmo_chorusfx *This = impl_from_IMediaObjectInPlace(iface); ++ FIXME("%p, %p\n", This, latency); ++ return E_NOTIMPL; ++} ++ ++static const IMediaObjectInPlaceVtbl echo_mediainplaceVtbl = ++{ ++ chorus_mediainplace_QueryInterface, ++ chorus_mediainplace_AddRef, ++ chorus_mediainplace_Release, ++ chorus_mediainplace_Process, ++ chorus_mediainplace_Clone, ++ chorus_mediainplace_GetLatency ++}; ++ ++static HRESULT WINAPI chrousfx_QueryInterface(IDirectSoundFXChorus *iface, REFIID riid, void **ppv) ++{ ++ struct dmo_chorusfx *This = impl_from_IDirectSoundFXChorus(iface); ++ ++ TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv); ++ ++ if (IsEqualGUID(riid, &IID_IUnknown) || ++ IsEqualGUID(riid, &IID_IDirectSoundFXChorus)) ++ { ++ *ppv = &This->IDirectSoundFXChorus_iface; ++ } ++ else if(IsEqualGUID(riid, &IID_IMediaObject)) ++ { ++ *ppv = &This->IMediaObject_iface; ++ } ++ else if(IsEqualGUID(riid, &IID_IMediaObjectInPlace)) ++ { ++ *ppv = &This->IMediaObjectInPlace_iface; ++ } ++ ++ if(!*ppv) ++ { ++ FIXME("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppv); ++ return E_NOINTERFACE; ++ } ++ ++ IUnknown_AddRef((IUnknown*)*ppv); ++ ++ return S_OK; ++} ++ ++static ULONG WINAPI chrousfx_AddRef(IDirectSoundFXChorus *iface) ++{ ++ struct dmo_chorusfx *This = impl_from_IDirectSoundFXChorus(iface); ++ ULONG ref = InterlockedIncrement(&This->ref); ++ ++ TRACE("(%p) ref=%u\n", This, ref); ++ ++ return ref; ++} ++ ++static ULONG WINAPI chrousfx_Release(IDirectSoundFXChorus *iface) ++{ ++ struct dmo_chorusfx *This = impl_from_IDirectSoundFXChorus(iface); ++ ULONG ref = InterlockedDecrement(&This->ref); ++ ++ TRACE("(%p) ref=%u\n", This, ref); ++ ++ if (!ref) ++ { ++ heap_free(This); ++ } ++ return ref; ++} ++ ++static HRESULT WINAPI chrousfx_SetAllParameters(IDirectSoundFXChorus *iface, const DSFXChorus *chorus) ++{ ++ struct dmo_chorusfx *This = impl_from_IDirectSoundFXChorus(iface); ++ FIXME("(%p) %p\n", This, chorus); ++ ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI chrousfx_GetAllParameters(IDirectSoundFXChorus *iface, DSFXChorus *chorus) ++{ ++ struct dmo_chorusfx *This = impl_from_IDirectSoundFXChorus(iface); ++ FIXME("(%p) %p\n", This, chorus); ++ ++ return E_NOTIMPL; ++} ++ ++static const struct IDirectSoundFXChorusVtbl chorusfxVtbl = ++{ ++ chrousfx_QueryInterface, ++ chrousfx_AddRef, ++ chrousfx_Release, ++ chrousfx_SetAllParameters, ++ chrousfx_GetAllParameters ++}; ++ ++HRESULT WINAPI ChrousFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) ++{ ++ struct dmo_chorusfx *object; ++ HRESULT ret; ++ ++ TRACE("(%p, %s, %p)\n", outer, debugstr_guid(riid), ppv); ++ ++ *ppv = NULL; ++ ++ object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); ++ if (!object) ++ return E_OUTOFMEMORY; ++ ++ object->IDirectSoundFXChorus_iface.lpVtbl = &chorusfxVtbl; ++ object->IMediaObject_iface.lpVtbl = &echo_mediaobjectVtbl; ++ object->IMediaObjectInPlace_iface.lpVtbl = &echo_mediainplaceVtbl; ++ object->ref = 1; ++ ++ ret = chrousfx_QueryInterface(&object->IDirectSoundFXChorus_iface, riid, ppv); ++ chrousfx_Release(&object->IDirectSoundFXChorus_iface); ++ ++ return ret; ++} +diff --git a/dlls/dsdmo/dsdmo_classes.idl b/dlls/dsdmo/dsdmo_classes.idl +index 649db8f61b..ba1a8f6ff4 100644 +--- a/dlls/dsdmo/dsdmo_classes.idl ++++ b/dlls/dsdmo/dsdmo_classes.idl +@@ -26,3 +26,13 @@ + coclass DirectSoundEchoDMO + { + } ++ ++[ ++ uuid(efe6629c-81f7-4281-bd91-c9d604a95af6), ++ threading(both), ++ progid("Microsoft.DirectSoundChorusDMO.1"), ++ vi_progid("Microsoft.DirectSoundChorusDMO") ++] ++coclass DirectSoundChorusDMO ++{ ++} +diff --git a/dlls/dsdmo/dsdmo_private.h b/dlls/dsdmo/dsdmo_private.h +index 4abe5a9f60..cbe906e472 100644 +--- a/dlls/dsdmo/dsdmo_private.h ++++ b/dlls/dsdmo/dsdmo_private.h +@@ -28,5 +28,6 @@ + #include "dsound.h" + + extern HRESULT WINAPI EchoFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) DECLSPEC_HIDDEN; ++extern HRESULT WINAPI ChrousFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) DECLSPEC_HIDDEN; + + #endif +diff --git a/dlls/dsdmo/main.c b/dlls/dsdmo/main.c +index d751f90dc9..5a89eaff39 100644 +--- a/dlls/dsdmo/main.c ++++ b/dlls/dsdmo/main.c +@@ -94,7 +94,16 @@ static const IClassFactoryVtbl EchoFactoryVtbl = { + ClassFactory_LockServer + }; + ++static const IClassFactoryVtbl ChrousFactoryVtbl = { ++ ClassFactory_QueryInterface, ++ ClassFactory_AddRef, ++ ClassFactory_Release, ++ ChrousFactory_CreateInstance, ++ ClassFactory_LockServer ++}; ++ + static IClassFactory echofx_factory = { &EchoFactoryVtbl }; ++static IClassFactory chorusfx_factory = { &ChrousFactoryVtbl }; + + /*********************************************************************** + * DllGetClassObject +@@ -108,6 +117,11 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) + TRACE("GUID_DSFX_STANDARD_ECHO\n"); + return IClassFactory_QueryInterface(&echofx_factory, riid, ppv); + } ++ else if(IsEqualGUID(&GUID_DSFX_STANDARD_CHORUS, rclsid)) ++ { ++ TRACE("GUID_DSFX_STANDARD_CHORUS\n"); ++ return IClassFactory_QueryInterface(&chorusfx_factory, riid, ppv); ++ } + + FIXME("%s %s %p\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); + return CLASS_E_CLASSNOTAVAILABLE; +-- +2.17.1 + diff --git a/patches/dsdmo-new-dll/0004-dsdmo-Add-IDirectSoundFXCompressor-support.patch b/patches/dsdmo-new-dll/0004-dsdmo-Add-IDirectSoundFXCompressor-support.patch new file mode 100644 index 00000000..c3c1ce73 --- /dev/null +++ b/patches/dsdmo-new-dll/0004-dsdmo-Add-IDirectSoundFXCompressor-support.patch @@ -0,0 +1,495 @@ +From abb55212b7e4ed43526bfc24fa78715f9dafa3e2 Mon Sep 17 00:00:00 2001 +From: Alistair Leslie-Hughes +Date: Sat, 24 Aug 2019 18:40:39 +1000 +Subject: [PATCH 04/27] dsdmo: Add IDirectSoundFXCompressor support + +--- + dlls/dsdmo/Makefile.in | 1 + + dlls/dsdmo/compressor.c | 397 +++++++++++++++++++++++++++++++++++ + dlls/dsdmo/dsdmo_classes.idl | 10 + + dlls/dsdmo/dsdmo_private.h | 1 + + dlls/dsdmo/main.c | 14 ++ + 5 files changed, 423 insertions(+) + create mode 100644 dlls/dsdmo/compressor.c + +diff --git a/dlls/dsdmo/Makefile.in b/dlls/dsdmo/Makefile.in +index 34d0e89bf1..d0b10ac4f9 100644 +--- a/dlls/dsdmo/Makefile.in ++++ b/dlls/dsdmo/Makefile.in +@@ -4,6 +4,7 @@ EXTRADLLFLAGS = -mno-cygwin + + C_SRCS = \ + chorus.c \ ++ compressor.c \ + echo.c \ + main.c + +diff --git a/dlls/dsdmo/compressor.c b/dlls/dsdmo/compressor.c +new file mode 100644 +index 0000000000..1cf26c7437 +--- /dev/null ++++ b/dlls/dsdmo/compressor.c +@@ -0,0 +1,397 @@ ++/* ++ * Copyright 2019 Alistair Leslie-Hughes ++ * ++ * 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 ++ */ ++#define COBJMACROS ++ ++#include "dsdmo_private.h" ++ ++WINE_DEFAULT_DEBUG_CHANNEL(dsdmo); ++ ++struct dmo_compressorfx ++{ ++ IDirectSoundFXCompressor IDirectSoundFXCompressor_iface; ++ IMediaObject IMediaObject_iface; ++ IMediaObjectInPlace IMediaObjectInPlace_iface; ++ LONG ref; ++}; ++ ++static inline struct dmo_compressorfx *impl_from_IDirectSoundFXCompressor(IDirectSoundFXCompressor *iface) ++{ ++ return CONTAINING_RECORD(iface, struct dmo_compressorfx, IDirectSoundFXCompressor_iface); ++} ++ ++static inline struct dmo_compressorfx *impl_from_IMediaObject(IMediaObject *iface) ++{ ++ return CONTAINING_RECORD(iface, struct dmo_compressorfx, IMediaObject_iface); ++} ++ ++static inline struct dmo_compressorfx *impl_from_IMediaObjectInPlace(IMediaObjectInPlace *iface) ++{ ++ return CONTAINING_RECORD(iface, struct dmo_compressorfx, IMediaObjectInPlace_iface); ++} ++ ++static HRESULT WINAPI compressor_mediaobj_QueryInterface(IMediaObject *iface, REFIID riid, void **obj) ++{ ++ struct dmo_compressorfx *This = impl_from_IMediaObject(iface); ++ return IDirectSoundFXCompressor_QueryInterface(&This->IDirectSoundFXCompressor_iface, riid, obj); ++} ++ ++static ULONG WINAPI compressor_mediaobj_AddRef(IMediaObject *iface) ++{ ++ struct dmo_compressorfx *This = impl_from_IMediaObject(iface); ++ return IDirectSoundFXCompressor_AddRef(&This->IDirectSoundFXCompressor_iface); ++} ++ ++static ULONG WINAPI compressor_mediaobj_Release(IMediaObject *iface) ++{ ++ struct dmo_compressorfx *This = impl_from_IMediaObject(iface); ++ return IDirectSoundFXCompressor_Release(&This->IDirectSoundFXCompressor_iface); ++} ++ ++static HRESULT WINAPI compressor_mediaobj_GetStreamCount(IMediaObject *iface, DWORD *inputs, DWORD *outputs) ++{ ++ struct dmo_compressorfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %p, %p\n", This, inputs, outputs); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI compressor_mediaobj_GetInputStreamInfo(IMediaObject *iface, DWORD index, DWORD *flags) ++{ ++ struct dmo_compressorfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p\n", This, index, flags); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI compressor_mediaobj_GetOutputStreamInfo(IMediaObject *iface, DWORD index, DWORD *flags) ++{ ++ struct dmo_compressorfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p\n", This, index, flags); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI compressor_mediaobj_GetInputType(IMediaObject *iface, DWORD index, DWORD type, DMO_MEDIA_TYPE *pmt) ++{ ++ struct dmo_compressorfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %d, %p\n", This, index, type, pmt); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI compressor_mediaobj_GetOutputType(IMediaObject *iface, DWORD index, DWORD type, DMO_MEDIA_TYPE *pmt) ++{ ++ struct dmo_compressorfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %d, %p\n", This, index, type, pmt); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI compressor_mediaobj_SetInputType(IMediaObject *iface, DWORD index, const DMO_MEDIA_TYPE *pmt, DWORD flags) ++{ ++ struct dmo_compressorfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p, %x\n", This, index, pmt, flags); ++ return S_OK; ++} ++ ++static HRESULT WINAPI compressor_mediaobj_SetOutputType(IMediaObject *iface, DWORD index, const DMO_MEDIA_TYPE *pmt, DWORD flags) ++{ ++ struct dmo_compressorfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p, %x\n", This, index, pmt, flags); ++ return S_OK; ++} ++ ++static HRESULT WINAPI compressor_mediaobj_GetInputCurrentType(IMediaObject *iface, DWORD index, DMO_MEDIA_TYPE *pmt) ++{ ++ struct dmo_compressorfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p\n", This, index, pmt); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI compressor_mediaobj_GetOutputCurrentType(IMediaObject *iface, DWORD index, DMO_MEDIA_TYPE *pmt) ++{ ++ struct dmo_compressorfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p\n", This, index, pmt); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI compressor_mediaobj_GetInputSizeInfo(IMediaObject *iface, DWORD index, DWORD *size, DWORD *ahead, DWORD *alignment) ++{ ++ struct dmo_compressorfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p, %p, %p\n", This, index, size, ahead, alignment); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI compressor_mediaobj_GetOutputSizeInfo(IMediaObject *iface, DWORD index, DWORD *size, DWORD *alignment) ++{ ++ struct dmo_compressorfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p, %p\n", This, index, size, alignment); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI compressor_mediaobj_GetInputMaxLatency(IMediaObject *iface, DWORD index, REFERENCE_TIME *latency) ++{ ++ struct dmo_compressorfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p\n", This, index, latency); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI compressor_mediaobj_SetInputMaxLatency(IMediaObject *iface, DWORD index, REFERENCE_TIME latency) ++{ ++ struct dmo_compressorfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %s\n", This, index, wine_dbgstr_longlong(latency)); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI compressor_mediaobj_Flush(IMediaObject *iface) ++{ ++ struct dmo_compressorfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p\n", This); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI compressor_mediaobj_Discontinuity(IMediaObject *iface, DWORD index) ++{ ++ struct dmo_compressorfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d\n", This, index); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI compressor_mediaobj_AllocateStreamingResources(IMediaObject *iface) ++{ ++ struct dmo_compressorfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p\n", This); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI compressor_mediaobj_FreeStreamingResources(IMediaObject *iface) ++{ ++ struct dmo_compressorfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p\n", This); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI compressor_mediaobj_GetInputStatus(IMediaObject *iface, DWORD index, DWORD *flags) ++{ ++ struct dmo_compressorfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p\n", This, index, flags); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI compressor_mediaobj_ProcessInput(IMediaObject *iface, DWORD index, IMediaBuffer *buffer, ++ DWORD flags, REFERENCE_TIME timestamp, REFERENCE_TIME length) ++{ ++ struct dmo_compressorfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p, %x, %s, %s\n", This, index, buffer, flags, wine_dbgstr_longlong(timestamp), wine_dbgstr_longlong(length)); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI compressor_mediaobj_ProcessOutput(IMediaObject *iface, DWORD flags, DWORD count, ++ DMO_OUTPUT_DATA_BUFFER *buffers, DWORD *status) ++{ ++ struct dmo_compressorfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %x, %d, %p, %p\n", This, flags, count, buffers, status); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI compressor_mediaobj_Lock(IMediaObject *iface, LONG lock) ++{ ++ struct dmo_compressorfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d\n", This, lock); ++ return E_NOTIMPL; ++} ++ ++static const IMediaObjectVtbl compressor_mediaobjectVtbl = ++{ ++ compressor_mediaobj_QueryInterface, ++ compressor_mediaobj_AddRef, ++ compressor_mediaobj_Release, ++ compressor_mediaobj_GetStreamCount, ++ compressor_mediaobj_GetInputStreamInfo, ++ compressor_mediaobj_GetOutputStreamInfo, ++ compressor_mediaobj_GetInputType, ++ compressor_mediaobj_GetOutputType, ++ compressor_mediaobj_SetInputType, ++ compressor_mediaobj_SetOutputType, ++ compressor_mediaobj_GetInputCurrentType, ++ compressor_mediaobj_GetOutputCurrentType, ++ compressor_mediaobj_GetInputSizeInfo, ++ compressor_mediaobj_GetOutputSizeInfo, ++ compressor_mediaobj_GetInputMaxLatency, ++ compressor_mediaobj_SetInputMaxLatency, ++ compressor_mediaobj_Flush, ++ compressor_mediaobj_Discontinuity, ++ compressor_mediaobj_AllocateStreamingResources, ++ compressor_mediaobj_FreeStreamingResources, ++ compressor_mediaobj_GetInputStatus, ++ compressor_mediaobj_ProcessInput, ++ compressor_mediaobj_ProcessOutput, ++ compressor_mediaobj_Lock ++}; ++ ++static HRESULT WINAPI echo_mediainplace_QueryInterface(IMediaObjectInPlace *iface, REFIID riid, void **obj) ++{ ++ struct dmo_compressorfx *This = impl_from_IMediaObjectInPlace(iface); ++ return IDirectSoundFXCompressor_QueryInterface(&This->IDirectSoundFXCompressor_iface, riid, obj); ++} ++ ++static ULONG WINAPI echo_mediainplace_AddRef(IMediaObjectInPlace *iface) ++{ ++ struct dmo_compressorfx *This = impl_from_IMediaObjectInPlace(iface); ++ return IDirectSoundFXCompressor_AddRef(&This->IDirectSoundFXCompressor_iface); ++} ++ ++static ULONG WINAPI echo_mediainplace_Release(IMediaObjectInPlace *iface) ++{ ++ struct dmo_compressorfx *This = impl_from_IMediaObjectInPlace(iface); ++ return IDirectSoundFXCompressor_Release(&This->IDirectSoundFXCompressor_iface); ++} ++ ++static HRESULT WINAPI echo_mediainplace_Process(IMediaObjectInPlace *iface, ULONG size, BYTE *data, REFERENCE_TIME start, DWORD flags) ++{ ++ struct dmo_compressorfx *This = impl_from_IMediaObjectInPlace(iface); ++ static BOOL once = 0; ++ if(!once++) ++ FIXME("%p, %d, %p, %s, %x\n", This, size, data, wine_dbgstr_longlong(start), flags); ++ else ++ TRACE("%p, %d, %p, %s, %x\n", This, size, data, wine_dbgstr_longlong(start), flags); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI echo_mediainplace_Clone(IMediaObjectInPlace *iface, IMediaObjectInPlace **object) ++{ ++ struct dmo_compressorfx *This = impl_from_IMediaObjectInPlace(iface); ++ FIXME("%p, %p\n", This, object); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI echo_mediainplace_GetLatency(IMediaObjectInPlace *iface, REFERENCE_TIME *latency) ++{ ++ struct dmo_compressorfx *This = impl_from_IMediaObjectInPlace(iface); ++ FIXME("%p, %p\n", This, latency); ++ return E_NOTIMPL; ++} ++ ++static const IMediaObjectInPlaceVtbl compressor_mediainplaceVtbl = ++{ ++ echo_mediainplace_QueryInterface, ++ echo_mediainplace_AddRef, ++ echo_mediainplace_Release, ++ echo_mediainplace_Process, ++ echo_mediainplace_Clone, ++ echo_mediainplace_GetLatency ++}; ++ ++static HRESULT WINAPI compressorfx_QueryInterface(IDirectSoundFXCompressor *iface, REFIID riid, void **ppv) ++{ ++ struct dmo_compressorfx *This = impl_from_IDirectSoundFXCompressor(iface); ++ ++ TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv); ++ ++ if (IsEqualGUID(riid, &IID_IUnknown) || ++ IsEqualGUID(riid, &IID_IDirectSoundFXCompressor)) ++ { ++ *ppv = &This->IDirectSoundFXCompressor_iface; ++ } ++ else if(IsEqualGUID(riid, &IID_IMediaObject)) ++ { ++ *ppv = &This->IMediaObject_iface; ++ } ++ else if(IsEqualGUID(riid, &IID_IMediaObjectInPlace)) ++ { ++ *ppv = &This->IMediaObjectInPlace_iface; ++ } ++ ++ if(!*ppv) ++ { ++ FIXME("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppv); ++ return E_NOINTERFACE; ++ } ++ ++ IUnknown_AddRef((IUnknown*)*ppv); ++ ++ return S_OK; ++} ++ ++static ULONG WINAPI compressorfx_AddRef(IDirectSoundFXCompressor *iface) ++{ ++ struct dmo_compressorfx *This = impl_from_IDirectSoundFXCompressor(iface); ++ ULONG ref = InterlockedIncrement(&This->ref); ++ ++ TRACE("(%p) ref=%u\n", This, ref); ++ ++ return ref; ++} ++ ++static ULONG WINAPI compressorfx_Release(IDirectSoundFXCompressor *iface) ++{ ++ struct dmo_compressorfx *This = impl_from_IDirectSoundFXCompressor(iface); ++ ULONG ref = InterlockedDecrement(&This->ref); ++ ++ TRACE("(%p) ref=%u\n", This, ref); ++ ++ if (!ref) ++ { ++ heap_free(This); ++ } ++ return ref; ++} ++ ++static HRESULT WINAPI compressorfx_SetAllParameters(IDirectSoundFXCompressor *iface, const DSFXCompressor *compressor) ++{ ++ struct dmo_compressorfx *This = impl_from_IDirectSoundFXCompressor(iface); ++ FIXME("(%p) %p\n", This, compressor); ++ ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI compressorfx_GetAllParameters(IDirectSoundFXCompressor *iface, DSFXCompressor *compressor) ++{ ++ struct dmo_compressorfx *This = impl_from_IDirectSoundFXCompressor(iface); ++ FIXME("(%p) %p\n", This, compressor); ++ ++ return E_NOTIMPL; ++} ++ ++static const struct IDirectSoundFXCompressorVtbl echofxVtbl = ++{ ++ compressorfx_QueryInterface, ++ compressorfx_AddRef, ++ compressorfx_Release, ++ compressorfx_SetAllParameters, ++ compressorfx_GetAllParameters ++}; ++ ++HRESULT WINAPI CompressorFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) ++{ ++ struct dmo_compressorfx *object; ++ HRESULT ret; ++ ++ TRACE("(%p, %s, %p)\n", outer, debugstr_guid(riid), ppv); ++ ++ *ppv = NULL; ++ ++ object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); ++ if (!object) ++ return E_OUTOFMEMORY; ++ ++ object->IDirectSoundFXCompressor_iface.lpVtbl = &echofxVtbl; ++ object->IMediaObject_iface.lpVtbl = &compressor_mediaobjectVtbl; ++ object->IMediaObjectInPlace_iface.lpVtbl = &compressor_mediainplaceVtbl; ++ object->ref = 1; ++ ++ ret = compressorfx_QueryInterface(&object->IDirectSoundFXCompressor_iface, riid, ppv); ++ compressorfx_Release(&object->IDirectSoundFXCompressor_iface); ++ ++ return ret; ++} +diff --git a/dlls/dsdmo/dsdmo_classes.idl b/dlls/dsdmo/dsdmo_classes.idl +index ba1a8f6ff4..f7f139de30 100644 +--- a/dlls/dsdmo/dsdmo_classes.idl ++++ b/dlls/dsdmo/dsdmo_classes.idl +@@ -36,3 +36,13 @@ coclass DirectSoundEchoDMO + coclass DirectSoundChorusDMO + { + } ++ ++[ ++ uuid(ef011f79-4000-406d-87af-bffb3fc39d57), ++ threading(both), ++ progid("Microsoft.DirectSoundCompressorDMO.1"), ++ vi_progid("Microsoft.DirectSoundCompressorDMO") ++] ++coclass DirectSoundCompressorDMO ++{ ++} +diff --git a/dlls/dsdmo/dsdmo_private.h b/dlls/dsdmo/dsdmo_private.h +index cbe906e472..96c0c061ee 100644 +--- a/dlls/dsdmo/dsdmo_private.h ++++ b/dlls/dsdmo/dsdmo_private.h +@@ -29,5 +29,6 @@ + + extern HRESULT WINAPI EchoFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) DECLSPEC_HIDDEN; + extern HRESULT WINAPI ChrousFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) DECLSPEC_HIDDEN; ++extern HRESULT WINAPI CompressorFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) DECLSPEC_HIDDEN; + + #endif +diff --git a/dlls/dsdmo/main.c b/dlls/dsdmo/main.c +index 5a89eaff39..13d4af7adc 100644 +--- a/dlls/dsdmo/main.c ++++ b/dlls/dsdmo/main.c +@@ -102,8 +102,17 @@ static const IClassFactoryVtbl ChrousFactoryVtbl = { + ClassFactory_LockServer + }; + ++static const IClassFactoryVtbl CompressorFactoryVtbl = { ++ ClassFactory_QueryInterface, ++ ClassFactory_AddRef, ++ ClassFactory_Release, ++ CompressorFactory_CreateInstance, ++ ClassFactory_LockServer ++}; ++ + static IClassFactory echofx_factory = { &EchoFactoryVtbl }; + static IClassFactory chorusfx_factory = { &ChrousFactoryVtbl }; ++static IClassFactory compressorfx_factory = { &CompressorFactoryVtbl }; + + /*********************************************************************** + * DllGetClassObject +@@ -122,6 +131,11 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) + TRACE("GUID_DSFX_STANDARD_CHORUS\n"); + return IClassFactory_QueryInterface(&chorusfx_factory, riid, ppv); + } ++ else if(IsEqualGUID(&GUID_DSFX_STANDARD_COMPRESSOR, rclsid)) ++ { ++ TRACE("GUID_DSFX_STANDARD_COMPRESSOR\n"); ++ return IClassFactory_QueryInterface(&compressorfx_factory, riid, ppv); ++ } + + FIXME("%s %s %p\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); + return CLASS_E_CLASSNOTAVAILABLE; +-- +2.17.1 + diff --git a/patches/dsdmo-new-dll/0005-dsdmo-Add-IDirectSoundFXDistortion-support.patch b/patches/dsdmo-new-dll/0005-dsdmo-Add-IDirectSoundFXDistortion-support.patch new file mode 100644 index 00000000..f95ffec1 --- /dev/null +++ b/patches/dsdmo-new-dll/0005-dsdmo-Add-IDirectSoundFXDistortion-support.patch @@ -0,0 +1,496 @@ +From 8a850e7f6123941ce5d891774faeda1a2c8d0bbc Mon Sep 17 00:00:00 2001 +From: Alistair Leslie-Hughes +Date: Sun, 25 Aug 2019 15:00:07 +1000 +Subject: [PATCH 05/27] dsdmo: Add IDirectSoundFXDistortion support + +--- + dlls/dsdmo/Makefile.in | 1 + + dlls/dsdmo/distortion.c | 397 +++++++++++++++++++++++++++++++++++ + dlls/dsdmo/dsdmo_classes.idl | 10 + + dlls/dsdmo/dsdmo_private.h | 1 + + dlls/dsdmo/main.c | 14 ++ + 5 files changed, 423 insertions(+) + create mode 100644 dlls/dsdmo/distortion.c + +diff --git a/dlls/dsdmo/Makefile.in b/dlls/dsdmo/Makefile.in +index d0b10ac4f9..2bf8958560 100644 +--- a/dlls/dsdmo/Makefile.in ++++ b/dlls/dsdmo/Makefile.in +@@ -4,6 +4,7 @@ EXTRADLLFLAGS = -mno-cygwin + + C_SRCS = \ + chorus.c \ ++ distortion.c \ + compressor.c \ + echo.c \ + main.c +diff --git a/dlls/dsdmo/distortion.c b/dlls/dsdmo/distortion.c +new file mode 100644 +index 0000000000..92e498b6f1 +--- /dev/null ++++ b/dlls/dsdmo/distortion.c +@@ -0,0 +1,397 @@ ++/* ++ * Copyright 2019 Alistair Leslie-Hughes ++ * ++ * 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 ++ */ ++#define COBJMACROS ++ ++#include "dsdmo_private.h" ++ ++WINE_DEFAULT_DEBUG_CHANNEL(dsdmo); ++ ++struct dmo_distortionfx ++{ ++ IDirectSoundFXDistortion IDirectSoundFXDistortion_iface; ++ IMediaObject IMediaObject_iface; ++ IMediaObjectInPlace IMediaObjectInPlace_iface; ++ LONG ref; ++}; ++ ++static inline struct dmo_distortionfx *impl_from_IDirectSoundFXDistortion(IDirectSoundFXDistortion *iface) ++{ ++ return CONTAINING_RECORD(iface, struct dmo_distortionfx, IDirectSoundFXDistortion_iface); ++} ++ ++static inline struct dmo_distortionfx *impl_from_IMediaObject(IMediaObject *iface) ++{ ++ return CONTAINING_RECORD(iface, struct dmo_distortionfx, IMediaObject_iface); ++} ++ ++static inline struct dmo_distortionfx *impl_from_IMediaObjectInPlace(IMediaObjectInPlace *iface) ++{ ++ return CONTAINING_RECORD(iface, struct dmo_distortionfx, IMediaObjectInPlace_iface); ++} ++ ++static HRESULT WINAPI distortionfx_mediaobj_QueryInterface(IMediaObject *iface, REFIID riid, void **obj) ++{ ++ struct dmo_distortionfx *This = impl_from_IMediaObject(iface); ++ return IDirectSoundFXDistortion_QueryInterface(&This->IDirectSoundFXDistortion_iface, riid, obj); ++} ++ ++static ULONG WINAPI distortionfx_mediaobj_AddRef(IMediaObject *iface) ++{ ++ struct dmo_distortionfx *This = impl_from_IMediaObject(iface); ++ return IDirectSoundFXDistortion_AddRef(&This->IDirectSoundFXDistortion_iface); ++} ++ ++static ULONG WINAPI distortionfx_mediaobj_Release(IMediaObject *iface) ++{ ++ struct dmo_distortionfx *This = impl_from_IMediaObject(iface); ++ return IDirectSoundFXDistortion_Release(&This->IDirectSoundFXDistortion_iface); ++} ++ ++static HRESULT WINAPI distortionfx_mediaobj_GetStreamCount(IMediaObject *iface, DWORD *inputs, DWORD *outputs) ++{ ++ struct dmo_distortionfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %p, %p\n", This, inputs, outputs); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI distortionfx_mediaobj_GetInputStreamInfo(IMediaObject *iface, DWORD index, DWORD *flags) ++{ ++ struct dmo_distortionfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p\n", This, index, flags); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI distortionfx_mediaobj_GetOutputStreamInfo(IMediaObject *iface, DWORD index, DWORD *flags) ++{ ++ struct dmo_distortionfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p\n", This, index, flags); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI distortionfx_mediaobj_GetInputType(IMediaObject *iface, DWORD index, DWORD type, DMO_MEDIA_TYPE *pmt) ++{ ++ struct dmo_distortionfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %d, %p\n", This, index, type, pmt); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI distortionfx_mediaobj_GetOutputType(IMediaObject *iface, DWORD index, DWORD type, DMO_MEDIA_TYPE *pmt) ++{ ++ struct dmo_distortionfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %d, %p\n", This, index, type, pmt); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI distortionfx_mediaobj_SetInputType(IMediaObject *iface, DWORD index, const DMO_MEDIA_TYPE *pmt, DWORD flags) ++{ ++ struct dmo_distortionfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p, %x\n", This, index, pmt, flags); ++ return S_OK; ++} ++ ++static HRESULT WINAPI distortionfx_mediaobj_SetOutputType(IMediaObject *iface, DWORD index, const DMO_MEDIA_TYPE *pmt, DWORD flags) ++{ ++ struct dmo_distortionfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p, %x\n", This, index, pmt, flags); ++ return S_OK; ++} ++ ++static HRESULT WINAPI distortionfx_mediaobj_GetInputCurrentType(IMediaObject *iface, DWORD index, DMO_MEDIA_TYPE *pmt) ++{ ++ struct dmo_distortionfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p\n", This, index, pmt); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI distortionfx_mediaobj_GetOutputCurrentType(IMediaObject *iface, DWORD index, DMO_MEDIA_TYPE *pmt) ++{ ++ struct dmo_distortionfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p\n", This, index, pmt); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI distortionfx_mediaobj_GetInputSizeInfo(IMediaObject *iface, DWORD index, DWORD *size, DWORD *ahead, DWORD *alignment) ++{ ++ struct dmo_distortionfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p, %p, %p\n", This, index, size, ahead, alignment); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI distortionfx_mediaobj_GetOutputSizeInfo(IMediaObject *iface, DWORD index, DWORD *size, DWORD *alignment) ++{ ++ struct dmo_distortionfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p, %p\n", This, index, size, alignment); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI distortionfx_mediaobj_GetInputMaxLatency(IMediaObject *iface, DWORD index, REFERENCE_TIME *latency) ++{ ++ struct dmo_distortionfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p\n", This, index, latency); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI distortionfx_mediaobj_SetInputMaxLatency(IMediaObject *iface, DWORD index, REFERENCE_TIME latency) ++{ ++ struct dmo_distortionfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %s\n", This, index, wine_dbgstr_longlong(latency)); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI distortionfx_mediaobj_Flush(IMediaObject *iface) ++{ ++ struct dmo_distortionfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p\n", This); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI distortionfx_mediaobj_Discontinuity(IMediaObject *iface, DWORD index) ++{ ++ struct dmo_distortionfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d\n", This, index); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI distortionfx_mediaobj_AllocateStreamingResources(IMediaObject *iface) ++{ ++ struct dmo_distortionfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p\n", This); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI distortionfx_mediaobj_FreeStreamingResources(IMediaObject *iface) ++{ ++ struct dmo_distortionfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p\n", This); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI distortionfx_mediaobj_GetInputStatus(IMediaObject *iface, DWORD index, DWORD *flags) ++{ ++ struct dmo_distortionfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p\n", This, index, flags); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI distortionfx_mediaobj_ProcessInput(IMediaObject *iface, DWORD index, IMediaBuffer *buffer, ++ DWORD flags, REFERENCE_TIME timestamp, REFERENCE_TIME length) ++{ ++ struct dmo_distortionfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p, %x, %s, %s\n", This, index, buffer, flags, wine_dbgstr_longlong(timestamp), wine_dbgstr_longlong(length)); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI distortionfx_mediaobj_ProcessOutput(IMediaObject *iface, DWORD flags, DWORD count, ++ DMO_OUTPUT_DATA_BUFFER *buffers, DWORD *status) ++{ ++ struct dmo_distortionfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %x, %d, %p, %p\n", This, flags, count, buffers, status); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI distortionfx_mediaobj_Lock(IMediaObject *iface, LONG lock) ++{ ++ struct dmo_distortionfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d\n", This, lock); ++ return E_NOTIMPL; ++} ++ ++static const IMediaObjectVtbl distortionfx_mediaobjectVtbl = ++{ ++ distortionfx_mediaobj_QueryInterface, ++ distortionfx_mediaobj_AddRef, ++ distortionfx_mediaobj_Release, ++ distortionfx_mediaobj_GetStreamCount, ++ distortionfx_mediaobj_GetInputStreamInfo, ++ distortionfx_mediaobj_GetOutputStreamInfo, ++ distortionfx_mediaobj_GetInputType, ++ distortionfx_mediaobj_GetOutputType, ++ distortionfx_mediaobj_SetInputType, ++ distortionfx_mediaobj_SetOutputType, ++ distortionfx_mediaobj_GetInputCurrentType, ++ distortionfx_mediaobj_GetOutputCurrentType, ++ distortionfx_mediaobj_GetInputSizeInfo, ++ distortionfx_mediaobj_GetOutputSizeInfo, ++ distortionfx_mediaobj_GetInputMaxLatency, ++ distortionfx_mediaobj_SetInputMaxLatency, ++ distortionfx_mediaobj_Flush, ++ distortionfx_mediaobj_Discontinuity, ++ distortionfx_mediaobj_AllocateStreamingResources, ++ distortionfx_mediaobj_FreeStreamingResources, ++ distortionfx_mediaobj_GetInputStatus, ++ distortionfx_mediaobj_ProcessInput, ++ distortionfx_mediaobj_ProcessOutput, ++ distortionfx_mediaobj_Lock ++}; ++ ++static HRESULT WINAPI distortionfx_mediainplace_QueryInterface(IMediaObjectInPlace *iface, REFIID riid, void **obj) ++{ ++ struct dmo_distortionfx *This = impl_from_IMediaObjectInPlace(iface); ++ return IDirectSoundFXDistortion_QueryInterface(&This->IDirectSoundFXDistortion_iface, riid, obj); ++} ++ ++static ULONG WINAPI distortionfx_mediainplace_AddRef(IMediaObjectInPlace *iface) ++{ ++ struct dmo_distortionfx *This = impl_from_IMediaObjectInPlace(iface); ++ return IDirectSoundFXDistortion_AddRef(&This->IDirectSoundFXDistortion_iface); ++} ++ ++static ULONG WINAPI distortionfx_mediainplace_Release(IMediaObjectInPlace *iface) ++{ ++ struct dmo_distortionfx *This = impl_from_IMediaObjectInPlace(iface); ++ return IDirectSoundFXDistortion_Release(&This->IDirectSoundFXDistortion_iface); ++} ++ ++static HRESULT WINAPI distortionfx_mediainplace_Process(IMediaObjectInPlace *iface, ULONG size, BYTE *data, REFERENCE_TIME start, DWORD flags) ++{ ++ struct dmo_distortionfx *This = impl_from_IMediaObjectInPlace(iface); ++ static BOOL once = 0; ++ if(!once++) ++ FIXME("%p, %d, %p, %s, %x\n", This, size, data, wine_dbgstr_longlong(start), flags); ++ else ++ TRACE("%p, %d, %p, %s, %x\n", This, size, data, wine_dbgstr_longlong(start), flags); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI distortionfx_mediainplace_Clone(IMediaObjectInPlace *iface, IMediaObjectInPlace **object) ++{ ++ struct dmo_distortionfx *This = impl_from_IMediaObjectInPlace(iface); ++ FIXME("%p, %p\n", This, object); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI distortionfx_mediainplace_GetLatency(IMediaObjectInPlace *iface, REFERENCE_TIME *latency) ++{ ++ struct dmo_distortionfx *This = impl_from_IMediaObjectInPlace(iface); ++ FIXME("%p, %p\n", This, latency); ++ return E_NOTIMPL; ++} ++ ++static const IMediaObjectInPlaceVtbl distortionfx_mediainplaceVtbl = ++{ ++ distortionfx_mediainplace_QueryInterface, ++ distortionfx_mediainplace_AddRef, ++ distortionfx_mediainplace_Release, ++ distortionfx_mediainplace_Process, ++ distortionfx_mediainplace_Clone, ++ distortionfx_mediainplace_GetLatency ++}; ++ ++static HRESULT WINAPI distortionfx_QueryInterface(IDirectSoundFXDistortion *iface, REFIID riid, void **ppv) ++{ ++ struct dmo_distortionfx *This = impl_from_IDirectSoundFXDistortion(iface); ++ ++ TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv); ++ ++ if (IsEqualGUID(riid, &IID_IUnknown) || ++ IsEqualGUID(riid, &IID_IDirectSoundFXDistortion)) ++ { ++ *ppv = &This->IDirectSoundFXDistortion_iface; ++ } ++ else if(IsEqualGUID(riid, &IID_IMediaObject)) ++ { ++ *ppv = &This->IMediaObject_iface; ++ } ++ else if(IsEqualGUID(riid, &IID_IMediaObjectInPlace)) ++ { ++ *ppv = &This->IMediaObjectInPlace_iface; ++ } ++ ++ if(!*ppv) ++ { ++ FIXME("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppv); ++ return E_NOINTERFACE; ++ } ++ ++ IUnknown_AddRef((IUnknown*)*ppv); ++ ++ return S_OK; ++} ++ ++static ULONG WINAPI distortionfx_AddRef(IDirectSoundFXDistortion *iface) ++{ ++ struct dmo_distortionfx *This = impl_from_IDirectSoundFXDistortion(iface); ++ ULONG ref = InterlockedIncrement(&This->ref); ++ ++ TRACE("(%p) ref=%u\n", This, ref); ++ ++ return ref; ++} ++ ++static ULONG WINAPI distortionfx_Release(IDirectSoundFXDistortion *iface) ++{ ++ struct dmo_distortionfx *This = impl_from_IDirectSoundFXDistortion(iface); ++ ULONG ref = InterlockedDecrement(&This->ref); ++ ++ TRACE("(%p) ref=%u\n", This, ref); ++ ++ if (!ref) ++ { ++ heap_free(This); ++ } ++ return ref; ++} ++ ++static HRESULT WINAPI distortionfx_SetAllParameters(IDirectSoundFXDistortion *iface, const DSFXDistortion *distortion) ++{ ++ struct dmo_distortionfx *This = impl_from_IDirectSoundFXDistortion(iface); ++ FIXME("(%p) %p\n", This, distortion); ++ ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI distortionfx_GetAllParameters(IDirectSoundFXDistortion *iface, DSFXDistortion *distortion) ++{ ++ struct dmo_distortionfx *This = impl_from_IDirectSoundFXDistortion(iface); ++ FIXME("(%p) %p\n", This, distortion); ++ ++ return E_NOTIMPL; ++} ++ ++static const struct IDirectSoundFXDistortionVtbl distortionfxVtbl = ++{ ++ distortionfx_QueryInterface, ++ distortionfx_AddRef, ++ distortionfx_Release, ++ distortionfx_SetAllParameters, ++ distortionfx_GetAllParameters ++}; ++ ++HRESULT WINAPI DistortionFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) ++{ ++ struct dmo_distortionfx *object; ++ HRESULT ret; ++ ++ TRACE("(%p, %s, %p)\n", outer, debugstr_guid(riid), ppv); ++ ++ *ppv = NULL; ++ ++ object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); ++ if (!object) ++ return E_OUTOFMEMORY; ++ ++ object->IDirectSoundFXDistortion_iface.lpVtbl = &distortionfxVtbl; ++ object->IMediaObject_iface.lpVtbl = &distortionfx_mediaobjectVtbl; ++ object->IMediaObjectInPlace_iface.lpVtbl = &distortionfx_mediainplaceVtbl; ++ object->ref = 1; ++ ++ ret = distortionfx_QueryInterface(&object->IDirectSoundFXDistortion_iface, riid, ppv); ++ distortionfx_Release(&object->IDirectSoundFXDistortion_iface); ++ ++ return ret; ++} +diff --git a/dlls/dsdmo/dsdmo_classes.idl b/dlls/dsdmo/dsdmo_classes.idl +index f7f139de30..8060d4c2af 100644 +--- a/dlls/dsdmo/dsdmo_classes.idl ++++ b/dlls/dsdmo/dsdmo_classes.idl +@@ -46,3 +46,13 @@ coclass DirectSoundChorusDMO + coclass DirectSoundCompressorDMO + { + } ++ ++[ ++ uuid(ef114c90-cd1d-484e-96e5-09cfaf912a21), ++ threading(both), ++ progid("Microsoft.DirectSoundDistortionDMO.1"), ++ vi_progid("Microsoft.DirectSoundDistortionDMO") ++] ++coclass DirectSoundDistortionDMO ++{ ++} +diff --git a/dlls/dsdmo/dsdmo_private.h b/dlls/dsdmo/dsdmo_private.h +index 96c0c061ee..03186366c6 100644 +--- a/dlls/dsdmo/dsdmo_private.h ++++ b/dlls/dsdmo/dsdmo_private.h +@@ -30,5 +30,6 @@ + extern HRESULT WINAPI EchoFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) DECLSPEC_HIDDEN; + extern HRESULT WINAPI ChrousFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) DECLSPEC_HIDDEN; + extern HRESULT WINAPI CompressorFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) DECLSPEC_HIDDEN; ++extern HRESULT WINAPI DistortionFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) DECLSPEC_HIDDEN; + + #endif +diff --git a/dlls/dsdmo/main.c b/dlls/dsdmo/main.c +index 13d4af7adc..ee994350d5 100644 +--- a/dlls/dsdmo/main.c ++++ b/dlls/dsdmo/main.c +@@ -110,9 +110,18 @@ static const IClassFactoryVtbl CompressorFactoryVtbl = { + ClassFactory_LockServer + }; + ++static const IClassFactoryVtbl DistortionFactoryVtbl = { ++ ClassFactory_QueryInterface, ++ ClassFactory_AddRef, ++ ClassFactory_Release, ++ DistortionFactory_CreateInstance, ++ ClassFactory_LockServer ++}; ++ + static IClassFactory echofx_factory = { &EchoFactoryVtbl }; + static IClassFactory chorusfx_factory = { &ChrousFactoryVtbl }; + static IClassFactory compressorfx_factory = { &CompressorFactoryVtbl }; ++static IClassFactory distortionfx_factory = { &DistortionFactoryVtbl }; + + /*********************************************************************** + * DllGetClassObject +@@ -136,6 +145,11 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) + TRACE("GUID_DSFX_STANDARD_COMPRESSOR\n"); + return IClassFactory_QueryInterface(&compressorfx_factory, riid, ppv); + } ++ else if(IsEqualGUID(&GUID_DSFX_STANDARD_DISTORTION, rclsid)) ++ { ++ TRACE("GUID_DSFX_STANDARD_DISTORTION\n"); ++ return IClassFactory_QueryInterface(&distortionfx_factory, riid, ppv); ++ } + + FIXME("%s %s %p\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); + return CLASS_E_CLASSNOTAVAILABLE; +-- +2.17.1 + diff --git a/patches/dsdmo-new-dll/0006-dsdmo-Add-IDirectSoundFXFlanger-support.patch b/patches/dsdmo-new-dll/0006-dsdmo-Add-IDirectSoundFXFlanger-support.patch new file mode 100644 index 00000000..c57545d8 --- /dev/null +++ b/patches/dsdmo-new-dll/0006-dsdmo-Add-IDirectSoundFXFlanger-support.patch @@ -0,0 +1,497 @@ +From b4b51cd0467f08de20a2a808401a3c18f7eefe88 Mon Sep 17 00:00:00 2001 +From: Alistair Leslie-Hughes +Date: Sun, 25 Aug 2019 16:51:33 +1000 +Subject: [PATCH 06/27] dsdmo: Add IDirectSoundFXFlanger support + +--- + dlls/dsdmo/Makefile.in | 1 + + dlls/dsdmo/dsdmo_classes.idl | 10 + + dlls/dsdmo/dsdmo_private.h | 1 + + dlls/dsdmo/flanger.c | 397 +++++++++++++++++++++++++++++++++++ + dlls/dsdmo/main.c | 14 ++ + 5 files changed, 423 insertions(+) + create mode 100644 dlls/dsdmo/flanger.c + +diff --git a/dlls/dsdmo/Makefile.in b/dlls/dsdmo/Makefile.in +index 2bf8958560..3a54f4631c 100644 +--- a/dlls/dsdmo/Makefile.in ++++ b/dlls/dsdmo/Makefile.in +@@ -7,6 +7,7 @@ C_SRCS = \ + distortion.c \ + compressor.c \ + echo.c \ ++ flanger.c \ + main.c + + IDL_SRCS = dsdmo_classes.idl +diff --git a/dlls/dsdmo/dsdmo_classes.idl b/dlls/dsdmo/dsdmo_classes.idl +index 8060d4c2af..48d1f96e88 100644 +--- a/dlls/dsdmo/dsdmo_classes.idl ++++ b/dlls/dsdmo/dsdmo_classes.idl +@@ -56,3 +56,13 @@ coclass DirectSoundCompressorDMO + coclass DirectSoundDistortionDMO + { + } ++ ++[ ++ uuid(efca3d92-dfd8-4672-a603-7420894bad98), ++ threading(both), ++ progid("Microsoft.DirectSoundFlangerDMO.1"), ++ vi_progid("Microsoft.DirectSoundFlangerDMO") ++] ++coclass DirectSoundFlangerDMO ++{ ++} +diff --git a/dlls/dsdmo/dsdmo_private.h b/dlls/dsdmo/dsdmo_private.h +index 03186366c6..027fb6e177 100644 +--- a/dlls/dsdmo/dsdmo_private.h ++++ b/dlls/dsdmo/dsdmo_private.h +@@ -31,5 +31,6 @@ extern HRESULT WINAPI EchoFactory_CreateInstance(IClassFactory *iface, IUnknown + extern HRESULT WINAPI ChrousFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) DECLSPEC_HIDDEN; + extern HRESULT WINAPI CompressorFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) DECLSPEC_HIDDEN; + extern HRESULT WINAPI DistortionFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) DECLSPEC_HIDDEN; ++extern HRESULT WINAPI FlangerFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) DECLSPEC_HIDDEN; + + #endif +diff --git a/dlls/dsdmo/flanger.c b/dlls/dsdmo/flanger.c +new file mode 100644 +index 0000000000..6fbc836dcd +--- /dev/null ++++ b/dlls/dsdmo/flanger.c +@@ -0,0 +1,397 @@ ++/* ++ * Copyright 2019 Alistair Leslie-Hughes ++ * ++ * 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 ++ */ ++#define COBJMACROS ++ ++#include "dsdmo_private.h" ++ ++WINE_DEFAULT_DEBUG_CHANNEL(dsdmo); ++ ++struct dmo_flangerfx ++{ ++ IDirectSoundFXFlanger IDirectSoundFXFlanger_iface; ++ IMediaObject IMediaObject_iface; ++ IMediaObjectInPlace IMediaObjectInPlace_iface; ++ LONG ref; ++}; ++ ++static inline struct dmo_flangerfx *impl_from_IDirectSoundFXFlanger(IDirectSoundFXFlanger *iface) ++{ ++ return CONTAINING_RECORD(iface, struct dmo_flangerfx, IDirectSoundFXFlanger_iface); ++} ++ ++static inline struct dmo_flangerfx *impl_from_IMediaObject(IMediaObject *iface) ++{ ++ return CONTAINING_RECORD(iface, struct dmo_flangerfx, IMediaObject_iface); ++} ++ ++static inline struct dmo_flangerfx *impl_from_IMediaObjectInPlace(IMediaObjectInPlace *iface) ++{ ++ return CONTAINING_RECORD(iface, struct dmo_flangerfx, IMediaObjectInPlace_iface); ++} ++ ++static HRESULT WINAPI flanger_mediaobj_QueryInterface(IMediaObject *iface, REFIID riid, void **obj) ++{ ++ struct dmo_flangerfx *This = impl_from_IMediaObject(iface); ++ return IDirectSoundFXFlanger_QueryInterface(&This->IDirectSoundFXFlanger_iface, riid, obj); ++} ++ ++static ULONG WINAPI flanger_mediaobj_AddRef(IMediaObject *iface) ++{ ++ struct dmo_flangerfx *This = impl_from_IMediaObject(iface); ++ return IDirectSoundFXFlanger_AddRef(&This->IDirectSoundFXFlanger_iface); ++} ++ ++static ULONG WINAPI flanger_mediaobj_Release(IMediaObject *iface) ++{ ++ struct dmo_flangerfx *This = impl_from_IMediaObject(iface); ++ return IDirectSoundFXFlanger_Release(&This->IDirectSoundFXFlanger_iface); ++} ++ ++static HRESULT WINAPI flanger_mediaobj_GetStreamCount(IMediaObject *iface, DWORD *inputs, DWORD *outputs) ++{ ++ struct dmo_flangerfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %p, %p\n", This, inputs, outputs); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI flanger_mediaobj_GetInputStreamInfo(IMediaObject *iface, DWORD index, DWORD *flags) ++{ ++ struct dmo_flangerfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p\n", This, index, flags); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI flanger_mediaobj_GetOutputStreamInfo(IMediaObject *iface, DWORD index, DWORD *flags) ++{ ++ struct dmo_flangerfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p\n", This, index, flags); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI flanger_mediaobj_GetInputType(IMediaObject *iface, DWORD index, DWORD type, DMO_MEDIA_TYPE *pmt) ++{ ++ struct dmo_flangerfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %d, %p\n", This, index, type, pmt); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI flanger_mediaobj_GetOutputType(IMediaObject *iface, DWORD index, DWORD type, DMO_MEDIA_TYPE *pmt) ++{ ++ struct dmo_flangerfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %d, %p\n", This, index, type, pmt); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI flanger_mediaobj_SetInputType(IMediaObject *iface, DWORD index, const DMO_MEDIA_TYPE *pmt, DWORD flags) ++{ ++ struct dmo_flangerfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p, %x\n", This, index, pmt, flags); ++ return S_OK; ++} ++ ++static HRESULT WINAPI flanger_mediaobj_SetOutputType(IMediaObject *iface, DWORD index, const DMO_MEDIA_TYPE *pmt, DWORD flags) ++{ ++ struct dmo_flangerfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p, %x\n", This, index, pmt, flags); ++ return S_OK; ++} ++ ++static HRESULT WINAPI flanger_mediaobj_GetInputCurrentType(IMediaObject *iface, DWORD index, DMO_MEDIA_TYPE *pmt) ++{ ++ struct dmo_flangerfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p\n", This, index, pmt); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI flanger_mediaobj_GetOutputCurrentType(IMediaObject *iface, DWORD index, DMO_MEDIA_TYPE *pmt) ++{ ++ struct dmo_flangerfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p\n", This, index, pmt); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI flanger_mediaobj_GetInputSizeInfo(IMediaObject *iface, DWORD index, DWORD *size, DWORD *ahead, DWORD *alignment) ++{ ++ struct dmo_flangerfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p, %p, %p\n", This, index, size, ahead, alignment); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI flanger_mediaobj_GetOutputSizeInfo(IMediaObject *iface, DWORD index, DWORD *size, DWORD *alignment) ++{ ++ struct dmo_flangerfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p, %p\n", This, index, size, alignment); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI flanger_mediaobj_GetInputMaxLatency(IMediaObject *iface, DWORD index, REFERENCE_TIME *latency) ++{ ++ struct dmo_flangerfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p\n", This, index, latency); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI flanger_mediaobj_SetInputMaxLatency(IMediaObject *iface, DWORD index, REFERENCE_TIME latency) ++{ ++ struct dmo_flangerfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %s\n", This, index, wine_dbgstr_longlong(latency)); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI flanger_mediaobj_Flush(IMediaObject *iface) ++{ ++ struct dmo_flangerfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p\n", This); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI flanger_mediaobj_Discontinuity(IMediaObject *iface, DWORD index) ++{ ++ struct dmo_flangerfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d\n", This, index); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI flanger_mediaobj_AllocateStreamingResources(IMediaObject *iface) ++{ ++ struct dmo_flangerfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p\n", This); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI flanger_mediaobj_FreeStreamingResources(IMediaObject *iface) ++{ ++ struct dmo_flangerfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p\n", This); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI flanger_mediaobj_GetInputStatus(IMediaObject *iface, DWORD index, DWORD *flags) ++{ ++ struct dmo_flangerfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p\n", This, index, flags); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI flanger_mediaobj_ProcessInput(IMediaObject *iface, DWORD index, IMediaBuffer *buffer, ++ DWORD flags, REFERENCE_TIME timestamp, REFERENCE_TIME length) ++{ ++ struct dmo_flangerfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p, %x, %s, %s\n", This, index, buffer, flags, wine_dbgstr_longlong(timestamp), wine_dbgstr_longlong(length)); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI flanger_mediaobj_ProcessOutput(IMediaObject *iface, DWORD flags, DWORD count, ++ DMO_OUTPUT_DATA_BUFFER *buffers, DWORD *status) ++{ ++ struct dmo_flangerfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %x, %d, %p, %p\n", This, flags, count, buffers, status); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI flanger_mediaobj_Lock(IMediaObject *iface, LONG lock) ++{ ++ struct dmo_flangerfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d\n", This, lock); ++ return E_NOTIMPL; ++} ++ ++static const IMediaObjectVtbl flanger_mediaobjectVtbl = ++{ ++ flanger_mediaobj_QueryInterface, ++ flanger_mediaobj_AddRef, ++ flanger_mediaobj_Release, ++ flanger_mediaobj_GetStreamCount, ++ flanger_mediaobj_GetInputStreamInfo, ++ flanger_mediaobj_GetOutputStreamInfo, ++ flanger_mediaobj_GetInputType, ++ flanger_mediaobj_GetOutputType, ++ flanger_mediaobj_SetInputType, ++ flanger_mediaobj_SetOutputType, ++ flanger_mediaobj_GetInputCurrentType, ++ flanger_mediaobj_GetOutputCurrentType, ++ flanger_mediaobj_GetInputSizeInfo, ++ flanger_mediaobj_GetOutputSizeInfo, ++ flanger_mediaobj_GetInputMaxLatency, ++ flanger_mediaobj_SetInputMaxLatency, ++ flanger_mediaobj_Flush, ++ flanger_mediaobj_Discontinuity, ++ flanger_mediaobj_AllocateStreamingResources, ++ flanger_mediaobj_FreeStreamingResources, ++ flanger_mediaobj_GetInputStatus, ++ flanger_mediaobj_ProcessInput, ++ flanger_mediaobj_ProcessOutput, ++ flanger_mediaobj_Lock ++}; ++ ++static HRESULT WINAPI flanger_mediainplace_QueryInterface(IMediaObjectInPlace *iface, REFIID riid, void **obj) ++{ ++ struct dmo_flangerfx *This = impl_from_IMediaObjectInPlace(iface); ++ return IDirectSoundFXFlanger_QueryInterface(&This->IDirectSoundFXFlanger_iface, riid, obj); ++} ++ ++static ULONG flanger_mediainplace_AddRef(IMediaObjectInPlace *iface) ++{ ++ struct dmo_flangerfx *This = impl_from_IMediaObjectInPlace(iface); ++ return IDirectSoundFXFlanger_AddRef(&This->IDirectSoundFXFlanger_iface); ++} ++ ++static ULONG flanger_mediainplace_Release(IMediaObjectInPlace *iface) ++{ ++ struct dmo_flangerfx *This = impl_from_IMediaObjectInPlace(iface); ++ return IDirectSoundFXFlanger_Release(&This->IDirectSoundFXFlanger_iface); ++} ++ ++static HRESULT WINAPI flanger_mediainplace_Process(IMediaObjectInPlace *iface, ULONG size, BYTE *data, REFERENCE_TIME start, DWORD flags) ++{ ++ struct dmo_flangerfx *This = impl_from_IMediaObjectInPlace(iface); ++ static BOOL once = 0; ++ if(!once++) ++ FIXME("%p, %d, %p, %s, %x\n", This, size, data, wine_dbgstr_longlong(start), flags); ++ else ++ TRACE("%p, %d, %p, %s, %x\n", This, size, data, wine_dbgstr_longlong(start), flags); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI flanger_mediainplace_Clone(IMediaObjectInPlace *iface, IMediaObjectInPlace **object) ++{ ++ struct dmo_flangerfx *This = impl_from_IMediaObjectInPlace(iface); ++ FIXME("%p, %p\n", This, object); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI flanger_mediainplace_GetLatency(IMediaObjectInPlace *iface, REFERENCE_TIME *latency) ++{ ++ struct dmo_flangerfx *This = impl_from_IMediaObjectInPlace(iface); ++ FIXME("%p, %p\n", This, latency); ++ return E_NOTIMPL; ++} ++ ++static const IMediaObjectInPlaceVtbl flanger_mediainplaceVtbl = ++{ ++ flanger_mediainplace_QueryInterface, ++ flanger_mediainplace_AddRef, ++ flanger_mediainplace_Release, ++ flanger_mediainplace_Process, ++ flanger_mediainplace_Clone, ++ flanger_mediainplace_GetLatency ++}; ++ ++static HRESULT WINAPI flangerfx_QueryInterface(IDirectSoundFXFlanger *iface, REFIID riid, void **ppv) ++{ ++ struct dmo_flangerfx *This = impl_from_IDirectSoundFXFlanger(iface); ++ ++ TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv); ++ ++ if (IsEqualGUID(riid, &IID_IUnknown) || ++ IsEqualGUID(riid, &IID_IDirectSoundFXFlanger)) ++ { ++ *ppv = &This->IDirectSoundFXFlanger_iface; ++ } ++ else if(IsEqualGUID(riid, &IID_IMediaObject)) ++ { ++ *ppv = &This->IMediaObject_iface; ++ } ++ else if(IsEqualGUID(riid, &IID_IMediaObjectInPlace)) ++ { ++ *ppv = &This->IMediaObjectInPlace_iface; ++ } ++ ++ if(!*ppv) ++ { ++ FIXME("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppv); ++ return E_NOINTERFACE; ++ } ++ ++ IUnknown_AddRef((IUnknown*)*ppv); ++ ++ return S_OK; ++} ++ ++static ULONG WINAPI flangerfx_AddRef(IDirectSoundFXFlanger *iface) ++{ ++ struct dmo_flangerfx *This = impl_from_IDirectSoundFXFlanger(iface); ++ ULONG ref = InterlockedIncrement(&This->ref); ++ ++ TRACE("(%p) ref=%u\n", This, ref); ++ ++ return ref; ++} ++ ++static ULONG WINAPI flangerfx_Release(IDirectSoundFXFlanger *iface) ++{ ++ struct dmo_flangerfx *This = impl_from_IDirectSoundFXFlanger(iface); ++ ULONG ref = InterlockedDecrement(&This->ref); ++ ++ TRACE("(%p) ref=%u\n", This, ref); ++ ++ if (!ref) ++ { ++ heap_free(This); ++ } ++ return ref; ++} ++ ++static HRESULT WINAPI flangerfx_SetAllParameters(IDirectSoundFXFlanger *iface, const DSFXFlanger *flanger) ++{ ++ struct dmo_flangerfx *This = impl_from_IDirectSoundFXFlanger(iface); ++ FIXME("(%p) %p\n", This, flanger); ++ ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI flangerfx_GetAllParameters(IDirectSoundFXFlanger *iface, DSFXFlanger *flanger) ++{ ++ struct dmo_flangerfx *This = impl_from_IDirectSoundFXFlanger(iface); ++ FIXME("(%p) %p\n", This, flanger); ++ ++ return E_NOTIMPL; ++} ++ ++static const struct IDirectSoundFXFlangerVtbl flangerfxVtbl = ++{ ++ flangerfx_QueryInterface, ++ flangerfx_AddRef, ++ flangerfx_Release, ++ flangerfx_SetAllParameters, ++ flangerfx_GetAllParameters ++}; ++ ++HRESULT WINAPI FlangerFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) ++{ ++ struct dmo_flangerfx *object; ++ HRESULT ret; ++ ++ TRACE("(%p, %s, %p)\n", outer, debugstr_guid(riid), ppv); ++ ++ *ppv = NULL; ++ ++ object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); ++ if (!object) ++ return E_OUTOFMEMORY; ++ ++ object->IDirectSoundFXFlanger_iface.lpVtbl = &flangerfxVtbl; ++ object->IMediaObject_iface.lpVtbl = &flanger_mediaobjectVtbl; ++ object->IMediaObjectInPlace_iface.lpVtbl = &flanger_mediainplaceVtbl; ++ object->ref = 1; ++ ++ ret = flangerfx_QueryInterface(&object->IDirectSoundFXFlanger_iface, riid, ppv); ++ flangerfx_Release(&object->IDirectSoundFXFlanger_iface); ++ ++ return ret; ++} +diff --git a/dlls/dsdmo/main.c b/dlls/dsdmo/main.c +index ee994350d5..0e185fa1e1 100644 +--- a/dlls/dsdmo/main.c ++++ b/dlls/dsdmo/main.c +@@ -118,10 +118,19 @@ static const IClassFactoryVtbl DistortionFactoryVtbl = { + ClassFactory_LockServer + }; + ++static const IClassFactoryVtbl FlangerFactoryVtbl = { ++ ClassFactory_QueryInterface, ++ ClassFactory_AddRef, ++ ClassFactory_Release, ++ FlangerFactory_CreateInstance, ++ ClassFactory_LockServer ++}; ++ + static IClassFactory echofx_factory = { &EchoFactoryVtbl }; + static IClassFactory chorusfx_factory = { &ChrousFactoryVtbl }; + static IClassFactory compressorfx_factory = { &CompressorFactoryVtbl }; + static IClassFactory distortionfx_factory = { &DistortionFactoryVtbl }; ++static IClassFactory flangerfx_factory = { &FlangerFactoryVtbl }; + + /*********************************************************************** + * DllGetClassObject +@@ -150,6 +159,11 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) + TRACE("GUID_DSFX_STANDARD_DISTORTION\n"); + return IClassFactory_QueryInterface(&distortionfx_factory, riid, ppv); + } ++ else if(IsEqualGUID(&GUID_DSFX_STANDARD_FLANGER, rclsid)) ++ { ++ TRACE("GUID_DSFX_STANDARD_FLANGER\n"); ++ return IClassFactory_QueryInterface(&flangerfx_factory, riid, ppv); ++ } + + FIXME("%s %s %p\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); + return CLASS_E_CLASSNOTAVAILABLE; +-- +2.17.1 + diff --git a/patches/dsdmo-new-dll/0007-dsdmo-Add-IDirectSoundFXGargle-support.patch b/patches/dsdmo-new-dll/0007-dsdmo-Add-IDirectSoundFXGargle-support.patch new file mode 100644 index 00000000..7844d7ec --- /dev/null +++ b/patches/dsdmo-new-dll/0007-dsdmo-Add-IDirectSoundFXGargle-support.patch @@ -0,0 +1,498 @@ +From f8d396f7f7262efa17ae4c77bb8fb7894ef05f1f Mon Sep 17 00:00:00 2001 +From: Alistair Leslie-Hughes +Date: Mon, 26 Aug 2019 09:03:54 +1000 +Subject: [PATCH 07/27] dsdmo: Add IDirectSoundFXGargle support. + +--- + dlls/dsdmo/Makefile.in | 1 + + dlls/dsdmo/dsdmo_classes.idl | 10 + + dlls/dsdmo/dsdmo_private.h | 1 + + dlls/dsdmo/gargle.c | 397 +++++++++++++++++++++++++++++++++++ + dlls/dsdmo/main.c | 14 ++ + 5 files changed, 423 insertions(+) + create mode 100644 dlls/dsdmo/gargle.c + +diff --git a/dlls/dsdmo/Makefile.in b/dlls/dsdmo/Makefile.in +index 3a54f4631c..24b53f03ae 100644 +--- a/dlls/dsdmo/Makefile.in ++++ b/dlls/dsdmo/Makefile.in +@@ -8,6 +8,7 @@ C_SRCS = \ + compressor.c \ + echo.c \ + flanger.c \ ++ gargle.c \ + main.c + + IDL_SRCS = dsdmo_classes.idl +diff --git a/dlls/dsdmo/dsdmo_classes.idl b/dlls/dsdmo/dsdmo_classes.idl +index 48d1f96e88..f114f4831b 100644 +--- a/dlls/dsdmo/dsdmo_classes.idl ++++ b/dlls/dsdmo/dsdmo_classes.idl +@@ -66,3 +66,13 @@ coclass DirectSoundDistortionDMO + coclass DirectSoundFlangerDMO + { + } ++ ++[ ++ uuid(dafd8210-5711-4b91-9fe3-f75b7ae279bf), ++ threading(both), ++ progid("Microsoft.DirectSoundGargleDMO.1"), ++ vi_progid("Microsoft.DirectSoundGargleDMO") ++] ++coclass DirectSoundGargleDMO ++{ ++} +diff --git a/dlls/dsdmo/dsdmo_private.h b/dlls/dsdmo/dsdmo_private.h +index 027fb6e177..313c66ba3d 100644 +--- a/dlls/dsdmo/dsdmo_private.h ++++ b/dlls/dsdmo/dsdmo_private.h +@@ -32,5 +32,6 @@ extern HRESULT WINAPI ChrousFactory_CreateInstance(IClassFactory *iface, IUnknow + extern HRESULT WINAPI CompressorFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) DECLSPEC_HIDDEN; + extern HRESULT WINAPI DistortionFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) DECLSPEC_HIDDEN; + extern HRESULT WINAPI FlangerFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) DECLSPEC_HIDDEN; ++extern HRESULT WINAPI GargleFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) DECLSPEC_HIDDEN; + + #endif +diff --git a/dlls/dsdmo/gargle.c b/dlls/dsdmo/gargle.c +new file mode 100644 +index 0000000000..7ad1e30b67 +--- /dev/null ++++ b/dlls/dsdmo/gargle.c +@@ -0,0 +1,397 @@ ++/* ++ * Copyright 2019 Alistair Leslie-Hughes ++ * ++ * 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 ++ */ ++#define COBJMACROS ++ ++#include "dsdmo_private.h" ++ ++WINE_DEFAULT_DEBUG_CHANNEL(dsdmo); ++ ++struct dmo_garglefx ++{ ++ IDirectSoundFXGargle IDirectSoundFXGargle_iface; ++ IMediaObject IMediaObject_iface; ++ IMediaObjectInPlace IMediaObjectInPlace_iface; ++ LONG ref; ++}; ++ ++static inline struct dmo_garglefx *impl_from_IDirectSoundFXGargle(IDirectSoundFXGargle *iface) ++{ ++ return CONTAINING_RECORD(iface, struct dmo_garglefx, IDirectSoundFXGargle_iface); ++} ++ ++static inline struct dmo_garglefx *impl_from_IMediaObject(IMediaObject *iface) ++{ ++ return CONTAINING_RECORD(iface, struct dmo_garglefx, IMediaObject_iface); ++} ++ ++static inline struct dmo_garglefx *impl_from_IMediaObjectInPlace(IMediaObjectInPlace *iface) ++{ ++ return CONTAINING_RECORD(iface, struct dmo_garglefx, IMediaObjectInPlace_iface); ++} ++ ++static HRESULT WINAPI gargle_mediaobj_QueryInterface(IMediaObject *iface, REFIID riid, void **obj) ++{ ++ struct dmo_garglefx *This = impl_from_IMediaObject(iface); ++ return IDirectSoundFXGargle_QueryInterface(&This->IDirectSoundFXGargle_iface, riid, obj); ++} ++ ++static ULONG WINAPI gargle_mediaobj_AddRef(IMediaObject *iface) ++{ ++ struct dmo_garglefx *This = impl_from_IMediaObject(iface); ++ return IDirectSoundFXGargle_AddRef(&This->IDirectSoundFXGargle_iface); ++} ++ ++static ULONG WINAPI gargle_mediaobj_Release(IMediaObject *iface) ++{ ++ struct dmo_garglefx *This = impl_from_IMediaObject(iface); ++ return IDirectSoundFXGargle_Release(&This->IDirectSoundFXGargle_iface); ++} ++ ++static HRESULT WINAPI gargle_mediaobj_GetStreamCount(IMediaObject *iface, DWORD *inputs, DWORD *outputs) ++{ ++ struct dmo_garglefx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %p, %p\n", This, inputs, outputs); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI gargle_mediaobj_GetInputStreamInfo(IMediaObject *iface, DWORD index, DWORD *flags) ++{ ++ struct dmo_garglefx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p\n", This, index, flags); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI gargle_mediaobj_GetOutputStreamInfo(IMediaObject *iface, DWORD index, DWORD *flags) ++{ ++ struct dmo_garglefx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p\n", This, index, flags); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI gargle_mediaobj_GetInputType(IMediaObject *iface, DWORD index, DWORD type, DMO_MEDIA_TYPE *pmt) ++{ ++ struct dmo_garglefx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %d, %p\n", This, index, type, pmt); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI gargle_mediaobj_GetOutputType(IMediaObject *iface, DWORD index, DWORD type, DMO_MEDIA_TYPE *pmt) ++{ ++ struct dmo_garglefx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %d, %p\n", This, index, type, pmt); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI gargle_mediaobj_SetInputType(IMediaObject *iface, DWORD index, const DMO_MEDIA_TYPE *pmt, DWORD flags) ++{ ++ struct dmo_garglefx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p, %x\n", This, index, pmt, flags); ++ return S_OK; ++} ++ ++static HRESULT WINAPI gargle_mediaobj_SetOutputType(IMediaObject *iface, DWORD index, const DMO_MEDIA_TYPE *pmt, DWORD flags) ++{ ++ struct dmo_garglefx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p, %x\n", This, index, pmt, flags); ++ return S_OK; ++} ++ ++static HRESULT WINAPI gargle_mediaobj_GetInputCurrentType(IMediaObject *iface, DWORD index, DMO_MEDIA_TYPE *pmt) ++{ ++ struct dmo_garglefx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p\n", This, index, pmt); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI gargle_mediaobj_GetOutputCurrentType(IMediaObject *iface, DWORD index, DMO_MEDIA_TYPE *pmt) ++{ ++ struct dmo_garglefx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p\n", This, index, pmt); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI gargle_mediaobj_GetInputSizeInfo(IMediaObject *iface, DWORD index, DWORD *size, DWORD *ahead, DWORD *alignment) ++{ ++ struct dmo_garglefx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p, %p, %p\n", This, index, size, ahead, alignment); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI gargle_mediaobj_GetOutputSizeInfo(IMediaObject *iface, DWORD index, DWORD *size, DWORD *alignment) ++{ ++ struct dmo_garglefx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p, %p\n", This, index, size, alignment); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI gargle_mediaobj_GetInputMaxLatency(IMediaObject *iface, DWORD index, REFERENCE_TIME *latency) ++{ ++ struct dmo_garglefx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p\n", This, index, latency); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI gargle_mediaobj_SetInputMaxLatency(IMediaObject *iface, DWORD index, REFERENCE_TIME latency) ++{ ++ struct dmo_garglefx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %s\n", This, index, wine_dbgstr_longlong(latency)); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI gargle_mediaobj_Flush(IMediaObject *iface) ++{ ++ struct dmo_garglefx *This = impl_from_IMediaObject(iface); ++ FIXME("%p\n", This); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI gargle_mediaobj_Discontinuity(IMediaObject *iface, DWORD index) ++{ ++ struct dmo_garglefx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d\n", This, index); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI gargle_mediaobj_AllocateStreamingResources(IMediaObject *iface) ++{ ++ struct dmo_garglefx *This = impl_from_IMediaObject(iface); ++ FIXME("%p\n", This); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI gargle_mediaobj_FreeStreamingResources(IMediaObject *iface) ++{ ++ struct dmo_garglefx *This = impl_from_IMediaObject(iface); ++ FIXME("%p\n", This); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI gargle_mediaobj_GetInputStatus(IMediaObject *iface, DWORD index, DWORD *flags) ++{ ++ struct dmo_garglefx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p\n", This, index, flags); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI gargle_mediaobj_ProcessInput(IMediaObject *iface, DWORD index, IMediaBuffer *buffer, ++ DWORD flags, REFERENCE_TIME timestamp, REFERENCE_TIME length) ++{ ++ struct dmo_garglefx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p, %x, %s, %s\n", This, index, buffer, flags, wine_dbgstr_longlong(timestamp), wine_dbgstr_longlong(length)); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI gargle_mediaobj_ProcessOutput(IMediaObject *iface, DWORD flags, DWORD count, ++ DMO_OUTPUT_DATA_BUFFER *buffers, DWORD *status) ++{ ++ struct dmo_garglefx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %x, %d, %p, %p\n", This, flags, count, buffers, status); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI gargle_mediaobj_Lock(IMediaObject *iface, LONG lock) ++{ ++ struct dmo_garglefx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d\n", This, lock); ++ return E_NOTIMPL; ++} ++ ++static const IMediaObjectVtbl gargle_mediaobjectVtbl = ++{ ++ gargle_mediaobj_QueryInterface, ++ gargle_mediaobj_AddRef, ++ gargle_mediaobj_Release, ++ gargle_mediaobj_GetStreamCount, ++ gargle_mediaobj_GetInputStreamInfo, ++ gargle_mediaobj_GetOutputStreamInfo, ++ gargle_mediaobj_GetInputType, ++ gargle_mediaobj_GetOutputType, ++ gargle_mediaobj_SetInputType, ++ gargle_mediaobj_SetOutputType, ++ gargle_mediaobj_GetInputCurrentType, ++ gargle_mediaobj_GetOutputCurrentType, ++ gargle_mediaobj_GetInputSizeInfo, ++ gargle_mediaobj_GetOutputSizeInfo, ++ gargle_mediaobj_GetInputMaxLatency, ++ gargle_mediaobj_SetInputMaxLatency, ++ gargle_mediaobj_Flush, ++ gargle_mediaobj_Discontinuity, ++ gargle_mediaobj_AllocateStreamingResources, ++ gargle_mediaobj_FreeStreamingResources, ++ gargle_mediaobj_GetInputStatus, ++ gargle_mediaobj_ProcessInput, ++ gargle_mediaobj_ProcessOutput, ++ gargle_mediaobj_Lock ++}; ++ ++static HRESULT WINAPI gargle_mediainplace_QueryInterface(IMediaObjectInPlace *iface, REFIID riid, void **obj) ++{ ++ struct dmo_garglefx *This = impl_from_IMediaObjectInPlace(iface); ++ return IDirectSoundFXGargle_QueryInterface(&This->IDirectSoundFXGargle_iface, riid, obj); ++} ++ ++static ULONG WINAPI gargle_mediainplace_AddRef(IMediaObjectInPlace *iface) ++{ ++ struct dmo_garglefx *This = impl_from_IMediaObjectInPlace(iface); ++ return IDirectSoundFXGargle_AddRef(&This->IDirectSoundFXGargle_iface); ++} ++ ++static ULONG WINAPI gargle_mediainplace_Release(IMediaObjectInPlace *iface) ++{ ++ struct dmo_garglefx *This = impl_from_IMediaObjectInPlace(iface); ++ return IDirectSoundFXGargle_Release(&This->IDirectSoundFXGargle_iface); ++} ++ ++static HRESULT WINAPI gargle_mediainplace_Process(IMediaObjectInPlace *iface, ULONG size, BYTE *data, REFERENCE_TIME start, DWORD flags) ++{ ++ struct dmo_garglefx *This = impl_from_IMediaObjectInPlace(iface); ++ static BOOL once = 0; ++ if(!once++) ++ FIXME("%p, %d, %p, %s, %x\n", This, size, data, wine_dbgstr_longlong(start), flags); ++ else ++ TRACE("%p, %d, %p, %s, %x\n", This, size, data, wine_dbgstr_longlong(start), flags); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI gargle_mediainplace_Clone(IMediaObjectInPlace *iface, IMediaObjectInPlace **object) ++{ ++ struct dmo_garglefx *This = impl_from_IMediaObjectInPlace(iface); ++ FIXME("%p, %p\n", This, object); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI gargle_mediainplace_GetLatency(IMediaObjectInPlace *iface, REFERENCE_TIME *latency) ++{ ++ struct dmo_garglefx *This = impl_from_IMediaObjectInPlace(iface); ++ FIXME("%p, %p\n", This, latency); ++ return E_NOTIMPL; ++} ++ ++static const IMediaObjectInPlaceVtbl gargle_mediainplaceVtbl = ++{ ++ gargle_mediainplace_QueryInterface, ++ gargle_mediainplace_AddRef, ++ gargle_mediainplace_Release, ++ gargle_mediainplace_Process, ++ gargle_mediainplace_Clone, ++ gargle_mediainplace_GetLatency ++}; ++ ++static HRESULT WINAPI garglefx_QueryInterface(IDirectSoundFXGargle *iface, REFIID riid, void **ppv) ++{ ++ struct dmo_garglefx *This = impl_from_IDirectSoundFXGargle(iface); ++ ++ TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv); ++ ++ if (IsEqualGUID(riid, &IID_IUnknown) || ++ IsEqualGUID(riid, &IID_IDirectSoundFXGargle)) ++ { ++ *ppv = &This->IDirectSoundFXGargle_iface; ++ } ++ else if(IsEqualGUID(riid, &IID_IMediaObject)) ++ { ++ *ppv = &This->IMediaObject_iface; ++ } ++ else if(IsEqualGUID(riid, &IID_IMediaObjectInPlace)) ++ { ++ *ppv = &This->IMediaObjectInPlace_iface; ++ } ++ ++ if(!*ppv) ++ { ++ FIXME("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppv); ++ return E_NOINTERFACE; ++ } ++ ++ IUnknown_AddRef((IUnknown*)*ppv); ++ ++ return S_OK; ++} ++ ++static ULONG WINAPI garglefx_AddRef(IDirectSoundFXGargle *iface) ++{ ++ struct dmo_garglefx *This = impl_from_IDirectSoundFXGargle(iface); ++ ULONG ref = InterlockedIncrement(&This->ref); ++ ++ TRACE("(%p) ref=%u\n", This, ref); ++ ++ return ref; ++} ++ ++static ULONG WINAPI garglefx_Release(IDirectSoundFXGargle *iface) ++{ ++ struct dmo_garglefx *This = impl_from_IDirectSoundFXGargle(iface); ++ ULONG ref = InterlockedDecrement(&This->ref); ++ ++ TRACE("(%p) ref=%u\n", This, ref); ++ ++ if (!ref) ++ { ++ heap_free(This); ++ } ++ return ref; ++} ++ ++static HRESULT WINAPI garglefx_SetAllParameters(IDirectSoundFXGargle *iface, const DSFXGargle *gargle) ++{ ++ struct dmo_garglefx *This = impl_from_IDirectSoundFXGargle(iface); ++ FIXME("(%p) %p\n", This, gargle); ++ ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI garglefx_GetAllParameters(IDirectSoundFXGargle *iface, DSFXGargle *gargle) ++{ ++ struct dmo_garglefx *This = impl_from_IDirectSoundFXGargle(iface); ++ FIXME("(%p) %p\n", This, gargle); ++ ++ return E_NOTIMPL; ++} ++ ++static const struct IDirectSoundFXGargleVtbl garglefxVtbl = ++{ ++ garglefx_QueryInterface, ++ garglefx_AddRef, ++ garglefx_Release, ++ garglefx_SetAllParameters, ++ garglefx_GetAllParameters ++}; ++ ++HRESULT WINAPI GargleFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) ++{ ++ struct dmo_garglefx *object; ++ HRESULT ret; ++ ++ TRACE("(%p, %s, %p)\n", outer, debugstr_guid(riid), ppv); ++ ++ *ppv = NULL; ++ ++ object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); ++ if (!object) ++ return E_OUTOFMEMORY; ++ ++ object->IDirectSoundFXGargle_iface.lpVtbl = &garglefxVtbl; ++ object->IMediaObject_iface.lpVtbl = &gargle_mediaobjectVtbl; ++ object->IMediaObjectInPlace_iface.lpVtbl = &gargle_mediainplaceVtbl; ++ object->ref = 1; ++ ++ ret = garglefx_QueryInterface(&object->IDirectSoundFXGargle_iface, riid, ppv); ++ garglefx_Release(&object->IDirectSoundFXGargle_iface); ++ ++ return ret; ++} +diff --git a/dlls/dsdmo/main.c b/dlls/dsdmo/main.c +index 0e185fa1e1..82a0a12831 100644 +--- a/dlls/dsdmo/main.c ++++ b/dlls/dsdmo/main.c +@@ -126,11 +126,20 @@ static const IClassFactoryVtbl FlangerFactoryVtbl = { + ClassFactory_LockServer + }; + ++static const IClassFactoryVtbl GargleFactoryVtbl = { ++ ClassFactory_QueryInterface, ++ ClassFactory_AddRef, ++ ClassFactory_Release, ++ GargleFactory_CreateInstance, ++ ClassFactory_LockServer ++}; ++ + static IClassFactory echofx_factory = { &EchoFactoryVtbl }; + static IClassFactory chorusfx_factory = { &ChrousFactoryVtbl }; + static IClassFactory compressorfx_factory = { &CompressorFactoryVtbl }; + static IClassFactory distortionfx_factory = { &DistortionFactoryVtbl }; + static IClassFactory flangerfx_factory = { &FlangerFactoryVtbl }; ++static IClassFactory garglefx_factory = { &GargleFactoryVtbl }; + + /*********************************************************************** + * DllGetClassObject +@@ -164,6 +173,11 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) + TRACE("GUID_DSFX_STANDARD_FLANGER\n"); + return IClassFactory_QueryInterface(&flangerfx_factory, riid, ppv); + } ++ else if(IsEqualGUID(&GUID_DSFX_STANDARD_GARGLE, rclsid)) ++ { ++ TRACE("GUID_DSFX_STANDARD_GARGLE\n"); ++ return IClassFactory_QueryInterface(&garglefx_factory, riid, ppv); ++ } + + FIXME("%s %s %p\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); + return CLASS_E_CLASSNOTAVAILABLE; +-- +2.17.1 + diff --git a/patches/dsdmo-new-dll/0008-dsdmo-Add-IDirectSoundFXParamEq-support.patch b/patches/dsdmo-new-dll/0008-dsdmo-Add-IDirectSoundFXParamEq-support.patch new file mode 100644 index 00000000..be5c0000 --- /dev/null +++ b/patches/dsdmo-new-dll/0008-dsdmo-Add-IDirectSoundFXParamEq-support.patch @@ -0,0 +1,500 @@ +From 5a76d7c7f2460dc788bb5cc67a8306ed2943caf7 Mon Sep 17 00:00:00 2001 +From: Alistair Leslie-Hughes +Date: Mon, 26 Aug 2019 09:11:30 +1000 +Subject: [PATCH 08/27] dsdmo: Add IDirectSoundFXParamEq support + +--- + dlls/dsdmo/Makefile.in | 3 +- + dlls/dsdmo/dsdmo_classes.idl | 10 + + dlls/dsdmo/dsdmo_private.h | 1 + + dlls/dsdmo/main.c | 14 ++ + dlls/dsdmo/parameq.c | 397 +++++++++++++++++++++++++++++++++++ + 5 files changed, 424 insertions(+), 1 deletion(-) + create mode 100644 dlls/dsdmo/parameq.c + +diff --git a/dlls/dsdmo/Makefile.in b/dlls/dsdmo/Makefile.in +index 24b53f03ae..da7f3d719a 100644 +--- a/dlls/dsdmo/Makefile.in ++++ b/dlls/dsdmo/Makefile.in +@@ -9,6 +9,7 @@ C_SRCS = \ + echo.c \ + flanger.c \ + gargle.c \ +- main.c ++ main.c \ ++ parameq.c + + IDL_SRCS = dsdmo_classes.idl +diff --git a/dlls/dsdmo/dsdmo_classes.idl b/dlls/dsdmo/dsdmo_classes.idl +index f114f4831b..9d8adb5c1a 100644 +--- a/dlls/dsdmo/dsdmo_classes.idl ++++ b/dlls/dsdmo/dsdmo_classes.idl +@@ -76,3 +76,13 @@ coclass DirectSoundFlangerDMO + coclass DirectSoundGargleDMO + { + } ++ ++[ ++ uuid(120ced89-3bf4-4173-a132-3cb406cf3231), ++ threading(both), ++ progid("Microsoft.DirectSoundParamEqDMO.1"), ++ vi_progid("Microsoft.DirectSoundParamEqDMO") ++] ++coclass DirectSoundParamEqDMO ++{ ++} +diff --git a/dlls/dsdmo/dsdmo_private.h b/dlls/dsdmo/dsdmo_private.h +index 313c66ba3d..28ac94b726 100644 +--- a/dlls/dsdmo/dsdmo_private.h ++++ b/dlls/dsdmo/dsdmo_private.h +@@ -33,5 +33,6 @@ extern HRESULT WINAPI CompressorFactory_CreateInstance(IClassFactory *iface, IUn + extern HRESULT WINAPI DistortionFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) DECLSPEC_HIDDEN; + extern HRESULT WINAPI FlangerFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) DECLSPEC_HIDDEN; + extern HRESULT WINAPI GargleFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) DECLSPEC_HIDDEN; ++extern HRESULT WINAPI ParamEqFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) DECLSPEC_HIDDEN; + + #endif +diff --git a/dlls/dsdmo/main.c b/dlls/dsdmo/main.c +index 82a0a12831..1aadb1d74f 100644 +--- a/dlls/dsdmo/main.c ++++ b/dlls/dsdmo/main.c +@@ -134,12 +134,21 @@ static const IClassFactoryVtbl GargleFactoryVtbl = { + ClassFactory_LockServer + }; + ++static const IClassFactoryVtbl ParamEqFactoryVtbl = { ++ ClassFactory_QueryInterface, ++ ClassFactory_AddRef, ++ ClassFactory_Release, ++ ParamEqFactory_CreateInstance, ++ ClassFactory_LockServer ++}; ++ + static IClassFactory echofx_factory = { &EchoFactoryVtbl }; + static IClassFactory chorusfx_factory = { &ChrousFactoryVtbl }; + static IClassFactory compressorfx_factory = { &CompressorFactoryVtbl }; + static IClassFactory distortionfx_factory = { &DistortionFactoryVtbl }; + static IClassFactory flangerfx_factory = { &FlangerFactoryVtbl }; + static IClassFactory garglefx_factory = { &GargleFactoryVtbl }; ++static IClassFactory parameqfx_factory = { &ParamEqFactoryVtbl }; + + /*********************************************************************** + * DllGetClassObject +@@ -178,6 +187,11 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) + TRACE("GUID_DSFX_STANDARD_GARGLE\n"); + return IClassFactory_QueryInterface(&garglefx_factory, riid, ppv); + } ++ else if(IsEqualGUID(&GUID_DSFX_STANDARD_PARAMEQ, rclsid)) ++ { ++ TRACE("GUID_DSFX_STANDARD_PARAMEQ\n"); ++ return IClassFactory_QueryInterface(¶meqfx_factory, riid, ppv); ++ } + + FIXME("%s %s %p\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); + return CLASS_E_CLASSNOTAVAILABLE; +diff --git a/dlls/dsdmo/parameq.c b/dlls/dsdmo/parameq.c +new file mode 100644 +index 0000000000..dc6d84fa08 +--- /dev/null ++++ b/dlls/dsdmo/parameq.c +@@ -0,0 +1,397 @@ ++/* ++ * Copyright 2019 Alistair Leslie-Hughes ++ * ++ * 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 ++ */ ++#define COBJMACROS ++ ++#include "dsdmo_private.h" ++ ++WINE_DEFAULT_DEBUG_CHANNEL(dsdmo); ++ ++struct dmo_parameqfx ++{ ++ IDirectSoundFXParamEq IDirectSoundFXParamEq_iface; ++ IMediaObject IMediaObject_iface; ++ IMediaObjectInPlace IMediaObjectInPlace_iface; ++ LONG ref; ++}; ++ ++static inline struct dmo_parameqfx *impl_from_IDirectSoundFXParamEq(IDirectSoundFXParamEq *iface) ++{ ++ return CONTAINING_RECORD(iface, struct dmo_parameqfx, IDirectSoundFXParamEq_iface); ++} ++ ++static inline struct dmo_parameqfx *impl_from_IMediaObject(IMediaObject *iface) ++{ ++ return CONTAINING_RECORD(iface, struct dmo_parameqfx, IMediaObject_iface); ++} ++ ++static inline struct dmo_parameqfx *impl_from_IMediaObjectInPlace(IMediaObjectInPlace *iface) ++{ ++ return CONTAINING_RECORD(iface, struct dmo_parameqfx, IMediaObjectInPlace_iface); ++} ++ ++static HRESULT WINAPI parameq_mediaobj_QueryInterface(IMediaObject *iface, REFIID riid, void **obj) ++{ ++ struct dmo_parameqfx *This = impl_from_IMediaObject(iface); ++ return IDirectSoundFXParamEq_QueryInterface(&This->IDirectSoundFXParamEq_iface, riid, obj); ++} ++ ++static ULONG WINAPI parameq_mediaobj_AddRef(IMediaObject *iface) ++{ ++ struct dmo_parameqfx *This = impl_from_IMediaObject(iface); ++ return IDirectSoundFXParamEq_AddRef(&This->IDirectSoundFXParamEq_iface); ++} ++ ++static ULONG WINAPI parameq_mediaobj_Release(IMediaObject *iface) ++{ ++ struct dmo_parameqfx *This = impl_from_IMediaObject(iface); ++ return IDirectSoundFXParamEq_Release(&This->IDirectSoundFXParamEq_iface); ++} ++ ++static HRESULT WINAPI parameq_mediaobj_GetStreamCount(IMediaObject *iface, DWORD *inputs, DWORD *outputs) ++{ ++ struct dmo_parameqfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %p, %p\n", This, inputs, outputs); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI parameq_mediaobj_GetInputStreamInfo(IMediaObject *iface, DWORD index, DWORD *flags) ++{ ++ struct dmo_parameqfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p\n", This, index, flags); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI parameq_mediaobj_GetOutputStreamInfo(IMediaObject *iface, DWORD index, DWORD *flags) ++{ ++ struct dmo_parameqfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p\n", This, index, flags); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI parameq_mediaobj_GetInputType(IMediaObject *iface, DWORD index, DWORD type, DMO_MEDIA_TYPE *pmt) ++{ ++ struct dmo_parameqfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %d, %p\n", This, index, type, pmt); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI parameq_mediaobj_GetOutputType(IMediaObject *iface, DWORD index, DWORD type, DMO_MEDIA_TYPE *pmt) ++{ ++ struct dmo_parameqfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %d, %p\n", This, index, type, pmt); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI parameq_mediaobj_SetInputType(IMediaObject *iface, DWORD index, const DMO_MEDIA_TYPE *pmt, DWORD flags) ++{ ++ struct dmo_parameqfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p, %x\n", This, index, pmt, flags); ++ return S_OK; ++} ++ ++static HRESULT WINAPI parameq_mediaobj_SetOutputType(IMediaObject *iface, DWORD index, const DMO_MEDIA_TYPE *pmt, DWORD flags) ++{ ++ struct dmo_parameqfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p, %x\n", This, index, pmt, flags); ++ return S_OK; ++} ++ ++static HRESULT WINAPI parameq_mediaobj_GetInputCurrentType(IMediaObject *iface, DWORD index, DMO_MEDIA_TYPE *pmt) ++{ ++ struct dmo_parameqfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p\n", This, index, pmt); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI parameq_mediaobj_GetOutputCurrentType(IMediaObject *iface, DWORD index, DMO_MEDIA_TYPE *pmt) ++{ ++ struct dmo_parameqfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p\n", This, index, pmt); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI parameq_mediaobj_GetInputSizeInfo(IMediaObject *iface, DWORD index, DWORD *size, DWORD *ahead, DWORD *alignment) ++{ ++ struct dmo_parameqfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p, %p, %p\n", This, index, size, ahead, alignment); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI parameq_mediaobj_GetOutputSizeInfo(IMediaObject *iface, DWORD index, DWORD *size, DWORD *alignment) ++{ ++ struct dmo_parameqfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p, %p\n", This, index, size, alignment); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI parameq_mediaobj_GetInputMaxLatency(IMediaObject *iface, DWORD index, REFERENCE_TIME *latency) ++{ ++ struct dmo_parameqfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p\n", This, index, latency); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI parameq_mediaobj_SetInputMaxLatency(IMediaObject *iface, DWORD index, REFERENCE_TIME latency) ++{ ++ struct dmo_parameqfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %s\n", This, index, wine_dbgstr_longlong(latency)); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI parameq_mediaobj_Flush(IMediaObject *iface) ++{ ++ struct dmo_parameqfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p\n", This); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI parameq_mediaobj_Discontinuity(IMediaObject *iface, DWORD index) ++{ ++ struct dmo_parameqfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d\n", This, index); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI parameq_mediaobj_AllocateStreamingResources(IMediaObject *iface) ++{ ++ struct dmo_parameqfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p\n", This); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI parameq_mediaobj_FreeStreamingResources(IMediaObject *iface) ++{ ++ struct dmo_parameqfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p\n", This); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI parameq_mediaobj_GetInputStatus(IMediaObject *iface, DWORD index, DWORD *flags) ++{ ++ struct dmo_parameqfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p\n", This, index, flags); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI parameq_mediaobj_ProcessInput(IMediaObject *iface, DWORD index, IMediaBuffer *buffer, ++ DWORD flags, REFERENCE_TIME timestamp, REFERENCE_TIME length) ++{ ++ struct dmo_parameqfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p, %x, %s, %s\n", This, index, buffer, flags, wine_dbgstr_longlong(timestamp), wine_dbgstr_longlong(length)); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI parameq_mediaobj_ProcessOutput(IMediaObject *iface, DWORD flags, DWORD count, ++ DMO_OUTPUT_DATA_BUFFER *buffers, DWORD *status) ++{ ++ struct dmo_parameqfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %x, %d, %p, %p\n", This, flags, count, buffers, status); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI parameq_mediaobj_Lock(IMediaObject *iface, LONG lock) ++{ ++ struct dmo_parameqfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d\n", This, lock); ++ return E_NOTIMPL; ++} ++ ++static const IMediaObjectVtbl parameq_mediaobjectVtbl = ++{ ++ parameq_mediaobj_QueryInterface, ++ parameq_mediaobj_AddRef, ++ parameq_mediaobj_Release, ++ parameq_mediaobj_GetStreamCount, ++ parameq_mediaobj_GetInputStreamInfo, ++ parameq_mediaobj_GetOutputStreamInfo, ++ parameq_mediaobj_GetInputType, ++ parameq_mediaobj_GetOutputType, ++ parameq_mediaobj_SetInputType, ++ parameq_mediaobj_SetOutputType, ++ parameq_mediaobj_GetInputCurrentType, ++ parameq_mediaobj_GetOutputCurrentType, ++ parameq_mediaobj_GetInputSizeInfo, ++ parameq_mediaobj_GetOutputSizeInfo, ++ parameq_mediaobj_GetInputMaxLatency, ++ parameq_mediaobj_SetInputMaxLatency, ++ parameq_mediaobj_Flush, ++ parameq_mediaobj_Discontinuity, ++ parameq_mediaobj_AllocateStreamingResources, ++ parameq_mediaobj_FreeStreamingResources, ++ parameq_mediaobj_GetInputStatus, ++ parameq_mediaobj_ProcessInput, ++ parameq_mediaobj_ProcessOutput, ++ parameq_mediaobj_Lock ++}; ++ ++static HRESULT WINAPI parameq_mediainplace_QueryInterface(IMediaObjectInPlace *iface, REFIID riid, void **obj) ++{ ++ struct dmo_parameqfx *This = impl_from_IMediaObjectInPlace(iface); ++ return IDirectSoundFXParamEq_QueryInterface(&This->IDirectSoundFXParamEq_iface, riid, obj); ++} ++ ++static ULONG WINAPI parameq_mediainplace_AddRef(IMediaObjectInPlace *iface) ++{ ++ struct dmo_parameqfx *This = impl_from_IMediaObjectInPlace(iface); ++ return IDirectSoundFXParamEq_AddRef(&This->IDirectSoundFXParamEq_iface); ++} ++ ++static ULONG WINAPI parameq_mediainplace_Release(IMediaObjectInPlace *iface) ++{ ++ struct dmo_parameqfx *This = impl_from_IMediaObjectInPlace(iface); ++ return IDirectSoundFXParamEq_Release(&This->IDirectSoundFXParamEq_iface); ++} ++ ++static HRESULT WINAPI parameq_mediainplace_Process(IMediaObjectInPlace *iface, ULONG size, BYTE *data, REFERENCE_TIME start, DWORD flags) ++{ ++ struct dmo_parameqfx *This = impl_from_IMediaObjectInPlace(iface); ++ static BOOL once = 0; ++ if(!once++) ++ FIXME("%p, %d, %p, %s, %x\n", This, size, data, wine_dbgstr_longlong(start), flags); ++ else ++ TRACE("%p, %d, %p, %s, %x\n", This, size, data, wine_dbgstr_longlong(start), flags); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI parameq_mediainplace_Clone(IMediaObjectInPlace *iface, IMediaObjectInPlace **object) ++{ ++ struct dmo_parameqfx *This = impl_from_IMediaObjectInPlace(iface); ++ FIXME("%p, %p\n", This, object); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI parameq_mediainplace_GetLatency(IMediaObjectInPlace *iface, REFERENCE_TIME *latency) ++{ ++ struct dmo_parameqfx *This = impl_from_IMediaObjectInPlace(iface); ++ FIXME("%p, %p\n", This, latency); ++ return E_NOTIMPL; ++} ++ ++static const IMediaObjectInPlaceVtbl parameq_mediainplaceVtbl = ++{ ++ parameq_mediainplace_QueryInterface, ++ parameq_mediainplace_AddRef, ++ parameq_mediainplace_Release, ++ parameq_mediainplace_Process, ++ parameq_mediainplace_Clone, ++ parameq_mediainplace_GetLatency ++}; ++ ++static HRESULT WINAPI parameqfx_QueryInterface(IDirectSoundFXParamEq *iface, REFIID riid, void **ppv) ++{ ++ struct dmo_parameqfx *This = impl_from_IDirectSoundFXParamEq(iface); ++ ++ TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv); ++ ++ if (IsEqualGUID(riid, &IID_IUnknown) || ++ IsEqualGUID(riid, &IID_IDirectSoundFXParamEq)) ++ { ++ *ppv = &This->IDirectSoundFXParamEq_iface; ++ } ++ else if(IsEqualGUID(riid, &IID_IMediaObject)) ++ { ++ *ppv = &This->IMediaObject_iface; ++ } ++ else if(IsEqualGUID(riid, &IID_IMediaObjectInPlace)) ++ { ++ *ppv = &This->IMediaObjectInPlace_iface; ++ } ++ ++ if(!*ppv) ++ { ++ FIXME("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppv); ++ return E_NOINTERFACE; ++ } ++ ++ IUnknown_AddRef((IUnknown*)*ppv); ++ ++ return S_OK; ++} ++ ++static ULONG WINAPI parameqfx_AddRef(IDirectSoundFXParamEq *iface) ++{ ++ struct dmo_parameqfx *This = impl_from_IDirectSoundFXParamEq(iface); ++ ULONG ref = InterlockedIncrement(&This->ref); ++ ++ TRACE("(%p) ref=%u\n", This, ref); ++ ++ return ref; ++} ++ ++static ULONG WINAPI parameqfx_Release(IDirectSoundFXParamEq *iface) ++{ ++ struct dmo_parameqfx *This = impl_from_IDirectSoundFXParamEq(iface); ++ ULONG ref = InterlockedDecrement(&This->ref); ++ ++ TRACE("(%p) ref=%u\n", This, ref); ++ ++ if (!ref) ++ { ++ heap_free(This); ++ } ++ return ref; ++} ++ ++static HRESULT WINAPI parameqfx_SetAllParameters(IDirectSoundFXParamEq *iface, const DSFXParamEq *param) ++{ ++ struct dmo_parameqfx *This = impl_from_IDirectSoundFXParamEq(iface); ++ FIXME("(%p) %p\n", This, param); ++ ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI parameqfx_GetAllParameters(IDirectSoundFXParamEq *iface, DSFXParamEq *param) ++{ ++ struct dmo_parameqfx *This = impl_from_IDirectSoundFXParamEq(iface); ++ FIXME("(%p) %p\n", This, param); ++ ++ return E_NOTIMPL; ++} ++ ++static const struct IDirectSoundFXParamEqVtbl parameqfxVtbl = ++{ ++ parameqfx_QueryInterface, ++ parameqfx_AddRef, ++ parameqfx_Release, ++ parameqfx_SetAllParameters, ++ parameqfx_GetAllParameters ++}; ++ ++HRESULT WINAPI ParamEqFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) ++{ ++ struct dmo_parameqfx *object; ++ HRESULT ret; ++ ++ TRACE("(%p, %s, %p)\n", outer, debugstr_guid(riid), ppv); ++ ++ *ppv = NULL; ++ ++ object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); ++ if (!object) ++ return E_OUTOFMEMORY; ++ ++ object->IDirectSoundFXParamEq_iface.lpVtbl = ¶meqfxVtbl; ++ object->IMediaObject_iface.lpVtbl = ¶meq_mediaobjectVtbl; ++ object->IMediaObjectInPlace_iface.lpVtbl = ¶meq_mediainplaceVtbl; ++ object->ref = 1; ++ ++ ret = parameqfx_QueryInterface(&object->IDirectSoundFXParamEq_iface, riid, ppv); ++ parameqfx_Release(&object->IDirectSoundFXParamEq_iface); ++ ++ return ret; ++} +-- +2.17.1 + diff --git a/patches/dsdmo-new-dll/0009-dsdmo-Add-IDirectSoundFXWavesReverb-support.patch b/patches/dsdmo-new-dll/0009-dsdmo-Add-IDirectSoundFXWavesReverb-support.patch new file mode 100644 index 00000000..86b8dce9 --- /dev/null +++ b/patches/dsdmo-new-dll/0009-dsdmo-Add-IDirectSoundFXWavesReverb-support.patch @@ -0,0 +1,501 @@ +From 42190f4d749db861feabd4678a282e97827d78fb Mon Sep 17 00:00:00 2001 +From: Alistair Leslie-Hughes +Date: Mon, 26 Aug 2019 09:21:32 +1000 +Subject: [PATCH 09/27] dsdmo: Add IDirectSoundFXWavesReverb support + +--- + dlls/dsdmo/Makefile.in | 3 +- + dlls/dsdmo/dsdmo_classes.idl | 10 + + dlls/dsdmo/dsdmo_private.h | 1 + + dlls/dsdmo/main.c | 14 ++ + dlls/dsdmo/reverb.c | 397 +++++++++++++++++++++++++++++++++++ + 5 files changed, 424 insertions(+), 1 deletion(-) + create mode 100644 dlls/dsdmo/reverb.c + +diff --git a/dlls/dsdmo/Makefile.in b/dlls/dsdmo/Makefile.in +index da7f3d719a..4e36fd165e 100644 +--- a/dlls/dsdmo/Makefile.in ++++ b/dlls/dsdmo/Makefile.in +@@ -10,6 +10,7 @@ C_SRCS = \ + flanger.c \ + gargle.c \ + main.c \ +- parameq.c ++ parameq.c \ ++ reverb.c + + IDL_SRCS = dsdmo_classes.idl +diff --git a/dlls/dsdmo/dsdmo_classes.idl b/dlls/dsdmo/dsdmo_classes.idl +index 9d8adb5c1a..bf54fc846c 100644 +--- a/dlls/dsdmo/dsdmo_classes.idl ++++ b/dlls/dsdmo/dsdmo_classes.idl +@@ -86,3 +86,13 @@ coclass DirectSoundGargleDMO + coclass DirectSoundParamEqDMO + { + } ++ ++[ ++ uuid(87fc0268-9a55-4360-95aa-004a1d9de26c), ++ threading(both), ++ progid("Microsoft.DirectSoundWavesReverbDMO.1"), ++ vi_progid("Microsoft.DirectSoundWavesReverbDMO") ++] ++coclass DirectSoundWavesReverbDMO ++{ ++} +diff --git a/dlls/dsdmo/dsdmo_private.h b/dlls/dsdmo/dsdmo_private.h +index 28ac94b726..667539f9ae 100644 +--- a/dlls/dsdmo/dsdmo_private.h ++++ b/dlls/dsdmo/dsdmo_private.h +@@ -34,5 +34,6 @@ extern HRESULT WINAPI DistortionFactory_CreateInstance(IClassFactory *iface, IUn + extern HRESULT WINAPI FlangerFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) DECLSPEC_HIDDEN; + extern HRESULT WINAPI GargleFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) DECLSPEC_HIDDEN; + extern HRESULT WINAPI ParamEqFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) DECLSPEC_HIDDEN; ++extern HRESULT WINAPI ReverbFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) DECLSPEC_HIDDEN; + + #endif +diff --git a/dlls/dsdmo/main.c b/dlls/dsdmo/main.c +index 1aadb1d74f..c7647101b1 100644 +--- a/dlls/dsdmo/main.c ++++ b/dlls/dsdmo/main.c +@@ -142,6 +142,14 @@ static const IClassFactoryVtbl ParamEqFactoryVtbl = { + ClassFactory_LockServer + }; + ++static const IClassFactoryVtbl ReverbFactoryVtbl = { ++ ClassFactory_QueryInterface, ++ ClassFactory_AddRef, ++ ClassFactory_Release, ++ ReverbFactory_CreateInstance, ++ ClassFactory_LockServer ++}; ++ + static IClassFactory echofx_factory = { &EchoFactoryVtbl }; + static IClassFactory chorusfx_factory = { &ChrousFactoryVtbl }; + static IClassFactory compressorfx_factory = { &CompressorFactoryVtbl }; +@@ -149,6 +157,7 @@ static IClassFactory distortionfx_factory = { &DistortionFactoryVtbl }; + static IClassFactory flangerfx_factory = { &FlangerFactoryVtbl }; + static IClassFactory garglefx_factory = { &GargleFactoryVtbl }; + static IClassFactory parameqfx_factory = { &ParamEqFactoryVtbl }; ++static IClassFactory reverbfx_factory = { &ReverbFactoryVtbl }; + + /*********************************************************************** + * DllGetClassObject +@@ -192,6 +201,11 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) + TRACE("GUID_DSFX_STANDARD_PARAMEQ\n"); + return IClassFactory_QueryInterface(¶meqfx_factory, riid, ppv); + } ++ else if(IsEqualGUID(&GUID_DSFX_WAVES_REVERB, rclsid)) ++ { ++ TRACE("GUID_DSFX_WAVES_REVERB\n"); ++ return IClassFactory_QueryInterface(&reverbfx_factory, riid, ppv); ++ } + + FIXME("%s %s %p\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); + return CLASS_E_CLASSNOTAVAILABLE; +diff --git a/dlls/dsdmo/reverb.c b/dlls/dsdmo/reverb.c +new file mode 100644 +index 0000000000..f3b894186e +--- /dev/null ++++ b/dlls/dsdmo/reverb.c +@@ -0,0 +1,397 @@ ++/* ++ * Copyright 2019 Alistair Leslie-Hughes ++ * ++ * 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 ++ */ ++#define COBJMACROS ++ ++#include "dsdmo_private.h" ++ ++WINE_DEFAULT_DEBUG_CHANNEL(dsdmo); ++ ++struct dmo_reverbfx ++{ ++ IDirectSoundFXWavesReverb IDirectSoundFXWavesReverb_iface; ++ IMediaObject IMediaObject_iface; ++ IMediaObjectInPlace IMediaObjectInPlace_iface; ++ LONG ref; ++}; ++ ++static inline struct dmo_reverbfx *impl_from_IDirectSoundFXWavesReverb(IDirectSoundFXWavesReverb *iface) ++{ ++ return CONTAINING_RECORD(iface, struct dmo_reverbfx, IDirectSoundFXWavesReverb_iface); ++} ++ ++static inline struct dmo_reverbfx *impl_from_IMediaObject(IMediaObject *iface) ++{ ++ return CONTAINING_RECORD(iface, struct dmo_reverbfx, IMediaObject_iface); ++} ++ ++static inline struct dmo_reverbfx *impl_from_IMediaObjectInPlace(IMediaObjectInPlace *iface) ++{ ++ return CONTAINING_RECORD(iface, struct dmo_reverbfx, IMediaObjectInPlace_iface); ++} ++ ++static HRESULT WINAPI reverb_mediaobj_QueryInterface(IMediaObject *iface, REFIID riid, void **obj) ++{ ++ struct dmo_reverbfx *This = impl_from_IMediaObject(iface); ++ return IDirectSoundFXWavesReverb_QueryInterface(&This->IDirectSoundFXWavesReverb_iface, riid, obj); ++} ++ ++static ULONG WINAPI reverb_mediaobj_AddRef(IMediaObject *iface) ++{ ++ struct dmo_reverbfx *This = impl_from_IMediaObject(iface); ++ return IDirectSoundFXWavesReverb_AddRef(&This->IDirectSoundFXWavesReverb_iface); ++} ++ ++static ULONG WINAPI reverb_mediaobj_Release(IMediaObject *iface) ++{ ++ struct dmo_reverbfx *This = impl_from_IMediaObject(iface); ++ return IDirectSoundFXWavesReverb_Release(&This->IDirectSoundFXWavesReverb_iface); ++} ++ ++static HRESULT WINAPI reverb_mediaobj_GetStreamCount(IMediaObject *iface, DWORD *inputs, DWORD *outputs) ++{ ++ struct dmo_reverbfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %p, %p\n", This, inputs, outputs); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI reverb_mediaobj_GetInputStreamInfo(IMediaObject *iface, DWORD index, DWORD *flags) ++{ ++ struct dmo_reverbfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p\n", This, index, flags); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI reverb_mediaobj_GetOutputStreamInfo(IMediaObject *iface, DWORD index, DWORD *flags) ++{ ++ struct dmo_reverbfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p\n", This, index, flags); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI reverb_mediaobj_GetInputType(IMediaObject *iface, DWORD index, DWORD type, DMO_MEDIA_TYPE *pmt) ++{ ++ struct dmo_reverbfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %d, %p\n", This, index, type, pmt); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI reverb_mediaobj_GetOutputType(IMediaObject *iface, DWORD index, DWORD type, DMO_MEDIA_TYPE *pmt) ++{ ++ struct dmo_reverbfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %d, %p\n", This, index, type, pmt); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI reverb_mediaobj_SetInputType(IMediaObject *iface, DWORD index, const DMO_MEDIA_TYPE *pmt, DWORD flags) ++{ ++ struct dmo_reverbfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p, %x\n", This, index, pmt, flags); ++ return S_OK; ++} ++ ++static HRESULT WINAPI reverb_mediaobj_SetOutputType(IMediaObject *iface, DWORD index, const DMO_MEDIA_TYPE *pmt, DWORD flags) ++{ ++ struct dmo_reverbfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p, %x\n", This, index, pmt, flags); ++ return S_OK; ++} ++ ++static HRESULT WINAPI reverb_mediaobj_GetInputCurrentType(IMediaObject *iface, DWORD index, DMO_MEDIA_TYPE *pmt) ++{ ++ struct dmo_reverbfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p\n", This, index, pmt); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI reverb_mediaobj_GetOutputCurrentType(IMediaObject *iface, DWORD index, DMO_MEDIA_TYPE *pmt) ++{ ++ struct dmo_reverbfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p\n", This, index, pmt); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI reverb_mediaobj_GetInputSizeInfo(IMediaObject *iface, DWORD index, DWORD *size, DWORD *ahead, DWORD *alignment) ++{ ++ struct dmo_reverbfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p, %p, %p\n", This, index, size, ahead, alignment); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI reverb_mediaobj_GetOutputSizeInfo(IMediaObject *iface, DWORD index, DWORD *size, DWORD *alignment) ++{ ++ struct dmo_reverbfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p, %p\n", This, index, size, alignment); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI reverb_mediaobj_GetInputMaxLatency(IMediaObject *iface, DWORD index, REFERENCE_TIME *latency) ++{ ++ struct dmo_reverbfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p\n", This, index, latency); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI reverb_mediaobj_SetInputMaxLatency(IMediaObject *iface, DWORD index, REFERENCE_TIME latency) ++{ ++ struct dmo_reverbfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %s\n", This, index, wine_dbgstr_longlong(latency)); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI reverb_mediaobj_Flush(IMediaObject *iface) ++{ ++ struct dmo_reverbfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p\n", This); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI reverb_mediaobj_Discontinuity(IMediaObject *iface, DWORD index) ++{ ++ struct dmo_reverbfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d\n", This, index); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI reverb_mediaobj_AllocateStreamingResources(IMediaObject *iface) ++{ ++ struct dmo_reverbfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p\n", This); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI reverb_mediaobj_FreeStreamingResources(IMediaObject *iface) ++{ ++ struct dmo_reverbfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p\n", This); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI reverb_mediaobj_GetInputStatus(IMediaObject *iface, DWORD index, DWORD *flags) ++{ ++ struct dmo_reverbfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p\n", This, index, flags); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI reverb_mediaobj_ProcessInput(IMediaObject *iface, DWORD index, IMediaBuffer *buffer, ++ DWORD flags, REFERENCE_TIME timestamp, REFERENCE_TIME length) ++{ ++ struct dmo_reverbfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p, %x, %s, %s\n", This, index, buffer, flags, wine_dbgstr_longlong(timestamp), wine_dbgstr_longlong(length)); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI reverb_mediaobj_ProcessOutput(IMediaObject *iface, DWORD flags, DWORD count, ++ DMO_OUTPUT_DATA_BUFFER *buffers, DWORD *status) ++{ ++ struct dmo_reverbfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %x, %d, %p, %p\n", This, flags, count, buffers, status); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI reverb_mediaobj_Lock(IMediaObject *iface, LONG lock) ++{ ++ struct dmo_reverbfx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d\n", This, lock); ++ return E_NOTIMPL; ++} ++ ++static const IMediaObjectVtbl reverb_mediaobjectVtbl = ++{ ++ reverb_mediaobj_QueryInterface, ++ reverb_mediaobj_AddRef, ++ reverb_mediaobj_Release, ++ reverb_mediaobj_GetStreamCount, ++ reverb_mediaobj_GetInputStreamInfo, ++ reverb_mediaobj_GetOutputStreamInfo, ++ reverb_mediaobj_GetInputType, ++ reverb_mediaobj_GetOutputType, ++ reverb_mediaobj_SetInputType, ++ reverb_mediaobj_SetOutputType, ++ reverb_mediaobj_GetInputCurrentType, ++ reverb_mediaobj_GetOutputCurrentType, ++ reverb_mediaobj_GetInputSizeInfo, ++ reverb_mediaobj_GetOutputSizeInfo, ++ reverb_mediaobj_GetInputMaxLatency, ++ reverb_mediaobj_SetInputMaxLatency, ++ reverb_mediaobj_Flush, ++ reverb_mediaobj_Discontinuity, ++ reverb_mediaobj_AllocateStreamingResources, ++ reverb_mediaobj_FreeStreamingResources, ++ reverb_mediaobj_GetInputStatus, ++ reverb_mediaobj_ProcessInput, ++ reverb_mediaobj_ProcessOutput, ++ reverb_mediaobj_Lock ++}; ++ ++static HRESULT WINAPI reverb_mediainplace_QueryInterface(IMediaObjectInPlace *iface, REFIID riid, void **obj) ++{ ++ struct dmo_reverbfx *This = impl_from_IMediaObjectInPlace(iface); ++ return IDirectSoundFXWavesReverb_QueryInterface(&This->IDirectSoundFXWavesReverb_iface, riid, obj); ++} ++ ++static ULONG WINAPI reverb_mediainplace_AddRef(IMediaObjectInPlace *iface) ++{ ++ struct dmo_reverbfx *This = impl_from_IMediaObjectInPlace(iface); ++ return IDirectSoundFXWavesReverb_AddRef(&This->IDirectSoundFXWavesReverb_iface); ++} ++ ++static ULONG WINAPI reverb_mediainplace_Release(IMediaObjectInPlace *iface) ++{ ++ struct dmo_reverbfx *This = impl_from_IMediaObjectInPlace(iface); ++ return IDirectSoundFXWavesReverb_Release(&This->IDirectSoundFXWavesReverb_iface); ++} ++ ++static HRESULT WINAPI reverb_mediainplace_Process(IMediaObjectInPlace *iface, ULONG size, BYTE *data, REFERENCE_TIME start, DWORD flags) ++{ ++ struct dmo_reverbfx *This = impl_from_IMediaObjectInPlace(iface); ++ static BOOL once = 0; ++ if(!once++) ++ FIXME("%p, %d, %p, %s, %x\n", This, size, data, wine_dbgstr_longlong(start), flags); ++ else ++ TRACE("%p, %d, %p, %s, %x\n", This, size, data, wine_dbgstr_longlong(start), flags); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI reverb_mediainplace_Clone(IMediaObjectInPlace *iface, IMediaObjectInPlace **object) ++{ ++ struct dmo_reverbfx *This = impl_from_IMediaObjectInPlace(iface); ++ FIXME("%p, %p\n", This, object); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI reverb_mediainplace_GetLatency(IMediaObjectInPlace *iface, REFERENCE_TIME *latency) ++{ ++ struct dmo_reverbfx *This = impl_from_IMediaObjectInPlace(iface); ++ FIXME("%p, %p\n", This, latency); ++ return E_NOTIMPL; ++} ++ ++static const IMediaObjectInPlaceVtbl reverb_mediainplaceVtbl = ++{ ++ reverb_mediainplace_QueryInterface, ++ reverb_mediainplace_AddRef, ++ reverb_mediainplace_Release, ++ reverb_mediainplace_Process, ++ reverb_mediainplace_Clone, ++ reverb_mediainplace_GetLatency ++}; ++ ++static HRESULT WINAPI reverbfx_QueryInterface(IDirectSoundFXWavesReverb *iface, REFIID riid, void **ppv) ++{ ++ struct dmo_reverbfx *This = impl_from_IDirectSoundFXWavesReverb(iface); ++ ++ TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv); ++ ++ if (IsEqualGUID(riid, &IID_IUnknown) || ++ IsEqualGUID(riid, &IID_IDirectSoundFXWavesReverb)) ++ { ++ *ppv = &This->IDirectSoundFXWavesReverb_iface; ++ } ++ else if(IsEqualGUID(riid, &IID_IMediaObject)) ++ { ++ *ppv = &This->IMediaObject_iface; ++ } ++ else if(IsEqualGUID(riid, &IID_IMediaObjectInPlace)) ++ { ++ *ppv = &This->IMediaObjectInPlace_iface; ++ } ++ ++ if(!*ppv) ++ { ++ FIXME("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppv); ++ return E_NOINTERFACE; ++ } ++ ++ IUnknown_AddRef((IUnknown*)*ppv); ++ ++ return S_OK; ++} ++ ++static ULONG WINAPI reverbfx_AddRef(IDirectSoundFXWavesReverb *iface) ++{ ++ struct dmo_reverbfx *This = impl_from_IDirectSoundFXWavesReverb(iface); ++ ULONG ref = InterlockedIncrement(&This->ref); ++ ++ TRACE("(%p) ref=%u\n", This, ref); ++ ++ return ref; ++} ++ ++static ULONG WINAPI reverbfx_Release(IDirectSoundFXWavesReverb *iface) ++{ ++ struct dmo_reverbfx *This = impl_from_IDirectSoundFXWavesReverb(iface); ++ ULONG ref = InterlockedDecrement(&This->ref); ++ ++ TRACE("(%p) ref=%u\n", This, ref); ++ ++ if (!ref) ++ { ++ heap_free(This); ++ } ++ return ref; ++} ++ ++static HRESULT WINAPI reverbfx_SetAllParameters(IDirectSoundFXWavesReverb *iface, const DSFXWavesReverb *reverb) ++{ ++ struct dmo_reverbfx *This = impl_from_IDirectSoundFXWavesReverb(iface); ++ FIXME("(%p) %p\n", This, reverb); ++ ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI reverbfx_GetAllParameters(IDirectSoundFXWavesReverb *iface, DSFXWavesReverb *reverb) ++{ ++ struct dmo_reverbfx *This = impl_from_IDirectSoundFXWavesReverb(iface); ++ FIXME("(%p) %p\n", This, reverb); ++ ++ return E_NOTIMPL; ++} ++ ++static const struct IDirectSoundFXWavesReverbVtbl reverbfxVtbl = ++{ ++ reverbfx_QueryInterface, ++ reverbfx_AddRef, ++ reverbfx_Release, ++ reverbfx_SetAllParameters, ++ reverbfx_GetAllParameters ++}; ++ ++HRESULT WINAPI ReverbFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) ++{ ++ struct dmo_reverbfx *object; ++ HRESULT ret; ++ ++ TRACE("(%p, %s, %p)\n", outer, debugstr_guid(riid), ppv); ++ ++ *ppv = NULL; ++ ++ object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); ++ if (!object) ++ return E_OUTOFMEMORY; ++ ++ object->IDirectSoundFXWavesReverb_iface.lpVtbl = &reverbfxVtbl; ++ object->IMediaObject_iface.lpVtbl = &reverb_mediaobjectVtbl; ++ object->IMediaObjectInPlace_iface.lpVtbl = &reverb_mediainplaceVtbl; ++ object->ref = 1; ++ ++ ret = reverbfx_QueryInterface(&object->IDirectSoundFXWavesReverb_iface, riid, ppv); ++ reverbfx_Release(&object->IDirectSoundFXWavesReverb_iface); ++ ++ return ret; ++} +-- +2.17.1 + diff --git a/patches/dsdmo-new-dll/0010-dsdmo-Add-IDirectSoundFXI3DL2Reverb-support.patch b/patches/dsdmo-new-dll/0010-dsdmo-Add-IDirectSoundFXI3DL2Reverb-support.patch new file mode 100644 index 00000000..c54ee353 --- /dev/null +++ b/patches/dsdmo-new-dll/0010-dsdmo-Add-IDirectSoundFXI3DL2Reverb-support.patch @@ -0,0 +1,537 @@ +From 48121737e3b4838306106adb0dccc73fbcde57f1 Mon Sep 17 00:00:00 2001 +From: Alistair Leslie-Hughes +Date: Wed, 28 Aug 2019 09:35:44 +1000 +Subject: [PATCH 10/27] dsdmo: Add IDirectSoundFXI3DL2Reverb support + +--- + dlls/dsdmo/Makefile.in | 3 +- + dlls/dsdmo/dsdmo_classes.idl | 10 + + dlls/dsdmo/dsdmo_private.h | 1 + + dlls/dsdmo/main.c | 14 ++ + dlls/dsdmo/reverb2.c | 433 +++++++++++++++++++++++++++++++++++ + 5 files changed, 460 insertions(+), 1 deletion(-) + create mode 100644 dlls/dsdmo/reverb2.c + +diff --git a/dlls/dsdmo/Makefile.in b/dlls/dsdmo/Makefile.in +index 4e36fd165e..65e30f31e5 100644 +--- a/dlls/dsdmo/Makefile.in ++++ b/dlls/dsdmo/Makefile.in +@@ -11,6 +11,7 @@ C_SRCS = \ + gargle.c \ + main.c \ + parameq.c \ +- reverb.c ++ reverb.c \ ++ reverb2.c + + IDL_SRCS = dsdmo_classes.idl +diff --git a/dlls/dsdmo/dsdmo_classes.idl b/dlls/dsdmo/dsdmo_classes.idl +index bf54fc846c..7ceb5cf800 100644 +--- a/dlls/dsdmo/dsdmo_classes.idl ++++ b/dlls/dsdmo/dsdmo_classes.idl +@@ -96,3 +96,13 @@ coclass DirectSoundParamEqDMO + coclass DirectSoundWavesReverbDMO + { + } ++ ++[ ++ uuid(ef985e71-d5c7-42d4-ba4d-2d073e2e96f4), ++ threading(both), ++ progid("Microsoft.DirectSoundI3DL2ReverbDMO.1"), ++ vi_progid("Microsoft.DirectSoundI3DL2ReverbDMO") ++] ++coclass DirectSoundI3DL2ReverbDMO ++{ ++} +diff --git a/dlls/dsdmo/dsdmo_private.h b/dlls/dsdmo/dsdmo_private.h +index 667539f9ae..0c3e5c75c6 100644 +--- a/dlls/dsdmo/dsdmo_private.h ++++ b/dlls/dsdmo/dsdmo_private.h +@@ -35,5 +35,6 @@ extern HRESULT WINAPI FlangerFactory_CreateInstance(IClassFactory *iface, IUnkno + extern HRESULT WINAPI GargleFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) DECLSPEC_HIDDEN; + extern HRESULT WINAPI ParamEqFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) DECLSPEC_HIDDEN; + extern HRESULT WINAPI ReverbFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) DECLSPEC_HIDDEN; ++extern HRESULT WINAPI I3DL2Reverb_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) DECLSPEC_HIDDEN; + + #endif +diff --git a/dlls/dsdmo/main.c b/dlls/dsdmo/main.c +index c7647101b1..d37b605021 100644 +--- a/dlls/dsdmo/main.c ++++ b/dlls/dsdmo/main.c +@@ -150,6 +150,14 @@ static const IClassFactoryVtbl ReverbFactoryVtbl = { + ClassFactory_LockServer + }; + ++static const IClassFactoryVtbl I3DL2ReverbFactoryVtbl = { ++ ClassFactory_QueryInterface, ++ ClassFactory_AddRef, ++ ClassFactory_Release, ++ I3DL2Reverb_CreateInstance, ++ ClassFactory_LockServer ++}; ++ + static IClassFactory echofx_factory = { &EchoFactoryVtbl }; + static IClassFactory chorusfx_factory = { &ChrousFactoryVtbl }; + static IClassFactory compressorfx_factory = { &CompressorFactoryVtbl }; +@@ -158,6 +166,7 @@ static IClassFactory flangerfx_factory = { &FlangerFactoryVtbl }; + static IClassFactory garglefx_factory = { &GargleFactoryVtbl }; + static IClassFactory parameqfx_factory = { &ParamEqFactoryVtbl }; + static IClassFactory reverbfx_factory = { &ReverbFactoryVtbl }; ++static IClassFactory ie3lreverbfx_factory = { &I3DL2ReverbFactoryVtbl }; + + /*********************************************************************** + * DllGetClassObject +@@ -206,6 +215,11 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) + TRACE("GUID_DSFX_WAVES_REVERB\n"); + return IClassFactory_QueryInterface(&reverbfx_factory, riid, ppv); + } ++ else if(IsEqualGUID(&GUID_DSFX_STANDARD_I3DL2REVERB, rclsid)) ++ { ++ TRACE("GUID_DSFX_STANDARD_I3DL2REVERB\n"); ++ return IClassFactory_QueryInterface(&ie3lreverbfx_factory, riid, ppv); ++ } + + FIXME("%s %s %p\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); + return CLASS_E_CLASSNOTAVAILABLE; +diff --git a/dlls/dsdmo/reverb2.c b/dlls/dsdmo/reverb2.c +new file mode 100644 +index 0000000000..6e2ab93413 +--- /dev/null ++++ b/dlls/dsdmo/reverb2.c +@@ -0,0 +1,433 @@ ++/* ++ * Copyright 2019 Alistair Leslie-Hughes ++ * ++ * 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 ++ */ ++#define COBJMACROS ++ ++#include "dsdmo_private.h" ++ ++WINE_DEFAULT_DEBUG_CHANNEL(dsdmo); ++ ++struct dmo_reverb2fx ++{ ++ IDirectSoundFXI3DL2Reverb IDirectSoundFXI3DL2Reverb_iface; ++ IMediaObject IMediaObject_iface; ++ IMediaObjectInPlace IMediaObjectInPlace_iface; ++ LONG ref; ++}; ++ ++static inline struct dmo_reverb2fx *impl_from_IDirectSoundFXI3DL2Reverb(IDirectSoundFXI3DL2Reverb *iface) ++{ ++ return CONTAINING_RECORD(iface, struct dmo_reverb2fx, IDirectSoundFXI3DL2Reverb_iface); ++} ++ ++static inline struct dmo_reverb2fx *impl_from_IMediaObject(IMediaObject *iface) ++{ ++ return CONTAINING_RECORD(iface, struct dmo_reverb2fx, IMediaObject_iface); ++} ++ ++static inline struct dmo_reverb2fx *impl_from_IMediaObjectInPlace(IMediaObjectInPlace *iface) ++{ ++ return CONTAINING_RECORD(iface, struct dmo_reverb2fx, IMediaObjectInPlace_iface); ++} ++ ++static HRESULT WINAPI reverb2_mediaobj_QueryInterface(IMediaObject *iface, REFIID riid, void **obj) ++{ ++ struct dmo_reverb2fx *This = impl_from_IMediaObject(iface); ++ return IDirectSoundFXI3DL2Reverb_QueryInterface(&This->IDirectSoundFXI3DL2Reverb_iface, riid, obj); ++} ++ ++static ULONG WINAPI reverb2_mediaobj_AddRef(IMediaObject *iface) ++{ ++ struct dmo_reverb2fx *This = impl_from_IMediaObject(iface); ++ return IDirectSoundFXI3DL2Reverb_AddRef(&This->IDirectSoundFXI3DL2Reverb_iface); ++} ++ ++static ULONG WINAPI reverb2_mediaobj_Release(IMediaObject *iface) ++{ ++ struct dmo_reverb2fx *This = impl_from_IMediaObject(iface); ++ return IDirectSoundFXI3DL2Reverb_Release(&This->IDirectSoundFXI3DL2Reverb_iface); ++} ++ ++static HRESULT WINAPI reverb2_mediaobj_GetStreamCount(IMediaObject *iface, DWORD *inputs, DWORD *outputs) ++{ ++ struct dmo_reverb2fx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %p, %p\n", This, inputs, outputs); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI reverb2_mediaobj_GetInputStreamInfo(IMediaObject *iface, DWORD index, DWORD *flags) ++{ ++ struct dmo_reverb2fx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p\n", This, index, flags); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI reverb2_mediaobj_GetOutputStreamInfo(IMediaObject *iface, DWORD index, DWORD *flags) ++{ ++ struct dmo_reverb2fx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p\n", This, index, flags); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI reverb2_mediaobj_GetInputType(IMediaObject *iface, DWORD index, DWORD type, DMO_MEDIA_TYPE *pmt) ++{ ++ struct dmo_reverb2fx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %d, %p\n", This, index, type, pmt); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI reverb2_mediaobj_GetOutputType(IMediaObject *iface, DWORD index, DWORD type, DMO_MEDIA_TYPE *pmt) ++{ ++ struct dmo_reverb2fx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %d, %p\n", This, index, type, pmt); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI reverb2_mediaobj_SetInputType(IMediaObject *iface, DWORD index, const DMO_MEDIA_TYPE *pmt, DWORD flags) ++{ ++ struct dmo_reverb2fx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p, %x\n", This, index, pmt, flags); ++ return S_OK; ++} ++ ++static HRESULT WINAPI reverb2_mediaobj_SetOutputType(IMediaObject *iface, DWORD index, const DMO_MEDIA_TYPE *pmt, DWORD flags) ++{ ++ struct dmo_reverb2fx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p, %x\n", This, index, pmt, flags); ++ return S_OK; ++} ++ ++static HRESULT WINAPI reverb2_mediaobj_GetInputCurrentType(IMediaObject *iface, DWORD index, DMO_MEDIA_TYPE *pmt) ++{ ++ struct dmo_reverb2fx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p\n", This, index, pmt); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI reverb2_mediaobj_GetOutputCurrentType(IMediaObject *iface, DWORD index, DMO_MEDIA_TYPE *pmt) ++{ ++ struct dmo_reverb2fx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p\n", This, index, pmt); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI reverb2_mediaobj_GetInputSizeInfo(IMediaObject *iface, DWORD index, DWORD *size, DWORD *ahead, DWORD *alignment) ++{ ++ struct dmo_reverb2fx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p, %p, %p\n", This, index, size, ahead, alignment); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI reverb2_mediaobj_GetOutputSizeInfo(IMediaObject *iface, DWORD index, DWORD *size, DWORD *alignment) ++{ ++ struct dmo_reverb2fx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p, %p\n", This, index, size, alignment); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI reverb2_mediaobj_GetInputMaxLatency(IMediaObject *iface, DWORD index, REFERENCE_TIME *latency) ++{ ++ struct dmo_reverb2fx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p\n", This, index, latency); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI reverb2_mediaobj_SetInputMaxLatency(IMediaObject *iface, DWORD index, REFERENCE_TIME latency) ++{ ++ struct dmo_reverb2fx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %s\n", This, index, wine_dbgstr_longlong(latency)); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI reverb2_mediaobj_Flush(IMediaObject *iface) ++{ ++ struct dmo_reverb2fx *This = impl_from_IMediaObject(iface); ++ FIXME("%p\n", This); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI reverb2_mediaobj_Discontinuity(IMediaObject *iface, DWORD index) ++{ ++ struct dmo_reverb2fx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d\n", This, index); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI reverb2_mediaobj_AllocateStreamingResources(IMediaObject *iface) ++{ ++ struct dmo_reverb2fx *This = impl_from_IMediaObject(iface); ++ FIXME("%p\n", This); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI reverb2_mediaobj_FreeStreamingResources(IMediaObject *iface) ++{ ++ struct dmo_reverb2fx *This = impl_from_IMediaObject(iface); ++ FIXME("%p\n", This); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI reverb2_mediaobj_GetInputStatus(IMediaObject *iface, DWORD index, DWORD *flags) ++{ ++ struct dmo_reverb2fx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p\n", This, index, flags); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI reverb2_mediaobj_ProcessInput(IMediaObject *iface, DWORD index, IMediaBuffer *buffer, ++ DWORD flags, REFERENCE_TIME timestamp, REFERENCE_TIME length) ++{ ++ struct dmo_reverb2fx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d, %p, %x, %s, %s\n", This, index, buffer, flags, wine_dbgstr_longlong(timestamp), wine_dbgstr_longlong(length)); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI reverb2_mediaobj_ProcessOutput(IMediaObject *iface, DWORD flags, DWORD count, ++ DMO_OUTPUT_DATA_BUFFER *buffers, DWORD *status) ++{ ++ struct dmo_reverb2fx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %x, %d, %p, %p\n", This, flags, count, buffers, status); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI reverb2_mediaobj_Lock(IMediaObject *iface, LONG lock) ++{ ++ struct dmo_reverb2fx *This = impl_from_IMediaObject(iface); ++ FIXME("%p, %d\n", This, lock); ++ return E_NOTIMPL; ++} ++ ++static const IMediaObjectVtbl reverb2_mediaobjectVtbl = ++{ ++ reverb2_mediaobj_QueryInterface, ++ reverb2_mediaobj_AddRef, ++ reverb2_mediaobj_Release, ++ reverb2_mediaobj_GetStreamCount, ++ reverb2_mediaobj_GetInputStreamInfo, ++ reverb2_mediaobj_GetOutputStreamInfo, ++ reverb2_mediaobj_GetInputType, ++ reverb2_mediaobj_GetOutputType, ++ reverb2_mediaobj_SetInputType, ++ reverb2_mediaobj_SetOutputType, ++ reverb2_mediaobj_GetInputCurrentType, ++ reverb2_mediaobj_GetOutputCurrentType, ++ reverb2_mediaobj_GetInputSizeInfo, ++ reverb2_mediaobj_GetOutputSizeInfo, ++ reverb2_mediaobj_GetInputMaxLatency, ++ reverb2_mediaobj_SetInputMaxLatency, ++ reverb2_mediaobj_Flush, ++ reverb2_mediaobj_Discontinuity, ++ reverb2_mediaobj_AllocateStreamingResources, ++ reverb2_mediaobj_FreeStreamingResources, ++ reverb2_mediaobj_GetInputStatus, ++ reverb2_mediaobj_ProcessInput, ++ reverb2_mediaobj_ProcessOutput, ++ reverb2_mediaobj_Lock ++}; ++ ++static HRESULT WINAPI reverb2_mediainplace_QueryInterface(IMediaObjectInPlace *iface, REFIID riid, void **obj) ++{ ++ struct dmo_reverb2fx *This = impl_from_IMediaObjectInPlace(iface); ++ return IDirectSoundFXI3DL2Reverb_QueryInterface(&This->IDirectSoundFXI3DL2Reverb_iface, riid, obj); ++} ++ ++static ULONG WINAPI reverb2_mediainplace_AddRef(IMediaObjectInPlace *iface) ++{ ++ struct dmo_reverb2fx *This = impl_from_IMediaObjectInPlace(iface); ++ return IDirectSoundFXI3DL2Reverb_AddRef(&This->IDirectSoundFXI3DL2Reverb_iface); ++} ++ ++static ULONG WINAPI reverb2_mediainplace_Release(IMediaObjectInPlace *iface) ++{ ++ struct dmo_reverb2fx *This = impl_from_IMediaObjectInPlace(iface); ++ return IDirectSoundFXI3DL2Reverb_Release(&This->IDirectSoundFXI3DL2Reverb_iface); ++} ++ ++static HRESULT WINAPI reverb2_mediainplace_Process(IMediaObjectInPlace *iface, ULONG size, BYTE *data, REFERENCE_TIME start, DWORD flags) ++{ ++ struct dmo_reverb2fx *This = impl_from_IMediaObjectInPlace(iface); ++ static BOOL once = 0; ++ if(!once++) ++ FIXME("%p, %d, %p, %s, %x\n", This, size, data, wine_dbgstr_longlong(start), flags); ++ else ++ TRACE("%p, %d, %p, %s, %x\n", This, size, data, wine_dbgstr_longlong(start), flags); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI reverb2_mediainplace_Clone(IMediaObjectInPlace *iface, IMediaObjectInPlace **object) ++{ ++ struct dmo_reverb2fx *This = impl_from_IMediaObjectInPlace(iface); ++ FIXME("%p, %p\n", This, object); ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI reverb2_mediainplace_GetLatency(IMediaObjectInPlace *iface, REFERENCE_TIME *latency) ++{ ++ struct dmo_reverb2fx *This = impl_from_IMediaObjectInPlace(iface); ++ FIXME("%p, %p\n", This, latency); ++ return E_NOTIMPL; ++} ++ ++static const IMediaObjectInPlaceVtbl reverb2_mediainplaceVtbl = ++{ ++ reverb2_mediainplace_QueryInterface, ++ reverb2_mediainplace_AddRef, ++ reverb2_mediainplace_Release, ++ reverb2_mediainplace_Process, ++ reverb2_mediainplace_Clone, ++ reverb2_mediainplace_GetLatency ++}; ++ ++static HRESULT WINAPI reverb2_QueryInterface(IDirectSoundFXI3DL2Reverb *iface, REFIID riid, void **ppv) ++{ ++ struct dmo_reverb2fx *This = impl_from_IDirectSoundFXI3DL2Reverb(iface); ++ ++ TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv); ++ ++ if (IsEqualGUID(riid, &IID_IUnknown) || ++ IsEqualGUID(riid, &IID_IDirectSoundFXI3DL2Reverb)) ++ { ++ *ppv = &This->IDirectSoundFXI3DL2Reverb_iface; ++ } ++ else if(IsEqualGUID(riid, &IID_IMediaObject)) ++ { ++ *ppv = &This->IMediaObject_iface; ++ } ++ else if(IsEqualGUID(riid, &IID_IMediaObjectInPlace)) ++ { ++ *ppv = &This->IMediaObjectInPlace_iface; ++ } ++ ++ if(!*ppv) ++ { ++ FIXME("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppv); ++ return E_NOINTERFACE; ++ } ++ ++ IUnknown_AddRef((IUnknown*)*ppv); ++ ++ return S_OK; ++} ++ ++static ULONG WINAPI reverb2_AddRef(IDirectSoundFXI3DL2Reverb *iface) ++{ ++ struct dmo_reverb2fx *This = impl_from_IDirectSoundFXI3DL2Reverb(iface); ++ ULONG ref = InterlockedIncrement(&This->ref); ++ ++ TRACE("(%p) ref=%u\n", This, ref); ++ ++ return ref; ++} ++ ++static ULONG WINAPI reverb2_Release(IDirectSoundFXI3DL2Reverb *iface) ++{ ++ struct dmo_reverb2fx *This = impl_from_IDirectSoundFXI3DL2Reverb(iface); ++ ULONG ref = InterlockedDecrement(&This->ref); ++ ++ TRACE("(%p) ref=%u\n", This, ref); ++ ++ if (!ref) ++ { ++ heap_free(This); ++ } ++ return ref; ++} ++ ++static HRESULT WINAPI reverb2_SetAllParameters(IDirectSoundFXI3DL2Reverb *iface, const DSFXI3DL2Reverb *reverb) ++{ ++ struct dmo_reverb2fx *This = impl_from_IDirectSoundFXI3DL2Reverb(iface); ++ FIXME("(%p) %p\n", This, reverb); ++ ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI reverb2_GetAllParameters(IDirectSoundFXI3DL2Reverb *iface, DSFXI3DL2Reverb *reverb) ++{ ++ struct dmo_reverb2fx *This = impl_from_IDirectSoundFXI3DL2Reverb(iface); ++ FIXME("(%p) %p\n", This, reverb); ++ ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI reverb2_SetPreset(IDirectSoundFXI3DL2Reverb *iface, DWORD preset) ++{ ++ struct dmo_reverb2fx *This = impl_from_IDirectSoundFXI3DL2Reverb(iface); ++ FIXME("(%p) %d\n", This, preset); ++ ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI reverb2_GetPreset(IDirectSoundFXI3DL2Reverb *iface, DWORD *preset) ++{ ++ struct dmo_reverb2fx *This = impl_from_IDirectSoundFXI3DL2Reverb(iface); ++ FIXME("(%p) %p\n", This, preset); ++ ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI reverb2_SetQuality(IDirectSoundFXI3DL2Reverb *iface, LONG quality) ++{ ++ struct dmo_reverb2fx *This = impl_from_IDirectSoundFXI3DL2Reverb(iface); ++ FIXME("(%p) %d\n", This, quality); ++ ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI reverb2_GetQuality(IDirectSoundFXI3DL2Reverb *iface, LONG *quality) ++{ ++ struct dmo_reverb2fx *This = impl_from_IDirectSoundFXI3DL2Reverb(iface); ++ FIXME("(%p) %p\n", This, quality); ++ ++ return E_NOTIMPL; ++} ++ ++static const struct IDirectSoundFXI3DL2ReverbVtbl reverb2fxVtbl = ++{ ++ reverb2_QueryInterface, ++ reverb2_AddRef, ++ reverb2_Release, ++ reverb2_SetAllParameters, ++ reverb2_GetAllParameters, ++ reverb2_SetPreset, ++ reverb2_GetPreset, ++ reverb2_SetQuality, ++ reverb2_GetQuality ++}; ++ ++HRESULT WINAPI I3DL2Reverb_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) ++{ ++ struct dmo_reverb2fx *object; ++ HRESULT ret; ++ ++ TRACE("(%p, %s, %p)\n", outer, debugstr_guid(riid), ppv); ++ ++ *ppv = NULL; ++ ++ object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); ++ if (!object) ++ return E_OUTOFMEMORY; ++ ++ object->IDirectSoundFXI3DL2Reverb_iface.lpVtbl = &reverb2fxVtbl; ++ object->IMediaObject_iface.lpVtbl = &reverb2_mediaobjectVtbl; ++ object->IMediaObjectInPlace_iface.lpVtbl = &reverb2_mediainplaceVtbl; ++ object->ref = 1; ++ ++ ret = reverb2_QueryInterface(&object->IDirectSoundFXI3DL2Reverb_iface, riid, ppv); ++ reverb2_Release(&object->IDirectSoundFXI3DL2Reverb_iface); ++ ++ return ret; ++} +-- +2.17.1 + diff --git a/patches/dsdmo-new-dll/0011-dsdmo-Implement-IDirectSoundFXEcho-GetAllParameters.patch b/patches/dsdmo-new-dll/0011-dsdmo-Implement-IDirectSoundFXEcho-GetAllParameters.patch new file mode 100644 index 00000000..3e471a44 --- /dev/null +++ b/patches/dsdmo-new-dll/0011-dsdmo-Implement-IDirectSoundFXEcho-GetAllParameters.patch @@ -0,0 +1,70 @@ +From cc8299d2dea6d96d8460adf855548c58c3497d55 Mon Sep 17 00:00:00 2001 +From: Alistair Leslie-Hughes +Date: Tue, 3 Sep 2019 09:03:16 +1000 +Subject: [PATCH 11/27] dsdmo: Implement IDirectSoundFXEcho GetAllParameters. + +--- + dlls/dsdmo/echo.c | 18 ++++++++++++++++-- + dlls/dsound/tests/dsound8.c | 2 +- + 2 files changed, 17 insertions(+), 3 deletions(-) + +diff --git a/dlls/dsdmo/echo.c b/dlls/dsdmo/echo.c +index 3e8b0be115..e9add8a019 100644 +--- a/dlls/dsdmo/echo.c ++++ b/dlls/dsdmo/echo.c +@@ -27,6 +27,8 @@ struct dmo_echofx + IMediaObject IMediaObject_iface; + IMediaObjectInPlace IMediaObjectInPlace_iface; + LONG ref; ++ ++ DSFXEcho params; + }; + + static inline struct dmo_echofx *impl_from_IDirectSoundFXEcho(IDirectSoundFXEcho *iface) +@@ -358,9 +360,15 @@ static HRESULT WINAPI echofx_SetAllParameters(IDirectSoundFXEcho *iface, const D + static HRESULT WINAPI echofx_GetAllParameters(IDirectSoundFXEcho *iface, DSFXEcho *echo) + { + struct dmo_echofx *This = impl_from_IDirectSoundFXEcho(iface); +- FIXME("(%p) %p\n", This, echo); + +- return E_NOTIMPL; ++ TRACE("(%p) %p\n", This, echo); ++ ++ if(!echo) ++ return E_INVALIDARG; ++ ++ *echo = This->params; ++ ++ return S_OK; + } + + static const struct IDirectSoundFXEchoVtbl echofxVtbl = +@@ -390,6 +398,12 @@ HRESULT WINAPI EchoFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, + object->IMediaObjectInPlace_iface.lpVtbl = &echo_mediainplaceVtbl; + object->ref = 1; + ++ object->params.fWetDryMix = 50.0f; ++ object->params.fFeedback = 50.0f; ++ object->params.fLeftDelay = 500.0f; ++ object->params.fRightDelay = 500.0f; ++ object->params.lPanDelay = 0; ++ + ret = echofx_QueryInterface(&object->IDirectSoundFXEcho_iface, riid, ppv); + echofx_Release(&object->IDirectSoundFXEcho_iface); + +diff --git a/dlls/dsound/tests/dsound8.c b/dlls/dsound/tests/dsound8.c +index 6ed32abbcb..244f2f98e8 100644 +--- a/dlls/dsound/tests/dsound8.c ++++ b/dlls/dsound/tests/dsound8.c +@@ -1387,7 +1387,7 @@ static void test_echo_parameters(IDirectSoundBuffer8 *secondary8) + DSFXEcho params; + + rc = IDirectSoundFXEcho_GetAllParameters(echo, ¶ms); +- todo_wine ok(rc == DS_OK, "Failed: %08x\n", rc); ++ ok(rc == DS_OK, "Failed: %08x\n", rc); + if (rc == DS_OK ) + { + ok(params.fWetDryMix == 50.0f, "got %f\n", params.fWetDryMix); +-- +2.17.1 + diff --git a/patches/dsdmo-new-dll/0012-dsdmo-Implement-IDirectSoundFXGargle-GetAllParameter.patch b/patches/dsdmo-new-dll/0012-dsdmo-Implement-IDirectSoundFXGargle-GetAllParameter.patch new file mode 100644 index 00000000..f3d035e9 --- /dev/null +++ b/patches/dsdmo-new-dll/0012-dsdmo-Implement-IDirectSoundFXGargle-GetAllParameter.patch @@ -0,0 +1,67 @@ +From 8b3084ab7edfbbb8d03259ce9d0fa7e2d31cef3a Mon Sep 17 00:00:00 2001 +From: Alistair Leslie-Hughes +Date: Tue, 3 Sep 2019 09:24:45 +1000 +Subject: [PATCH 12/27] dsdmo: Implement IDirectSoundFXGargle GetAllParameters + +--- + dlls/dsdmo/gargle.c | 15 +++++++++++++-- + dlls/dsound/tests/dsound8.c | 2 +- + 2 files changed, 14 insertions(+), 3 deletions(-) + +diff --git a/dlls/dsdmo/gargle.c b/dlls/dsdmo/gargle.c +index 7ad1e30b67..458ca8a323 100644 +--- a/dlls/dsdmo/gargle.c ++++ b/dlls/dsdmo/gargle.c +@@ -27,6 +27,8 @@ struct dmo_garglefx + IMediaObject IMediaObject_iface; + IMediaObjectInPlace IMediaObjectInPlace_iface; + LONG ref; ++ ++ DSFXGargle params; + }; + + static inline struct dmo_garglefx *impl_from_IDirectSoundFXGargle(IDirectSoundFXGargle *iface) +@@ -358,9 +360,15 @@ static HRESULT WINAPI garglefx_SetAllParameters(IDirectSoundFXGargle *iface, con + static HRESULT WINAPI garglefx_GetAllParameters(IDirectSoundFXGargle *iface, DSFXGargle *gargle) + { + struct dmo_garglefx *This = impl_from_IDirectSoundFXGargle(iface); +- FIXME("(%p) %p\n", This, gargle); + +- return E_NOTIMPL; ++ TRACE("(%p) %p\n", This, gargle); ++ ++ if(!gargle) ++ return E_INVALIDARG; ++ ++ *gargle = This->params; ++ ++ return S_OK; + } + + static const struct IDirectSoundFXGargleVtbl garglefxVtbl = +@@ -390,6 +398,9 @@ HRESULT WINAPI GargleFactory_CreateInstance(IClassFactory *iface, IUnknown *oute + object->IMediaObjectInPlace_iface.lpVtbl = &gargle_mediainplaceVtbl; + object->ref = 1; + ++ object->params.dwRateHz = 20; ++ object->params.dwWaveShape = DSFXGARGLE_WAVE_TRIANGLE; ++ + ret = garglefx_QueryInterface(&object->IDirectSoundFXGargle_iface, riid, ppv); + garglefx_Release(&object->IDirectSoundFXGargle_iface); + +diff --git a/dlls/dsound/tests/dsound8.c b/dlls/dsound/tests/dsound8.c +index 244f2f98e8..2b066ef756 100644 +--- a/dlls/dsound/tests/dsound8.c ++++ b/dlls/dsound/tests/dsound8.c +@@ -1413,7 +1413,7 @@ static void test_gargle_parameters(IDirectSoundBuffer8 *secondary8) + DSFXGargle params; + + rc = IDirectSoundFXGargle_GetAllParameters(gargle, ¶ms); +- todo_wine ok(rc == DS_OK, "Failed: %08x\n", rc); ++ ok(rc == DS_OK, "Failed: %08x\n", rc); + if (rc == DS_OK) + { + ok(params.dwRateHz == 20, "got %d\n", params.dwRateHz); +-- +2.17.1 + diff --git a/patches/dsdmo-new-dll/0013-dsdmo-Implemnet-IDirectSoundFXChorus-GetAllParameter.patch b/patches/dsdmo-new-dll/0013-dsdmo-Implemnet-IDirectSoundFXChorus-GetAllParameter.patch new file mode 100644 index 00000000..69454b1f --- /dev/null +++ b/patches/dsdmo-new-dll/0013-dsdmo-Implemnet-IDirectSoundFXChorus-GetAllParameter.patch @@ -0,0 +1,72 @@ +From 55299a34a5cbf7abdbeeb521ae2267d26f555b4e Mon Sep 17 00:00:00 2001 +From: Alistair Leslie-Hughes +Date: Tue, 3 Sep 2019 09:32:02 +1000 +Subject: [PATCH 13/27] dsdmo: Implemnet IDirectSoundFXChorus GetAllParameters + +--- + dlls/dsdmo/chorus.c | 20 ++++++++++++++++++-- + dlls/dsound/tests/dsound8.c | 2 +- + 2 files changed, 19 insertions(+), 3 deletions(-) + +diff --git a/dlls/dsdmo/chorus.c b/dlls/dsdmo/chorus.c +index 6d4076bcba..03195d247d 100644 +--- a/dlls/dsdmo/chorus.c ++++ b/dlls/dsdmo/chorus.c +@@ -27,6 +27,8 @@ struct dmo_chorusfx + IMediaObject IMediaObject_iface; + IMediaObjectInPlace IMediaObjectInPlace_iface; + LONG ref; ++ ++ DSFXChorus params; + }; + + static inline struct dmo_chorusfx *impl_from_IDirectSoundFXChorus(IDirectSoundFXChorus *iface) +@@ -358,9 +360,15 @@ static HRESULT WINAPI chrousfx_SetAllParameters(IDirectSoundFXChorus *iface, con + static HRESULT WINAPI chrousfx_GetAllParameters(IDirectSoundFXChorus *iface, DSFXChorus *chorus) + { + struct dmo_chorusfx *This = impl_from_IDirectSoundFXChorus(iface); +- FIXME("(%p) %p\n", This, chorus); + +- return E_NOTIMPL; ++ TRACE("(%p) %p\n", This, chorus); ++ ++ if(!chorus) ++ return E_INVALIDARG; ++ ++ *chorus = This->params; ++ ++ return S_OK; + } + + static const struct IDirectSoundFXChorusVtbl chorusfxVtbl = +@@ -390,6 +398,14 @@ HRESULT WINAPI ChrousFactory_CreateInstance(IClassFactory *iface, IUnknown *oute + object->IMediaObjectInPlace_iface.lpVtbl = &echo_mediainplaceVtbl; + object->ref = 1; + ++ object->params.fWetDryMix = 50.0f; ++ object->params.fDepth = 10.0f; ++ object->params.fFeedback = 25.0f; ++ object->params.fFrequency = 1.1f; ++ object->params.lWaveform = DSFXCHORUS_WAVE_SIN; ++ object->params.fDelay = 16.0f; ++ object->params.lPhase = 3; ++ + ret = chrousfx_QueryInterface(&object->IDirectSoundFXChorus_iface, riid, ppv); + chrousfx_Release(&object->IDirectSoundFXChorus_iface); + +diff --git a/dlls/dsound/tests/dsound8.c b/dlls/dsound/tests/dsound8.c +index 2b066ef756..17026f81f5 100644 +--- a/dlls/dsound/tests/dsound8.c ++++ b/dlls/dsound/tests/dsound8.c +@@ -1436,7 +1436,7 @@ static void test_chorus_parameters(IDirectSoundBuffer8 *secondary8) + DSFXChorus params; + + rc = IDirectSoundFXChorus_GetAllParameters(chorus, ¶ms); +- todo_wine ok(rc == DS_OK, "Failed: %08x\n", rc); ++ ok(rc == DS_OK, "Failed: %08x\n", rc); + if (rc == DS_OK) + { + ok(params.fWetDryMix == 50.0f, "got %f\n", params.fWetDryMix); +-- +2.17.1 + diff --git a/patches/dsdmo-new-dll/0014-dsdmo-Implemnet-IDirectSoundFXFlanger-GetAllParamete.patch b/patches/dsdmo-new-dll/0014-dsdmo-Implemnet-IDirectSoundFXFlanger-GetAllParamete.patch new file mode 100644 index 00000000..ef59800d --- /dev/null +++ b/patches/dsdmo-new-dll/0014-dsdmo-Implemnet-IDirectSoundFXFlanger-GetAllParamete.patch @@ -0,0 +1,72 @@ +From 9e70f31d09979c8a75e203d52e79b8ff406d8b27 Mon Sep 17 00:00:00 2001 +From: Alistair Leslie-Hughes +Date: Tue, 3 Sep 2019 09:34:36 +1000 +Subject: [PATCH 14/27] dsdmo: Implemnet IDirectSoundFXFlanger GetAllParameters + +--- + dlls/dsdmo/flanger.c | 20 ++++++++++++++++++-- + dlls/dsound/tests/dsound8.c | 2 +- + 2 files changed, 19 insertions(+), 3 deletions(-) + +diff --git a/dlls/dsdmo/flanger.c b/dlls/dsdmo/flanger.c +index 6fbc836dcd..a647c862fa 100644 +--- a/dlls/dsdmo/flanger.c ++++ b/dlls/dsdmo/flanger.c +@@ -27,6 +27,8 @@ struct dmo_flangerfx + IMediaObject IMediaObject_iface; + IMediaObjectInPlace IMediaObjectInPlace_iface; + LONG ref; ++ ++ DSFXFlanger params; + }; + + static inline struct dmo_flangerfx *impl_from_IDirectSoundFXFlanger(IDirectSoundFXFlanger *iface) +@@ -358,9 +360,15 @@ static HRESULT WINAPI flangerfx_SetAllParameters(IDirectSoundFXFlanger *iface, c + static HRESULT WINAPI flangerfx_GetAllParameters(IDirectSoundFXFlanger *iface, DSFXFlanger *flanger) + { + struct dmo_flangerfx *This = impl_from_IDirectSoundFXFlanger(iface); +- FIXME("(%p) %p\n", This, flanger); + +- return E_NOTIMPL; ++ TRACE("(%p) %p\n", This, flanger); ++ ++ if(!flanger) ++ return E_INVALIDARG; ++ ++ *flanger = This->params; ++ ++ return S_OK; + } + + static const struct IDirectSoundFXFlangerVtbl flangerfxVtbl = +@@ -390,6 +398,14 @@ HRESULT WINAPI FlangerFactory_CreateInstance(IClassFactory *iface, IUnknown *out + object->IMediaObjectInPlace_iface.lpVtbl = &flanger_mediainplaceVtbl; + object->ref = 1; + ++ object->params.fWetDryMix = 50.0f; ++ object->params.fDepth = 100.0f; ++ object->params.fFeedback = -50.0f; ++ object->params.fFrequency = 0.25f; ++ object->params.lWaveform = DSFXFLANGER_WAVE_SIN; ++ object->params.fDelay = 2.0f; ++ object->params.lPhase = 2; ++ + ret = flangerfx_QueryInterface(&object->IDirectSoundFXFlanger_iface, riid, ppv); + flangerfx_Release(&object->IDirectSoundFXFlanger_iface); + +diff --git a/dlls/dsound/tests/dsound8.c b/dlls/dsound/tests/dsound8.c +index 17026f81f5..bd417d03af 100644 +--- a/dlls/dsound/tests/dsound8.c ++++ b/dlls/dsound/tests/dsound8.c +@@ -1464,7 +1464,7 @@ static void test_flanger_parameters(IDirectSoundBuffer8 *secondary8) + DSFXFlanger params; + + rc = IDirectSoundFXFlanger_GetAllParameters(flanger, ¶ms); +- todo_wine ok(rc == DS_OK, "Failed: %08x\n", rc); ++ ok(rc == DS_OK, "Failed: %08x\n", rc); + if (rc == DS_OK) + { + ok(params.fWetDryMix == 50.0f, "got %f\n", params.fWetDryMix); +-- +2.17.1 + diff --git a/patches/dsdmo-new-dll/0015-dsdmo-Implemnet-IDirectSoundFXDistortion-GetAllParam.patch b/patches/dsdmo-new-dll/0015-dsdmo-Implemnet-IDirectSoundFXDistortion-GetAllParam.patch new file mode 100644 index 00000000..f2c06248 --- /dev/null +++ b/patches/dsdmo-new-dll/0015-dsdmo-Implemnet-IDirectSoundFXDistortion-GetAllParam.patch @@ -0,0 +1,71 @@ +From 307c0c499cc76d14bc73019f8acf1910cfdec99c Mon Sep 17 00:00:00 2001 +From: Alistair Leslie-Hughes +Date: Tue, 3 Sep 2019 09:38:33 +1000 +Subject: [PATCH 15/27] dsdmo: Implemnet IDirectSoundFXDistortion + GetAllParameters + +--- + dlls/dsdmo/distortion.c | 18 ++++++++++++++++-- + dlls/dsound/tests/dsound8.c | 2 +- + 2 files changed, 17 insertions(+), 3 deletions(-) + +diff --git a/dlls/dsdmo/distortion.c b/dlls/dsdmo/distortion.c +index 92e498b6f1..e6952c3fe1 100644 +--- a/dlls/dsdmo/distortion.c ++++ b/dlls/dsdmo/distortion.c +@@ -27,6 +27,8 @@ struct dmo_distortionfx + IMediaObject IMediaObject_iface; + IMediaObjectInPlace IMediaObjectInPlace_iface; + LONG ref; ++ ++ DSFXDistortion params; + }; + + static inline struct dmo_distortionfx *impl_from_IDirectSoundFXDistortion(IDirectSoundFXDistortion *iface) +@@ -358,9 +360,15 @@ static HRESULT WINAPI distortionfx_SetAllParameters(IDirectSoundFXDistortion *if + static HRESULT WINAPI distortionfx_GetAllParameters(IDirectSoundFXDistortion *iface, DSFXDistortion *distortion) + { + struct dmo_distortionfx *This = impl_from_IDirectSoundFXDistortion(iface); +- FIXME("(%p) %p\n", This, distortion); + +- return E_NOTIMPL; ++ TRACE("(%p) %p\n", This, distortion); ++ ++ if(!distortion) ++ return E_INVALIDARG; ++ ++ *distortion = This->params; ++ ++ return S_OK; + } + + static const struct IDirectSoundFXDistortionVtbl distortionfxVtbl = +@@ -390,6 +398,12 @@ HRESULT WINAPI DistortionFactory_CreateInstance(IClassFactory *iface, IUnknown * + object->IMediaObjectInPlace_iface.lpVtbl = &distortionfx_mediainplaceVtbl; + object->ref = 1; + ++ object->params.fGain = -18.0f; ++ object->params.fEdge = 15.0f; ++ object->params.fPostEQCenterFrequency = 2400.0f; ++ object->params.fPostEQBandwidth = 2400.0f; ++ object->params.fPreLowpassCutoff = 3675.0f; ++ + ret = distortionfx_QueryInterface(&object->IDirectSoundFXDistortion_iface, riid, ppv); + distortionfx_Release(&object->IDirectSoundFXDistortion_iface); + +diff --git a/dlls/dsound/tests/dsound8.c b/dlls/dsound/tests/dsound8.c +index bd417d03af..b75f097355 100644 +--- a/dlls/dsound/tests/dsound8.c ++++ b/dlls/dsound/tests/dsound8.c +@@ -1492,7 +1492,7 @@ static void test_distortion_parameters(IDirectSoundBuffer8 *secondary8) + DSFXDistortion params; + + rc = IDirectSoundFXDistortion_GetAllParameters(distortion, ¶ms); +- todo_wine ok(rc == DS_OK, "Failed: %08x\n", rc); ++ ok(rc == DS_OK, "Failed: %08x\n", rc); + if (rc == DS_OK) + { + ok(params.fGain == -18.0f, "got %f\n", params.fGain); +-- +2.17.1 + diff --git a/patches/dsdmo-new-dll/0016-dsdmo-Implemnet-IDirectSoundFXCompressor-GetAllParam.patch b/patches/dsdmo-new-dll/0016-dsdmo-Implemnet-IDirectSoundFXCompressor-GetAllParam.patch new file mode 100644 index 00000000..f2cab6d4 --- /dev/null +++ b/patches/dsdmo-new-dll/0016-dsdmo-Implemnet-IDirectSoundFXCompressor-GetAllParam.patch @@ -0,0 +1,71 @@ +From 738f2f9cd5dd254643e14e5a6f6a5481f04393fb Mon Sep 17 00:00:00 2001 +From: Alistair Leslie-Hughes +Date: Tue, 3 Sep 2019 09:41:54 +1000 +Subject: [PATCH 16/27] dsdmo: Implemnet IDirectSoundFXCompressor + GetAllParameters + +--- + dlls/dsdmo/compressor.c | 18 ++++++++++++++++-- + dlls/dsound/tests/dsound8.c | 2 +- + 2 files changed, 17 insertions(+), 3 deletions(-) + +diff --git a/dlls/dsdmo/compressor.c b/dlls/dsdmo/compressor.c +index 1cf26c7437..36f8c198d0 100644 +--- a/dlls/dsdmo/compressor.c ++++ b/dlls/dsdmo/compressor.c +@@ -27,6 +27,8 @@ struct dmo_compressorfx + IMediaObject IMediaObject_iface; + IMediaObjectInPlace IMediaObjectInPlace_iface; + LONG ref; ++ ++ DSFXCompressor params; + }; + + static inline struct dmo_compressorfx *impl_from_IDirectSoundFXCompressor(IDirectSoundFXCompressor *iface) +@@ -358,9 +360,15 @@ static HRESULT WINAPI compressorfx_SetAllParameters(IDirectSoundFXCompressor *if + static HRESULT WINAPI compressorfx_GetAllParameters(IDirectSoundFXCompressor *iface, DSFXCompressor *compressor) + { + struct dmo_compressorfx *This = impl_from_IDirectSoundFXCompressor(iface); +- FIXME("(%p) %p\n", This, compressor); + +- return E_NOTIMPL; ++ TRACE("(%p) %p\n", This, compressor); ++ ++ if(!compressor) ++ return E_INVALIDARG; ++ ++ *compressor = This->params; ++ ++ return S_OK; + } + + static const struct IDirectSoundFXCompressorVtbl echofxVtbl = +@@ -390,6 +398,12 @@ HRESULT WINAPI CompressorFactory_CreateInstance(IClassFactory *iface, IUnknown * + object->IMediaObjectInPlace_iface.lpVtbl = &compressor_mediainplaceVtbl; + object->ref = 1; + ++ object->params.fGain = 0.0f; ++ object->params.fAttack = 10.0f; ++ object->params.fThreshold = -20.0f; ++ object->params.fRatio = 3.0f; ++ object->params.fPredelay = 4.0f; ++ + ret = compressorfx_QueryInterface(&object->IDirectSoundFXCompressor_iface, riid, ppv); + compressorfx_Release(&object->IDirectSoundFXCompressor_iface); + +diff --git a/dlls/dsound/tests/dsound8.c b/dlls/dsound/tests/dsound8.c +index b75f097355..c624fcd6d2 100644 +--- a/dlls/dsound/tests/dsound8.c ++++ b/dlls/dsound/tests/dsound8.c +@@ -1518,7 +1518,7 @@ static void test_compressor_parameters(IDirectSoundBuffer8 *secondary8) + DSFXCompressor params; + + rc = IDirectSoundFXCompressor_GetAllParameters(compressor, ¶ms); +- todo_wine ok(rc == DS_OK, "Failed: %08x\n", rc); ++ ok(rc == DS_OK, "Failed: %08x\n", rc); + if (rc == DS_OK) + { + ok(params.fGain == 0.0f, "got %f\n", params.fGain); +-- +2.17.1 + diff --git a/patches/dsdmo-new-dll/0017-dsdmo-Implemnet-IDirectSoundFXParamEq-GetAllParamete.patch b/patches/dsdmo-new-dll/0017-dsdmo-Implemnet-IDirectSoundFXParamEq-GetAllParamete.patch new file mode 100644 index 00000000..9f012399 --- /dev/null +++ b/patches/dsdmo-new-dll/0017-dsdmo-Implemnet-IDirectSoundFXParamEq-GetAllParamete.patch @@ -0,0 +1,68 @@ +From 86ee935b635ea60d179a912b0f3113d64d5e6a86 Mon Sep 17 00:00:00 2001 +From: Alistair Leslie-Hughes +Date: Tue, 3 Sep 2019 09:44:41 +1000 +Subject: [PATCH 17/27] dsdmo: Implemnet IDirectSoundFXParamEq GetAllParameters + +--- + dlls/dsdmo/parameq.c | 16 ++++++++++++++-- + dlls/dsound/tests/dsound8.c | 2 +- + 2 files changed, 15 insertions(+), 3 deletions(-) + +diff --git a/dlls/dsdmo/parameq.c b/dlls/dsdmo/parameq.c +index dc6d84fa08..5b6a066fd3 100644 +--- a/dlls/dsdmo/parameq.c ++++ b/dlls/dsdmo/parameq.c +@@ -27,6 +27,8 @@ struct dmo_parameqfx + IMediaObject IMediaObject_iface; + IMediaObjectInPlace IMediaObjectInPlace_iface; + LONG ref; ++ ++ DSFXParamEq params; + }; + + static inline struct dmo_parameqfx *impl_from_IDirectSoundFXParamEq(IDirectSoundFXParamEq *iface) +@@ -358,9 +360,15 @@ static HRESULT WINAPI parameqfx_SetAllParameters(IDirectSoundFXParamEq *iface, c + static HRESULT WINAPI parameqfx_GetAllParameters(IDirectSoundFXParamEq *iface, DSFXParamEq *param) + { + struct dmo_parameqfx *This = impl_from_IDirectSoundFXParamEq(iface); +- FIXME("(%p) %p\n", This, param); + +- return E_NOTIMPL; ++ TRACE("(%p) %p\n", This, param); ++ ++ if(!param) ++ return E_INVALIDARG; ++ ++ *param = This->params; ++ ++ return S_OK; + } + + static const struct IDirectSoundFXParamEqVtbl parameqfxVtbl = +@@ -390,6 +398,10 @@ HRESULT WINAPI ParamEqFactory_CreateInstance(IClassFactory *iface, IUnknown *out + object->IMediaObjectInPlace_iface.lpVtbl = ¶meq_mediainplaceVtbl; + object->ref = 1; + ++ object->params.fCenter = 3675.0f; ++ object->params.fBandwidth = 12.0f; ++ object->params.fGain = 0.0f; ++ + ret = parameqfx_QueryInterface(&object->IDirectSoundFXParamEq_iface, riid, ppv); + parameqfx_Release(&object->IDirectSoundFXParamEq_iface); + +diff --git a/dlls/dsound/tests/dsound8.c b/dlls/dsound/tests/dsound8.c +index c624fcd6d2..e812130324 100644 +--- a/dlls/dsound/tests/dsound8.c ++++ b/dlls/dsound/tests/dsound8.c +@@ -1544,7 +1544,7 @@ static void test_parameq_parameters(IDirectSoundBuffer8 *secondary8) + DSFXParamEq params; + + rc = IDirectSoundFXParamEq_GetAllParameters(parameq, ¶ms); +- todo_wine ok(rc == DS_OK, "Failed: %08x\n", rc); ++ ok(rc == DS_OK, "Failed: %08x\n", rc); + if (rc == DS_OK) + { + ok(params.fCenter == 3675.0f, "got %f\n", params.fCenter); +-- +2.17.1 + diff --git a/patches/dsdmo-new-dll/0018-dsdmo-Implemnet-IDirectSoundFXI3DL2Reverb-GetAllPara.patch b/patches/dsdmo-new-dll/0018-dsdmo-Implemnet-IDirectSoundFXI3DL2Reverb-GetAllPara.patch new file mode 100644 index 00000000..427525cd --- /dev/null +++ b/patches/dsdmo-new-dll/0018-dsdmo-Implemnet-IDirectSoundFXI3DL2Reverb-GetAllPara.patch @@ -0,0 +1,77 @@ +From 7ec367e8edd32779638fa873ed1fce6adc8dc52e Mon Sep 17 00:00:00 2001 +From: Alistair Leslie-Hughes +Date: Tue, 3 Sep 2019 09:49:10 +1000 +Subject: [PATCH 18/27] dsdmo: Implemnet IDirectSoundFXI3DL2Reverb + GetAllParameters + +--- + dlls/dsdmo/reverb2.c | 25 ++++++++++++++++++++++--- + dlls/dsound/tests/dsound8.c | 2 +- + 2 files changed, 23 insertions(+), 4 deletions(-) + +diff --git a/dlls/dsdmo/reverb2.c b/dlls/dsdmo/reverb2.c +index 6e2ab93413..44a6b5f1b4 100644 +--- a/dlls/dsdmo/reverb2.c ++++ b/dlls/dsdmo/reverb2.c +@@ -27,6 +27,8 @@ struct dmo_reverb2fx + IMediaObject IMediaObject_iface; + IMediaObjectInPlace IMediaObjectInPlace_iface; + LONG ref; ++ ++ DSFXI3DL2Reverb params; + }; + + static inline struct dmo_reverb2fx *impl_from_IDirectSoundFXI3DL2Reverb(IDirectSoundFXI3DL2Reverb *iface) +@@ -357,10 +359,16 @@ static HRESULT WINAPI reverb2_SetAllParameters(IDirectSoundFXI3DL2Reverb *iface, + + static HRESULT WINAPI reverb2_GetAllParameters(IDirectSoundFXI3DL2Reverb *iface, DSFXI3DL2Reverb *reverb) + { +- struct dmo_reverb2fx *This = impl_from_IDirectSoundFXI3DL2Reverb(iface); +- FIXME("(%p) %p\n", This, reverb); ++ struct dmo_reverb2fx *This = impl_from_IDirectSoundFXI3DL2Reverb(iface); + +- return E_NOTIMPL; ++ TRACE("(%p) %p\n", This, reverb); ++ ++ if(!reverb) ++ return E_INVALIDARG; ++ ++ *reverb = This->params; ++ ++ return S_OK; + } + + static HRESULT WINAPI reverb2_SetPreset(IDirectSoundFXI3DL2Reverb *iface, DWORD preset) +@@ -429,5 +437,16 @@ HRESULT WINAPI I3DL2Reverb_CreateInstance(IClassFactory *iface, IUnknown *outer, + ret = reverb2_QueryInterface(&object->IDirectSoundFXI3DL2Reverb_iface, riid, ppv); + reverb2_Release(&object->IDirectSoundFXI3DL2Reverb_iface); + ++ object->params.lRoom = DSFX_I3DL2REVERB_ROOM_DEFAULT; ++ object->params.flRoomRolloffFactor = DSFX_I3DL2REVERB_ROOMROLLOFFFACTOR_DEFAULT; ++ object->params.flDecayTime = DSFX_I3DL2REVERB_DECAYTIME_DEFAULT; ++ object->params.flDecayHFRatio = DSFX_I3DL2REVERB_DECAYHFRATIO_DEFAULT; ++ object->params.lReflections = DSFX_I3DL2REVERB_REFLECTIONS_DEFAULT; ++ object->params.lReverb = DSFX_I3DL2REVERB_REVERB_DEFAULT; ++ object->params.flReverbDelay = DSFX_I3DL2REVERB_REVERBDELAY_DEFAULT; ++ object->params.flDiffusion = DSFX_I3DL2REVERB_DIFFUSION_DEFAULT; ++ object->params.flDensity = DSFX_I3DL2REVERB_DENSITY_DEFAULT; ++ object->params.flHFReference = DSFX_I3DL2REVERB_HFREFERENCE_DEFAULT; ++ + return ret; + } +diff --git a/dlls/dsound/tests/dsound8.c b/dlls/dsound/tests/dsound8.c +index e812130324..252de27ad4 100644 +--- a/dlls/dsound/tests/dsound8.c ++++ b/dlls/dsound/tests/dsound8.c +@@ -1568,7 +1568,7 @@ static void test_reverb_parameters(IDirectSoundBuffer8 *secondary8) + DSFXI3DL2Reverb params; + + rc = IDirectSoundFXI3DL2Reverb_GetAllParameters(reverb, ¶ms); +- todo_wine ok(rc == DS_OK, "Failed: %08x\n", rc); ++ ok(rc == DS_OK, "Failed: %08x\n", rc); + if (rc == DS_OK) + { + ok(params.lRoom == -1000, "got %d\n", params.lRoom); +-- +2.17.1 + diff --git a/patches/dsdmo-new-dll/0019-dsound-IDirectSoundBuffer8-GetObjectInPath-loops-for.patch b/patches/dsdmo-new-dll/0019-dsound-IDirectSoundBuffer8-GetObjectInPath-loops-for.patch new file mode 100644 index 00000000..7b666464 --- /dev/null +++ b/patches/dsdmo-new-dll/0019-dsound-IDirectSoundBuffer8-GetObjectInPath-loops-for.patch @@ -0,0 +1,111 @@ +From 1f9415285a79c8e92eae56d883603e03485668b3 Mon Sep 17 00:00:00 2001 +From: Alistair Leslie-Hughes +Date: Tue, 3 Sep 2019 11:44:55 +1000 +Subject: [PATCH 19/27] dsound: IDirectSoundBuffer8 GetObjectInPath loops for + the requested interface + +--- + dlls/dsound/buffer.c | 19 +++++++++++++++++++ + dlls/dsound/tests/dsound8.c | 14 +++++++------- + 2 files changed, 26 insertions(+), 7 deletions(-) + +diff --git a/dlls/dsound/buffer.c b/dlls/dsound/buffer.c +index f600652914..ad0f549f20 100644 +--- a/dlls/dsound/buffer.c ++++ b/dlls/dsound/buffer.c +@@ -872,6 +872,25 @@ static HRESULT WINAPI IDirectSoundBufferImpl_GetObjectInPath(IDirectSoundBuffer8 + if (!ppObject) + return E_INVALIDARG; + ++ if(dwIndex == 0 && !IsEqualGUID(rguidObject, &GUID_All_Objects)) ++ { ++ int i; ++ ++ for(i = 0; i < This->num_filters; i++) ++ { ++ if(IsEqualGUID(rguidObject, &This->filters[i].guid)) ++ { ++ if (SUCCEEDED(IMediaObject_QueryInterface(This->filters[i].obj, rguidInterface, ppObject))) ++ return DS_OK; ++ ++ return E_NOINTERFACE; ++ } ++ } ++ ++ WARN("control unavailable\n"); ++ return DSERR_OBJECTNOTFOUND; ++ } ++ + if (IsEqualGUID(rguidObject, &This->filters[dwIndex].guid) || IsEqualGUID(rguidObject, &GUID_All_Objects)) { + if (SUCCEEDED(IMediaObject_QueryInterface(This->filters[dwIndex].obj, rguidInterface, ppObject))) + return DS_OK; +diff --git a/dlls/dsound/tests/dsound8.c b/dlls/dsound/tests/dsound8.c +index 252de27ad4..f03b5ccedb 100644 +--- a/dlls/dsound/tests/dsound8.c ++++ b/dlls/dsound/tests/dsound8.c +@@ -1407,7 +1407,7 @@ static void test_gargle_parameters(IDirectSoundBuffer8 *secondary8) + IDirectSoundFXGargle *gargle; + + rc = IDirectSoundBuffer8_GetObjectInPath(secondary8, &GUID_DSFX_STANDARD_GARGLE, 0, &IID_IDirectSoundFXGargle, (void**)&gargle); +- todo_wine ok(rc == DS_OK, "GetObjectInPath failed: %08x\n", rc); ++ ok(rc == DS_OK, "GetObjectInPath failed: %08x\n", rc); + if (rc == DS_OK) + { + DSFXGargle params; +@@ -1430,7 +1430,7 @@ static void test_chorus_parameters(IDirectSoundBuffer8 *secondary8) + IDirectSoundFXChorus *chorus; + + rc = IDirectSoundBuffer8_GetObjectInPath(secondary8, &GUID_DSFX_STANDARD_CHORUS, 0, &IID_IDirectSoundFXChorus,(void**)&chorus); +- todo_wine ok(rc == DS_OK, "GetObjectInPath failed: %08x\n", rc); ++ ok(rc == DS_OK, "GetObjectInPath failed: %08x\n", rc); + if (rc == DS_OK) + { + DSFXChorus params; +@@ -1458,7 +1458,7 @@ static void test_flanger_parameters(IDirectSoundBuffer8 *secondary8) + IDirectSoundFXFlanger *flanger; + + rc = IDirectSoundBuffer8_GetObjectInPath(secondary8, &GUID_DSFX_STANDARD_FLANGER, 0, &IID_IDirectSoundFXFlanger,(void**)&flanger); +- todo_wine ok(rc == DS_OK, "GetObjectInPath failed: %08x\n", rc); ++ ok(rc == DS_OK, "GetObjectInPath failed: %08x\n", rc); + if (rc == DS_OK) + { + DSFXFlanger params; +@@ -1486,7 +1486,7 @@ static void test_distortion_parameters(IDirectSoundBuffer8 *secondary8) + IDirectSoundFXDistortion *distortion; + + rc = IDirectSoundBuffer8_GetObjectInPath(secondary8, &GUID_DSFX_STANDARD_DISTORTION, 0, &IID_IDirectSoundFXDistortion,(void**)&distortion); +- todo_wine ok(rc == DS_OK, "GetObjectInPath failed: %08x\n", rc); ++ ok(rc == DS_OK, "GetObjectInPath failed: %08x\n", rc); + if (rc == DS_OK) + { + DSFXDistortion params; +@@ -1512,7 +1512,7 @@ static void test_compressor_parameters(IDirectSoundBuffer8 *secondary8) + IDirectSoundFXCompressor *compressor; + + rc = IDirectSoundBuffer8_GetObjectInPath(secondary8, &GUID_DSFX_STANDARD_COMPRESSOR, 0, &IID_IDirectSoundFXCompressor,(void**)&compressor); +- todo_wine ok(rc == DS_OK, "GetObjectInPath failed: %08x\n", rc); ++ ok(rc == DS_OK, "GetObjectInPath failed: %08x\n", rc); + if (rc == DS_OK) + { + DSFXCompressor params; +@@ -1538,7 +1538,7 @@ static void test_parameq_parameters(IDirectSoundBuffer8 *secondary8) + IDirectSoundFXParamEq *parameq; + + rc = IDirectSoundBuffer8_GetObjectInPath(secondary8, &GUID_DSFX_STANDARD_PARAMEQ, 0, &IID_IDirectSoundFXParamEq,(void**)¶meq); +- todo_wine ok(rc == DS_OK, "GetObjectInPath failed: %08x\n", rc); ++ ok(rc == DS_OK, "GetObjectInPath failed: %08x\n", rc); + if (rc == DS_OK) + { + DSFXParamEq params; +@@ -1562,7 +1562,7 @@ static void test_reverb_parameters(IDirectSoundBuffer8 *secondary8) + IDirectSoundFXI3DL2Reverb *reverb; + + rc = IDirectSoundBuffer8_GetObjectInPath(secondary8, &GUID_DSFX_STANDARD_I3DL2REVERB, 0, &IID_IDirectSoundFXI3DL2Reverb, (void**)&reverb); +- todo_wine ok(rc == DS_OK, "GetObjectInPath failed: %08x\n", rc); ++ ok(rc == DS_OK, "GetObjectInPath failed: %08x\n", rc); + if (rc == DS_OK) + { + DSFXI3DL2Reverb params; +-- +2.17.1 + diff --git a/patches/dsdmo-new-dll/0020-dsdmo-Implement-IDirectSoundFXEcho-SetAllParameters.patch b/patches/dsdmo-new-dll/0020-dsdmo-Implement-IDirectSoundFXEcho-SetAllParameters.patch new file mode 100644 index 00000000..55337c81 --- /dev/null +++ b/patches/dsdmo-new-dll/0020-dsdmo-Implement-IDirectSoundFXEcho-SetAllParameters.patch @@ -0,0 +1,87 @@ +From 24eef5afe7137b3d6f8463513066d1866d1832cf Mon Sep 17 00:00:00 2001 +From: Alistair Leslie-Hughes +Date: Mon, 9 Sep 2019 10:20:50 +1000 +Subject: [PATCH 20/27] dsdmo: Implement IDirectSoundFXEcho SetAllParameters. + +--- + dlls/dsdmo/echo.c | 20 ++++++++++++++++++-- + dlls/dsound/tests/dsound8.c | 31 +++++++++++++++++++++++++++++++ + 2 files changed, 49 insertions(+), 2 deletions(-) + +diff --git a/dlls/dsdmo/echo.c b/dlls/dsdmo/echo.c +index e9add8a019..f0084dca24 100644 +--- a/dlls/dsdmo/echo.c ++++ b/dlls/dsdmo/echo.c +@@ -352,9 +352,25 @@ static ULONG WINAPI echofx_Release(IDirectSoundFXEcho *iface) + static HRESULT WINAPI echofx_SetAllParameters(IDirectSoundFXEcho *iface, const DSFXEcho *echo) + { + struct dmo_echofx *This = impl_from_IDirectSoundFXEcho(iface); +- FIXME("(%p) %p\n", This, echo); + +- return E_NOTIMPL; ++ TRACE("(%p) %p\n", This, echo); ++ ++ if(!echo) ++ return E_POINTER; ++ ++ /* Out of Range values */ ++ if( (echo->fWetDryMix < DSFXECHO_WETDRYMIX_MIN || echo->fWetDryMix > DSFXECHO_WETDRYMIX_MAX) || ++ (echo->fFeedback < DSFXECHO_FEEDBACK_MIN || echo->fFeedback > DSFXECHO_FEEDBACK_MAX) || ++ (echo->fLeftDelay < DSFXECHO_LEFTDELAY_MIN || echo->fLeftDelay > DSFXECHO_LEFTDELAY_MAX) || ++ (echo->fRightDelay < DSFXECHO_RIGHTDELAY_MIN || echo->fRightDelay > DSFXECHO_RIGHTDELAY_MAX) || ++ (echo->lPanDelay != DSFXECHO_PANDELAY_MIN && echo->lPanDelay != DSFXECHO_PANDELAY_MAX) ) ++ { ++ return E_INVALIDARG; ++ } ++ ++ This->params = *echo; ++ ++ return S_OK; + } + + static HRESULT WINAPI echofx_GetAllParameters(IDirectSoundFXEcho *iface, DSFXEcho *echo) +diff --git a/dlls/dsound/tests/dsound8.c b/dlls/dsound/tests/dsound8.c +index f03b5ccedb..fd5c5a5835 100644 +--- a/dlls/dsound/tests/dsound8.c ++++ b/dlls/dsound/tests/dsound8.c +@@ -1397,6 +1397,37 @@ static void test_echo_parameters(IDirectSoundBuffer8 *secondary8) + ok(params.lPanDelay == 0, "got %d\n", params.lPanDelay); + } + ++ rc = IDirectSoundFXEcho_SetAllParameters(echo, NULL); ++ ok(rc == E_POINTER, "got: %08x\n", rc); ++ ++ /* Out of range Min */ ++ params.fWetDryMix = -1.0f; ++ ++ rc = IDirectSoundFXEcho_SetAllParameters(echo, ¶ms); ++ ok(rc == E_INVALIDARG, "got: %08x\n", rc); ++ ++ /* Out of range Max */ ++ params.fWetDryMix = 101.0f; ++ ++ rc = IDirectSoundFXEcho_SetAllParameters(echo, ¶ms); ++ ok(rc == E_INVALIDARG, "got: %08x\n", rc); ++ ++ params.fWetDryMix = DSFXECHO_WETDRYMIX_MIN; ++ ++ rc = IDirectSoundFXEcho_SetAllParameters(echo, ¶ms); ++ ok(rc == S_OK, "Failed: %08x\n", rc); ++ ++ rc = IDirectSoundFXEcho_GetAllParameters(echo, ¶ms); ++ ok(rc == DS_OK, "Failed: %08x\n", rc); ++ if (rc == DS_OK ) ++ { ++ ok(params.fWetDryMix == DSFXECHO_WETDRYMIX_MIN, "got %f\n", params.fWetDryMix); ++ ok(params.fFeedback == 50.0f, "got %f\n", params.fFeedback); ++ ok(params.fLeftDelay == 500.0f,"got %f\n", params.fLeftDelay); ++ ok(params.fRightDelay == 500.0f,"got %f\n", params.fRightDelay); ++ ok(params.lPanDelay == 0, "got %d\n", params.lPanDelay); ++ } ++ + IDirectSoundFXEcho_Release(echo); + } + } +-- +2.17.1 + diff --git a/patches/dsdmo-new-dll/0021-dsdmo-Implement-IDirectSoundFXGargle-SetAllParameter.patch b/patches/dsdmo-new-dll/0021-dsdmo-Implement-IDirectSoundFXGargle-SetAllParameter.patch new file mode 100644 index 00000000..8c39540a --- /dev/null +++ b/patches/dsdmo-new-dll/0021-dsdmo-Implement-IDirectSoundFXGargle-SetAllParameter.patch @@ -0,0 +1,80 @@ +From b2270412e6ba81f561b70ca455444158a32303a6 Mon Sep 17 00:00:00 2001 +From: Alistair Leslie-Hughes +Date: Mon, 9 Sep 2019 11:06:11 +1000 +Subject: [PATCH 21/27] dsdmo: Implement IDirectSoundFXGargle SetAllParameters. + +--- + dlls/dsdmo/gargle.c | 17 +++++++++++++++-- + dlls/dsound/tests/dsound8.c | 27 +++++++++++++++++++++++++++ + 2 files changed, 42 insertions(+), 2 deletions(-) + +diff --git a/dlls/dsdmo/gargle.c b/dlls/dsdmo/gargle.c +index 458ca8a323..03358ec535 100644 +--- a/dlls/dsdmo/gargle.c ++++ b/dlls/dsdmo/gargle.c +@@ -352,9 +352,22 @@ static ULONG WINAPI garglefx_Release(IDirectSoundFXGargle *iface) + static HRESULT WINAPI garglefx_SetAllParameters(IDirectSoundFXGargle *iface, const DSFXGargle *gargle) + { + struct dmo_garglefx *This = impl_from_IDirectSoundFXGargle(iface); +- FIXME("(%p) %p\n", This, gargle); + +- return E_NOTIMPL; ++ TRACE("(%p) %p\n", This, gargle); ++ ++ if(!gargle) ++ return E_POINTER; ++ ++ /* Out of Range values */ ++ if( (gargle->dwRateHz < DSFXGARGLE_RATEHZ_MIN || gargle->dwRateHz > DSFXGARGLE_RATEHZ_MAX) || ++ (gargle->dwWaveShape != DSFXGARGLE_WAVE_SQUARE && gargle->dwWaveShape != DSFXGARGLE_WAVE_TRIANGLE) ) ++ { ++ return E_INVALIDARG; ++ } ++ ++ This->params = *gargle; ++ ++ return S_OK; + } + + static HRESULT WINAPI garglefx_GetAllParameters(IDirectSoundFXGargle *iface, DSFXGargle *gargle) +diff --git a/dlls/dsound/tests/dsound8.c b/dlls/dsound/tests/dsound8.c +index fd5c5a5835..c634854532 100644 +--- a/dlls/dsound/tests/dsound8.c ++++ b/dlls/dsound/tests/dsound8.c +@@ -1451,6 +1451,33 @@ static void test_gargle_parameters(IDirectSoundBuffer8 *secondary8) + ok(params.dwWaveShape == DSFXGARGLE_WAVE_TRIANGLE, "got %d\n", params.dwWaveShape); + } + ++ rc = IDirectSoundFXGargle_SetAllParameters(gargle, NULL); ++ ok(rc == E_POINTER, "got: %08x\n", rc); ++ ++ /* Out of range Min */ ++ params.dwRateHz = 0; ++ ++ rc = IDirectSoundFXGargle_SetAllParameters(gargle, ¶ms); ++ ok(rc == E_INVALIDARG, "got: %08x\n", rc); ++ ++ /* Out of range Max */ ++ params.dwRateHz = 1001; ++ rc = IDirectSoundFXGargle_SetAllParameters(gargle, ¶ms); ++ ok(rc == E_INVALIDARG, "got: %08x\n", rc); ++ ++ params.dwRateHz = 800; ++ params.dwWaveShape = DSFXGARGLE_WAVE_SQUARE; ++ rc = IDirectSoundFXGargle_SetAllParameters(gargle, ¶ms); ++ ok(rc == S_OK, "got: %08x\n", rc); ++ ++ rc = IDirectSoundFXGargle_GetAllParameters(gargle, ¶ms); ++ ok(rc == DS_OK, "Failed: %08x\n", rc); ++ if (rc == DS_OK) ++ { ++ ok(params.dwRateHz == 800, "got %d\n", params.dwRateHz); ++ ok(params.dwWaveShape == DSFXGARGLE_WAVE_SQUARE, "got %d\n", params.dwWaveShape); ++ } ++ + IDirectSoundFXGargle_Release(gargle); + } + } +-- +2.17.1 + diff --git a/patches/dsdmo-new-dll/0022-dsdmo-Implement-IDirectSoundFXChorus-SetAllParameter.patch b/patches/dsdmo-new-dll/0022-dsdmo-Implement-IDirectSoundFXChorus-SetAllParameter.patch new file mode 100644 index 00000000..3c678610 --- /dev/null +++ b/patches/dsdmo-new-dll/0022-dsdmo-Implement-IDirectSoundFXChorus-SetAllParameter.patch @@ -0,0 +1,89 @@ +From 84ff817f06cbd61346273de9a214b6a513e59ca0 Mon Sep 17 00:00:00 2001 +From: Alistair Leslie-Hughes +Date: Mon, 9 Sep 2019 11:48:31 +1000 +Subject: [PATCH 22/27] dsdmo: Implement IDirectSoundFXChorus SetAllParameters. + +--- + dlls/dsdmo/chorus.c | 22 ++++++++++++++++++++-- + dlls/dsound/tests/dsound8.c | 31 +++++++++++++++++++++++++++++++ + 2 files changed, 51 insertions(+), 2 deletions(-) + +diff --git a/dlls/dsdmo/chorus.c b/dlls/dsdmo/chorus.c +index 03195d247d..979074f2f5 100644 +--- a/dlls/dsdmo/chorus.c ++++ b/dlls/dsdmo/chorus.c +@@ -352,9 +352,27 @@ static ULONG WINAPI chrousfx_Release(IDirectSoundFXChorus *iface) + static HRESULT WINAPI chrousfx_SetAllParameters(IDirectSoundFXChorus *iface, const DSFXChorus *chorus) + { + struct dmo_chorusfx *This = impl_from_IDirectSoundFXChorus(iface); +- FIXME("(%p) %p\n", This, chorus); + +- return E_NOTIMPL; ++ TRACE("(%p) %p\n", This, chorus); ++ ++ if(!chorus) ++ return E_POINTER; ++ ++ /* Out of Range values */ ++ if( (chorus->fWetDryMix < DSFXCHORUS_WETDRYMIX_MIN || chorus->fWetDryMix > DSFXCHORUS_WETDRYMIX_MAX) || ++ (chorus->fDepth < DSFXCHORUS_DEPTH_MIN || chorus->fDepth > DSFXCHORUS_DEPTH_MAX) || ++ (chorus->fFeedback < DSFXCHORUS_FEEDBACK_MIN || chorus->fFeedback > DSFXCHORUS_FEEDBACK_MAX) || ++ (chorus->fFrequency < DSFXCHORUS_FREQUENCY_MIN || chorus->fFrequency > DSFXCHORUS_FREQUENCY_MAX) || ++ (chorus->lWaveform != DSFXCHORUS_WAVE_SIN && chorus->lWaveform != DSFXCHORUS_WAVE_TRIANGLE ) || ++ (chorus->fDelay < DSFXCHORUS_DELAY_MIN || chorus->fDelay > DSFXCHORUS_DELAY_MAX) || ++ (chorus->lPhase < DSFXCHORUS_PHASE_MIN || chorus->lPhase > DSFXCHORUS_PHASE_MAX) ) ++ { ++ return E_INVALIDARG; ++ } ++ ++ This->params = *chorus; ++ ++ return S_OK; + } + + static HRESULT WINAPI chrousfx_GetAllParameters(IDirectSoundFXChorus *iface, DSFXChorus *chorus) +diff --git a/dlls/dsound/tests/dsound8.c b/dlls/dsound/tests/dsound8.c +index c634854532..d68e4a50f8 100644 +--- a/dlls/dsound/tests/dsound8.c ++++ b/dlls/dsound/tests/dsound8.c +@@ -1506,6 +1506,37 @@ static void test_chorus_parameters(IDirectSoundBuffer8 *secondary8) + ok(params.lPhase == 3, "got %d\n", params.lPhase); + } + ++ rc = IDirectSoundFXChorus_SetAllParameters(chorus, NULL); ++ ok(rc == E_POINTER, "got: %08x\n", rc); ++ ++ /* Out of range Min */ ++ params.fWetDryMix = -1.0f; ++ ++ rc = IDirectSoundFXChorus_SetAllParameters(chorus, ¶ms); ++ ok(rc == E_INVALIDARG, "got: %08x\n", rc); ++ ++ /* Out of range Max */ ++ params.fWetDryMix = 101.1f; ++ rc = IDirectSoundFXChorus_SetAllParameters(chorus, ¶ms); ++ ok(rc == E_INVALIDARG, "got: %08x\n", rc); ++ ++ params.fWetDryMix = 80.1f; ++ rc = IDirectSoundFXChorus_SetAllParameters(chorus, ¶ms); ++ ok(rc == S_OK, "got: %08x\n", rc); ++ ++ rc = IDirectSoundFXChorus_GetAllParameters(chorus, ¶ms); ++ ok(rc == DS_OK, "Failed: %08x\n", rc); ++ if (rc == DS_OK) ++ { ++ ok(params.fWetDryMix == 80.1f, "got %f\n", params.fWetDryMix); ++ ok(params.fDepth == 10.0f, "got %f\n", params.fDepth); ++ ok(params.fFeedback == 25.0f, "got %f\n", params.fFeedback); ++ ok(params.fFrequency == 1.1f, "got %f\n", params.fFrequency); ++ ok(params.lWaveform == DSFXCHORUS_WAVE_SIN, "got %d\n", params.lWaveform); ++ ok(params.fDelay == 16.0f, "got %f\n", params.fDelay); ++ ok(params.lPhase == 3, "got %d\n", params.lPhase); ++ } ++ + IDirectSoundFXChorus_Release(chorus); + } + } +-- +2.17.1 + diff --git a/patches/dsdmo-new-dll/0023-dsdmo-Implement-IDirectSoundFXFlanger-SetAllParamete.patch b/patches/dsdmo-new-dll/0023-dsdmo-Implement-IDirectSoundFXFlanger-SetAllParamete.patch new file mode 100644 index 00000000..c22f0df9 --- /dev/null +++ b/patches/dsdmo-new-dll/0023-dsdmo-Implement-IDirectSoundFXFlanger-SetAllParamete.patch @@ -0,0 +1,89 @@ +From 865d05785612e7a098793613cdda907337ea01ad Mon Sep 17 00:00:00 2001 +From: Alistair Leslie-Hughes +Date: Mon, 9 Sep 2019 13:44:41 +1000 +Subject: [PATCH 23/27] dsdmo: Implement IDirectSoundFXFlanger + SetAllParameters. + +--- + dlls/dsdmo/flanger.c | 21 +++++++++++++++++++-- + dlls/dsound/tests/dsound8.c | 31 +++++++++++++++++++++++++++++++ + 2 files changed, 50 insertions(+), 2 deletions(-) + +diff --git a/dlls/dsdmo/flanger.c b/dlls/dsdmo/flanger.c +index a647c862fa..e1012b8d1c 100644 +--- a/dlls/dsdmo/flanger.c ++++ b/dlls/dsdmo/flanger.c +@@ -352,9 +352,26 @@ static ULONG WINAPI flangerfx_Release(IDirectSoundFXFlanger *iface) + static HRESULT WINAPI flangerfx_SetAllParameters(IDirectSoundFXFlanger *iface, const DSFXFlanger *flanger) + { + struct dmo_flangerfx *This = impl_from_IDirectSoundFXFlanger(iface); +- FIXME("(%p) %p\n", This, flanger); + +- return E_NOTIMPL; ++ TRACE("(%p) %p\n", This, flanger); ++ ++ if(!flanger) ++ return E_POINTER; ++ ++ if( (flanger->fWetDryMix < DSFXECHO_WETDRYMIX_MIN || flanger->fWetDryMix > DSFXECHO_WETDRYMIX_MAX) || ++ (flanger->fDepth < DSFXFLANGER_DEPTH_MIN || flanger->fDepth > DSFXFLANGER_DEPTH_MAX) || ++ (flanger->fFeedback < DSFXFLANGER_FEEDBACK_MIN || flanger->fFeedback > DSFXFLANGER_FEEDBACK_MAX) || ++ (flanger->fFrequency < DSFXFLANGER_FREQUENCY_MIN || flanger->fFrequency > DSFXFLANGER_FREQUENCY_MAX) || ++ (flanger->lWaveform != DSFXFLANGER_WAVE_SIN && flanger->lWaveform != DSFXFLANGER_WAVE_TRIANGLE) || ++ (flanger->fDelay < DSFXFLANGER_DELAY_MIN || flanger->fDelay > DSFXFLANGER_DELAY_MAX) || ++ (flanger->lPhase < DSFXFLANGER_PHASE_MIN || flanger->lPhase > DSFXFLANGER_PHASE_MAX) ) ++ { ++ return E_INVALIDARG; ++ } ++ ++ This->params = *flanger; ++ ++ return S_OK; + } + + static HRESULT WINAPI flangerfx_GetAllParameters(IDirectSoundFXFlanger *iface, DSFXFlanger *flanger) +diff --git a/dlls/dsound/tests/dsound8.c b/dlls/dsound/tests/dsound8.c +index d68e4a50f8..bdcf609c8f 100644 +--- a/dlls/dsound/tests/dsound8.c ++++ b/dlls/dsound/tests/dsound8.c +@@ -1565,6 +1565,37 @@ static void test_flanger_parameters(IDirectSoundBuffer8 *secondary8) + ok(params.lPhase == 2, "got %d\n", params.lPhase); + } + ++ rc = IDirectSoundFXFlanger_SetAllParameters(flanger, NULL); ++ ok(rc == E_POINTER, "got: %08x\n", rc); ++ ++ /* Out of range Min */ ++ params.fWetDryMix = -1.0f; ++ ++ rc = IDirectSoundFXFlanger_SetAllParameters(flanger, ¶ms); ++ ok(rc == E_INVALIDARG, "got: %08x\n", rc); ++ ++ /* Out of range Max */ ++ params.fWetDryMix = 101.1f; ++ rc = IDirectSoundFXFlanger_SetAllParameters(flanger, ¶ms); ++ ok(rc == E_INVALIDARG, "got: %08x\n", rc); ++ ++ params.fWetDryMix = 80.1f; ++ rc = IDirectSoundFXFlanger_SetAllParameters(flanger, ¶ms); ++ ok(rc == S_OK, "got: %08x\n", rc); ++ ++ rc = IDirectSoundFXFlanger_GetAllParameters(flanger, ¶ms); ++ ok(rc == DS_OK, "Failed: %08x\n", rc); ++ if (rc == DS_OK) ++ { ++ ok(params.fWetDryMix == 80.1f, "got %f\n", params.fWetDryMix); ++ ok(params.fDepth == 100.0f, "got %f\n", params.fDepth); ++ ok(params.fFeedback == -50.0f, "got %f\n", params.fFeedback); ++ ok(params.fFrequency == 0.25f, "got %f\n", params.fFrequency); ++ ok(params.lWaveform == DSFXFLANGER_WAVE_SIN, "got %d\n", params.lWaveform); ++ ok(params.fDelay == 2.0f, "got %f\n", params.fDelay); ++ ok(params.lPhase == 2, "got %d\n", params.lPhase); ++ } ++ + IDirectSoundFXFlanger_Release(flanger); + } + } +-- +2.17.1 + diff --git a/patches/dsdmo-new-dll/0024-dsdmo-Implement-IDirectSoundFXDistortion-SetAllParam.patch b/patches/dsdmo-new-dll/0024-dsdmo-Implement-IDirectSoundFXDistortion-SetAllParam.patch new file mode 100644 index 00000000..c6dcb143 --- /dev/null +++ b/patches/dsdmo-new-dll/0024-dsdmo-Implement-IDirectSoundFXDistortion-SetAllParam.patch @@ -0,0 +1,85 @@ +From 538eda25bbc197fbdf0f0da58ca64b5b56b91a8a Mon Sep 17 00:00:00 2001 +From: Alistair Leslie-Hughes +Date: Mon, 9 Sep 2019 13:57:45 +1000 +Subject: [PATCH 24/27] dsdmo: Implement IDirectSoundFXDistortion + SetAllParameters. + +--- + dlls/dsdmo/distortion.c | 19 +++++++++++++++++-- + dlls/dsound/tests/dsound8.c | 29 +++++++++++++++++++++++++++++ + 2 files changed, 46 insertions(+), 2 deletions(-) + +diff --git a/dlls/dsdmo/distortion.c b/dlls/dsdmo/distortion.c +index e6952c3fe1..d5014adce0 100644 +--- a/dlls/dsdmo/distortion.c ++++ b/dlls/dsdmo/distortion.c +@@ -352,9 +352,24 @@ static ULONG WINAPI distortionfx_Release(IDirectSoundFXDistortion *iface) + static HRESULT WINAPI distortionfx_SetAllParameters(IDirectSoundFXDistortion *iface, const DSFXDistortion *distortion) + { + struct dmo_distortionfx *This = impl_from_IDirectSoundFXDistortion(iface); +- FIXME("(%p) %p\n", This, distortion); + +- return E_NOTIMPL; ++ TRACE("(%p) %p\n", This, distortion); ++ ++ if(!distortion) ++ return E_POINTER; ++ ++ if( (distortion->fGain < DSFXDISTORTION_GAIN_MIN || distortion->fGain > DSFXDISTORTION_GAIN_MAX) || ++ (distortion->fEdge < DSFXDISTORTION_EDGE_MIN || distortion->fEdge > DSFXDISTORTION_EDGE_MAX) || ++ (distortion->fPostEQCenterFrequency < DSFXDISTORTION_POSTEQCENTERFREQUENCY_MIN || distortion->fPostEQCenterFrequency > DSFXDISTORTION_POSTEQCENTERFREQUENCY_MAX) || ++ (distortion->fPostEQBandwidth < DSFXDISTORTION_POSTEQBANDWIDTH_MIN || distortion->fPostEQBandwidth > DSFXDISTORTION_POSTEQBANDWIDTH_MAX) || ++ (distortion->fPreLowpassCutoff < DSFXDISTORTION_PRELOWPASSCUTOFF_MIN || distortion->fPreLowpassCutoff > DSFXDISTORTION_PRELOWPASSCUTOFF_MAX) ) ++ { ++ return E_INVALIDARG; ++ } ++ ++ This->params = *distortion; ++ ++ return S_OK; + } + + static HRESULT WINAPI distortionfx_GetAllParameters(IDirectSoundFXDistortion *iface, DSFXDistortion *distortion) +diff --git a/dlls/dsound/tests/dsound8.c b/dlls/dsound/tests/dsound8.c +index bdcf609c8f..2d1e35699a 100644 +--- a/dlls/dsound/tests/dsound8.c ++++ b/dlls/dsound/tests/dsound8.c +@@ -1622,6 +1622,35 @@ static void test_distortion_parameters(IDirectSoundBuffer8 *secondary8) + ok(params.fPreLowpassCutoff == 3675.0f, "got %f\n", params.fPreLowpassCutoff); + } + ++ rc = IDirectSoundFXDistortion_SetAllParameters(distortion, NULL); ++ ok(rc == E_POINTER, "got: %08x\n", rc); ++ ++ /* Out of range Min */ ++ params.fGain = -61.0f; ++ ++ rc = IDirectSoundFXDistortion_SetAllParameters(distortion, ¶ms); ++ ok(rc == E_INVALIDARG, "got: %08x\n", rc); ++ ++ /* Out of range Max */ ++ params.fGain = 1.1f; ++ rc = IDirectSoundFXDistortion_SetAllParameters(distortion, ¶ms); ++ ok(rc == E_INVALIDARG, "got: %08x\n", rc); ++ ++ params.fGain = -20.0f; ++ rc = IDirectSoundFXDistortion_SetAllParameters(distortion, ¶ms); ++ ok(rc == S_OK, "got: %08x\n", rc); ++ ++ rc = IDirectSoundFXDistortion_GetAllParameters(distortion, ¶ms); ++ ok(rc == DS_OK, "Failed: %08x\n", rc); ++ if (rc == DS_OK) ++ { ++ ok(params.fGain == -20.0f, "got %f\n", params.fGain); ++ ok(params.fEdge == 15.0f, "got %f\n", params.fEdge); ++ ok(params.fPostEQCenterFrequency == 2400.0f, "got %f\n", params.fPostEQCenterFrequency); ++ ok(params.fPostEQBandwidth == 2400.0f, "got %f\n", params.fPostEQBandwidth); ++ ok(params.fPreLowpassCutoff == 3675.0f, "got %f\n", params.fPreLowpassCutoff); ++ } ++ + IDirectSoundFXDistortion_Release(distortion); + } + } +-- +2.17.1 + diff --git a/patches/dsdmo-new-dll/0025-dsdmo-Implement-IDirectSoundFXCompressor-SetAllParam.patch b/patches/dsdmo-new-dll/0025-dsdmo-Implement-IDirectSoundFXCompressor-SetAllParam.patch new file mode 100644 index 00000000..005ba5d0 --- /dev/null +++ b/patches/dsdmo-new-dll/0025-dsdmo-Implement-IDirectSoundFXCompressor-SetAllParam.patch @@ -0,0 +1,85 @@ +From 8e3ea54a9fa46fb1de19990dcf1dc4f458d5622a Mon Sep 17 00:00:00 2001 +From: Alistair Leslie-Hughes +Date: Mon, 9 Sep 2019 14:13:30 +1000 +Subject: [PATCH 25/27] dsdmo: Implement IDirectSoundFXCompressor + SetAllParameters. + +--- + dlls/dsdmo/compressor.c | 19 +++++++++++++++++-- + dlls/dsound/tests/dsound8.c | 29 +++++++++++++++++++++++++++++ + 2 files changed, 46 insertions(+), 2 deletions(-) + +diff --git a/dlls/dsdmo/compressor.c b/dlls/dsdmo/compressor.c +index 36f8c198d0..71005b1fa3 100644 +--- a/dlls/dsdmo/compressor.c ++++ b/dlls/dsdmo/compressor.c +@@ -352,9 +352,24 @@ static ULONG WINAPI compressorfx_Release(IDirectSoundFXCompressor *iface) + static HRESULT WINAPI compressorfx_SetAllParameters(IDirectSoundFXCompressor *iface, const DSFXCompressor *compressor) + { + struct dmo_compressorfx *This = impl_from_IDirectSoundFXCompressor(iface); +- FIXME("(%p) %p\n", This, compressor); + +- return E_NOTIMPL; ++ TRACE("(%p) %p\n", This, compressor); ++ ++ if(!compressor) ++ return E_POINTER; ++ ++ if( (compressor->fGain < DSFXCOMPRESSOR_GAIN_MIN || compressor->fGain > DSFXCOMPRESSOR_GAIN_MAX) || ++ (compressor->fAttack < DSFXCOMPRESSOR_ATTACK_MIN || compressor->fAttack > DSFXCOMPRESSOR_ATTACK_MAX) || ++ (compressor->fThreshold < DSFXCOMPRESSOR_THRESHOLD_MIN || compressor->fThreshold > DSFXCOMPRESSOR_THRESHOLD_MAX) || ++ (compressor->fRatio < DSFXCOMPRESSOR_RATIO_MIN || compressor->fRatio > DSFXCOMPRESSOR_RATIO_MAX) || ++ (compressor->fPredelay < DSFXCOMPRESSOR_PREDELAY_MIN || compressor->fPredelay > DSFXCOMPRESSOR_PREDELAY_MAX)) ++ { ++ return E_INVALIDARG; ++ } ++ ++ This->params = *compressor; ++ ++ return S_OK; + } + + static HRESULT WINAPI compressorfx_GetAllParameters(IDirectSoundFXCompressor *iface, DSFXCompressor *compressor) +diff --git a/dlls/dsound/tests/dsound8.c b/dlls/dsound/tests/dsound8.c +index 2d1e35699a..779ad1b111 100644 +--- a/dlls/dsound/tests/dsound8.c ++++ b/dlls/dsound/tests/dsound8.c +@@ -1677,6 +1677,35 @@ static void test_compressor_parameters(IDirectSoundBuffer8 *secondary8) + ok(params.fPredelay == 4.0f, "got %f\n", params.fPredelay); + } + ++ rc = IDirectSoundFXCompressor_SetAllParameters(compressor, NULL); ++ ok(rc == E_POINTER, "got: %08x\n", rc); ++ ++ /* Out of range Min */ ++ params.fGain = -61.0f; ++ rc = IDirectSoundFXCompressor_SetAllParameters(compressor, ¶ms); ++ ok(rc == E_INVALIDARG, "got: %08x\n", rc); ++ ++ /* Out of range Max */ ++ params.fGain = 61.1f; ++ rc = IDirectSoundFXCompressor_SetAllParameters(compressor, ¶ms); ++ ok(rc == E_INVALIDARG, "got: %08x\n", rc); ++ ++ params.fGain = -21.0f; ++ rc = IDirectSoundFXCompressor_SetAllParameters(compressor, ¶ms); ++ ok(rc == S_OK, "got: %08x\n", rc); ++ ++ params.fGain = -21.0f; ++ rc = IDirectSoundFXCompressor_GetAllParameters(compressor, ¶ms); ++ ok(rc == DS_OK, "Failed: %08x\n", rc); ++ if (rc == DS_OK) ++ { ++ ok(params.fGain == -21.0f, "got %f\n", params.fGain); ++ ok(params.fAttack == 10.0f, "got %f\n", params.fAttack); ++ ok(params.fThreshold == -20.0f, "got %f\n", params.fThreshold); ++ ok(params.fRatio == 3.0f, "got %f\n", params.fRatio); ++ ok(params.fPredelay == 4.0f, "got %f\n", params.fPredelay); ++ } ++ + IDirectSoundFXCompressor_Release(compressor); + } + } +-- +2.17.1 + diff --git a/patches/dsdmo-new-dll/0026-dsdmo-Implement-IDirectSoundFXParamEq-SetAllParamete.patch b/patches/dsdmo-new-dll/0026-dsdmo-Implement-IDirectSoundFXParamEq-SetAllParamete.patch new file mode 100644 index 00000000..a8034431 --- /dev/null +++ b/patches/dsdmo-new-dll/0026-dsdmo-Implement-IDirectSoundFXParamEq-SetAllParamete.patch @@ -0,0 +1,80 @@ +From 2ad74643881e4ff5abf75fc140df45ea8cc0d6c8 Mon Sep 17 00:00:00 2001 +From: Alistair Leslie-Hughes +Date: Mon, 9 Sep 2019 14:32:24 +1000 +Subject: [PATCH 26/27] dsdmo: Implement IDirectSoundFXParamEq + SetAllParameters. + +--- + dlls/dsdmo/parameq.c | 17 +++++++++++++++-- + dlls/dsound/tests/dsound8.c | 26 ++++++++++++++++++++++++++ + 2 files changed, 41 insertions(+), 2 deletions(-) + +diff --git a/dlls/dsdmo/parameq.c b/dlls/dsdmo/parameq.c +index 5b6a066fd3..b8e2addf9f 100644 +--- a/dlls/dsdmo/parameq.c ++++ b/dlls/dsdmo/parameq.c +@@ -352,9 +352,22 @@ static ULONG WINAPI parameqfx_Release(IDirectSoundFXParamEq *iface) + static HRESULT WINAPI parameqfx_SetAllParameters(IDirectSoundFXParamEq *iface, const DSFXParamEq *param) + { + struct dmo_parameqfx *This = impl_from_IDirectSoundFXParamEq(iface); +- FIXME("(%p) %p\n", This, param); + +- return E_NOTIMPL; ++ TRACE("(%p) %p\n", This, param); ++ ++ if(!param) ++ return E_POINTER; ++ ++ if( (param->fCenter < DSFXPARAMEQ_CENTER_MIN || param->fCenter > DSFXPARAMEQ_CENTER_MAX) || ++ (param->fBandwidth < DSFXPARAMEQ_BANDWIDTH_MIN || param->fBandwidth > DSFXPARAMEQ_BANDWIDTH_MAX) || ++ (param->fGain < DSFXPARAMEQ_GAIN_MIN || param->fGain > DSFXPARAMEQ_GAIN_MAX) ) ++ { ++ return E_INVALIDARG; ++ } ++ ++ This->params = *param; ++ ++ return S_OK; + } + + static HRESULT WINAPI parameqfx_GetAllParameters(IDirectSoundFXParamEq *iface, DSFXParamEq *param) +diff --git a/dlls/dsound/tests/dsound8.c b/dlls/dsound/tests/dsound8.c +index 779ad1b111..df1b748db0 100644 +--- a/dlls/dsound/tests/dsound8.c ++++ b/dlls/dsound/tests/dsound8.c +@@ -1730,6 +1730,32 @@ static void test_parameq_parameters(IDirectSoundBuffer8 *secondary8) + ok(params.fGain == 0.0f, "got %f\n", params.fGain); + } + ++ rc = IDirectSoundFXParamEq_SetAllParameters(parameq, NULL); ++ ok(rc == E_POINTER, "got: %08x\n", rc); ++ ++ /* Out of range Min */ ++ params.fGain = -61.0f; ++ rc = IDirectSoundFXParamEq_SetAllParameters(parameq, ¶ms); ++ ok(rc == E_INVALIDARG, "got: %08x\n", rc); ++ ++ /* Out of range Max */ ++ params.fGain = 61.1f; ++ rc = IDirectSoundFXParamEq_SetAllParameters(parameq, ¶ms); ++ ok(rc == E_INVALIDARG, "got: %08x\n", rc); ++ ++ params.fGain = -10.0f; ++ rc = IDirectSoundFXParamEq_SetAllParameters(parameq, ¶ms); ++ ok(rc == S_OK, "got: %08x\n", rc); ++ ++ rc = IDirectSoundFXParamEq_GetAllParameters(parameq, ¶ms); ++ ok(rc == DS_OK, "Failed: %08x\n", rc); ++ if (rc == DS_OK) ++ { ++ ok(params.fCenter == 3675.0f, "got %f\n", params.fCenter); ++ ok(params.fBandwidth == 12.0f, "got %f\n", params.fBandwidth); ++ ok(params.fGain == -10.0f, "got %f\n", params.fGain); ++ } ++ + IDirectSoundFXParamEq_Release(parameq); + } + } +-- +2.17.1 + diff --git a/patches/dsdmo-new-dll/0027-dsdmo-Implement-IDirectSoundFXI3DL2Reverb-SetAllPara.patch b/patches/dsdmo-new-dll/0027-dsdmo-Implement-IDirectSoundFXI3DL2Reverb-SetAllPara.patch new file mode 100644 index 00000000..6210a7e1 --- /dev/null +++ b/patches/dsdmo-new-dll/0027-dsdmo-Implement-IDirectSoundFXI3DL2Reverb-SetAllPara.patch @@ -0,0 +1,94 @@ +From bc7cbc008eb335bdc1c3d3045a3ada1889f1cd71 Mon Sep 17 00:00:00 2001 +From: Alistair Leslie-Hughes +Date: Mon, 9 Sep 2019 14:53:58 +1000 +Subject: [PATCH 27/27] dsdmo: Implement IDirectSoundFXI3DL2Reverb + SetAllParameters. + +--- + dlls/dsdmo/reverb2.c | 24 ++++++++++++++++++++++-- + dlls/dsound/tests/dsound8.c | 33 +++++++++++++++++++++++++++++++++ + 2 files changed, 55 insertions(+), 2 deletions(-) + +diff --git a/dlls/dsdmo/reverb2.c b/dlls/dsdmo/reverb2.c +index 44a6b5f1b4..52d83882ee 100644 +--- a/dlls/dsdmo/reverb2.c ++++ b/dlls/dsdmo/reverb2.c +@@ -352,9 +352,29 @@ static ULONG WINAPI reverb2_Release(IDirectSoundFXI3DL2Reverb *iface) + static HRESULT WINAPI reverb2_SetAllParameters(IDirectSoundFXI3DL2Reverb *iface, const DSFXI3DL2Reverb *reverb) + { + struct dmo_reverb2fx *This = impl_from_IDirectSoundFXI3DL2Reverb(iface); +- FIXME("(%p) %p\n", This, reverb); + +- return E_NOTIMPL; ++ TRACE("(%p) %p\n", This, reverb); ++ ++ if(!reverb) ++ return E_POINTER; ++ ++ if( (reverb->lRoom < DSFX_I3DL2REVERB_ROOM_MIN || reverb->lRoom > DSFX_I3DL2REVERB_ROOM_MAX) || ++ (reverb->flRoomRolloffFactor < DSFX_I3DL2REVERB_ROOMROLLOFFFACTOR_MIN || reverb->flRoomRolloffFactor > DSFX_I3DL2REVERB_ROOMROLLOFFFACTOR_MAX) || ++ (reverb->flDecayTime < DSFX_I3DL2REVERB_DECAYTIME_MIN || reverb->flDecayTime > DSFX_I3DL2REVERB_DECAYTIME_MAX) || ++ (reverb->flDecayHFRatio < DSFX_I3DL2REVERB_DECAYHFRATIO_MIN || reverb->flDecayHFRatio > DSFX_I3DL2REVERB_DECAYHFRATIO_MAX) || ++ (reverb->lReflections < DSFX_I3DL2REVERB_REFLECTIONS_MIN || reverb->lReflections > DSFX_I3DL2REVERB_REFLECTIONS_MAX) || ++ (reverb->lReverb < DSFX_I3DL2REVERB_REVERB_MIN || reverb->lReverb > DSFX_I3DL2REVERB_REVERB_MAX) || ++ (reverb->flReverbDelay < DSFX_I3DL2REVERB_REFLECTIONSDELAY_MIN || reverb->flReverbDelay > DSFX_I3DL2REVERB_REFLECTIONSDELAY_MAX) || ++ (reverb->flDiffusion < DSFX_I3DL2REVERB_DIFFUSION_MIN || reverb->flDiffusion > DSFX_I3DL2REVERB_DIFFUSION_MAX) || ++ (reverb->flDensity < DSFX_I3DL2REVERB_DENSITY_MIN || reverb->flDensity > DSFX_I3DL2REVERB_DENSITY_MAX) || ++ (reverb->flHFReference < DSFX_I3DL2REVERB_HFREFERENCE_MIN || reverb->flHFReference > DSFX_I3DL2REVERB_HFREFERENCE_MAX) ) ++ { ++ return E_INVALIDARG; ++ } ++ ++ This->params = *reverb; ++ ++ return S_OK; + } + + static HRESULT WINAPI reverb2_GetAllParameters(IDirectSoundFXI3DL2Reverb *iface, DSFXI3DL2Reverb *reverb) +diff --git a/dlls/dsound/tests/dsound8.c b/dlls/dsound/tests/dsound8.c +index df1b748db0..88ed4d9d4c 100644 +--- a/dlls/dsound/tests/dsound8.c ++++ b/dlls/dsound/tests/dsound8.c +@@ -1787,6 +1787,39 @@ static void test_reverb_parameters(IDirectSoundBuffer8 *secondary8) + ok(params.flHFReference == 5000.0f, "got %f\n", params.flHFReference); + } + ++ rc = IDirectSoundFXI3DL2Reverb_SetAllParameters(reverb, NULL); ++ ok(rc == E_POINTER, "got: %08x\n", rc); ++ ++ /* Out of range Min */ ++ params.lRoom = -10001; ++ rc = IDirectSoundFXI3DL2Reverb_SetAllParameters(reverb, ¶ms); ++ ok(rc == E_INVALIDARG, "got: %08x\n", rc); ++ ++ /* Out of range Max */ ++ params.lRoom = 1; ++ rc = IDirectSoundFXI3DL2Reverb_SetAllParameters(reverb, ¶ms); ++ ok(rc == E_INVALIDARG, "got: %08x\n", rc); ++ ++ params.lRoom = -900; ++ rc = IDirectSoundFXI3DL2Reverb_SetAllParameters(reverb, ¶ms); ++ ok(rc == S_OK, "got: %08x\n", rc); ++ ++ rc = IDirectSoundFXI3DL2Reverb_GetAllParameters(reverb, ¶ms); ++ ok(rc == DS_OK, "Failed: %08x\n", rc); ++ if (rc == DS_OK) ++ { ++ ok(params.lRoom == -900, "got %d\n", params.lRoom); ++ ok(params.flRoomRolloffFactor == 0.0f, "got %f\n", params.flRoomRolloffFactor); ++ ok(params.flDecayTime == 1.49f, "got %f\n", params.flDecayTime); ++ ok(params.flDecayHFRatio == 0.83f, "got %f\n", params.flDecayHFRatio); ++ ok(params.lReflections == -2602, "got %d\n", params.lReflections); ++ ok(params.lReverb == 200, "got %d\n", params.lReverb); ++ ok(params.flReverbDelay == 0.011f, "got %f\n", params.flReverbDelay); ++ ok(params.flDiffusion == 100.0f, "got %f\n", params.flDiffusion); ++ ok(params.flDensity == 100.0f, "got %f\n", params.flDensity); ++ ok(params.flHFReference == 5000.0f, "got %f\n", params.flHFReference); ++ } ++ + IDirectSoundFXI3DL2Reverb_Release(reverb); + } + } +-- +2.17.1 + diff --git a/patches/dsdmo-new-dll/defination b/patches/dsdmo-new-dll/defination new file mode 100644 index 00000000..8a71f0a9 --- /dev/null +++ b/patches/dsdmo-new-dll/defination @@ -0,0 +1,3 @@ +Fixes: [35478] - Multiple applications and games need dsdmo.dll (DirectSound Effects) +Fixes: [10603] - IDirectSoundBufferImpl_SetFX needed for sound effects in several games. +Fixes: [34708] - Silent Hill 4: The Room crashes after first videoscene when trying to go to the door. diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index b7af45b9..4fa40e2e 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -136,6 +136,7 @@ patch_enable_all () enable_dinput_remap_joystick="$1" enable_directmanipulation_new_dll="$1" enable_dmime_PChannel_range="$1" + enable_dsdmo_new_dll="$1" enable_dsound_EAX="$1" enable_dsound_Fast_Mixer="$1" enable_dwmapi_DwmGetTransportAttributes="$1" @@ -536,6 +537,9 @@ patch_enable () dmime-PChannel-range) enable_dmime_PChannel_range="$2" ;; + dsdmo-new-dll) + enable_dsdmo_new_dll="$2" + ;; dsound-EAX) enable_dsound_EAX="$2" ;; @@ -3211,6 +3215,73 @@ if test "$enable_dmime_PChannel_range" -eq 1; then ) >> "$patchlist" fi +# Patchset dsdmo-new-dll +# | +# | Modified files: +# | * configure, configure.ac, dlls/dsdmo/Makefile.in, dlls/dsdmo/chorus.c, dlls/dsdmo/compressor.c, dlls/dsdmo/distortion.c, +# | dlls/dsdmo/dsdmo.spec, dlls/dsdmo/dsdmo_classes.idl, dlls/dsdmo/dsdmo_private.h, dlls/dsdmo/echo.c, +# | dlls/dsdmo/flanger.c, dlls/dsdmo/gargle.c, dlls/dsdmo/main.c, dlls/dsdmo/parameq.c, dlls/dsdmo/reverb.c, +# | dlls/dsdmo/reverb2.c, dlls/dsound/buffer.c, dlls/dsound/tests/dsound8.c +# | +if test "$enable_dsdmo_new_dll" -eq 1; then + patch_apply dsdmo-new-dll/0001-dsdmo-Added-dll.patch + patch_apply dsdmo-new-dll/0002-dsdmo-Add-IDirectSoundFXEcho-support.patch + patch_apply dsdmo-new-dll/0003-dsdmo-Add-IDirectSoundFXChorus-support.patch + patch_apply dsdmo-new-dll/0004-dsdmo-Add-IDirectSoundFXCompressor-support.patch + patch_apply dsdmo-new-dll/0005-dsdmo-Add-IDirectSoundFXDistortion-support.patch + patch_apply dsdmo-new-dll/0006-dsdmo-Add-IDirectSoundFXFlanger-support.patch + patch_apply dsdmo-new-dll/0007-dsdmo-Add-IDirectSoundFXGargle-support.patch + patch_apply dsdmo-new-dll/0008-dsdmo-Add-IDirectSoundFXParamEq-support.patch + patch_apply dsdmo-new-dll/0009-dsdmo-Add-IDirectSoundFXWavesReverb-support.patch + patch_apply dsdmo-new-dll/0010-dsdmo-Add-IDirectSoundFXI3DL2Reverb-support.patch + patch_apply dsdmo-new-dll/0011-dsdmo-Implement-IDirectSoundFXEcho-GetAllParameters.patch + patch_apply dsdmo-new-dll/0012-dsdmo-Implement-IDirectSoundFXGargle-GetAllParameter.patch + patch_apply dsdmo-new-dll/0013-dsdmo-Implemnet-IDirectSoundFXChorus-GetAllParameter.patch + patch_apply dsdmo-new-dll/0014-dsdmo-Implemnet-IDirectSoundFXFlanger-GetAllParamete.patch + patch_apply dsdmo-new-dll/0015-dsdmo-Implemnet-IDirectSoundFXDistortion-GetAllParam.patch + patch_apply dsdmo-new-dll/0016-dsdmo-Implemnet-IDirectSoundFXCompressor-GetAllParam.patch + patch_apply dsdmo-new-dll/0017-dsdmo-Implemnet-IDirectSoundFXParamEq-GetAllParamete.patch + patch_apply dsdmo-new-dll/0018-dsdmo-Implemnet-IDirectSoundFXI3DL2Reverb-GetAllPara.patch + patch_apply dsdmo-new-dll/0019-dsound-IDirectSoundBuffer8-GetObjectInPath-loops-for.patch + patch_apply dsdmo-new-dll/0020-dsdmo-Implement-IDirectSoundFXEcho-SetAllParameters.patch + patch_apply dsdmo-new-dll/0021-dsdmo-Implement-IDirectSoundFXGargle-SetAllParameter.patch + patch_apply dsdmo-new-dll/0022-dsdmo-Implement-IDirectSoundFXChorus-SetAllParameter.patch + patch_apply dsdmo-new-dll/0023-dsdmo-Implement-IDirectSoundFXFlanger-SetAllParamete.patch + patch_apply dsdmo-new-dll/0024-dsdmo-Implement-IDirectSoundFXDistortion-SetAllParam.patch + patch_apply dsdmo-new-dll/0025-dsdmo-Implement-IDirectSoundFXCompressor-SetAllParam.patch + patch_apply dsdmo-new-dll/0026-dsdmo-Implement-IDirectSoundFXParamEq-SetAllParamete.patch + patch_apply dsdmo-new-dll/0027-dsdmo-Implement-IDirectSoundFXI3DL2Reverb-SetAllPara.patch + ( + printf '%s\n' '+ { "Alistair Leslie-Hughes", "dsdmo: Added dll.", 1 },'; + printf '%s\n' '+ { "Alistair Leslie-Hughes", "dsdmo: Add IDirectSoundFXEcho support.", 1 },'; + printf '%s\n' '+ { "Alistair Leslie-Hughes", "dsdmo: Add IDirectSoundFXChorus support.", 1 },'; + printf '%s\n' '+ { "Alistair Leslie-Hughes", "dsdmo: Add IDirectSoundFXCompressor support.", 1 },'; + printf '%s\n' '+ { "Alistair Leslie-Hughes", "dsdmo: Add IDirectSoundFXDistortion support.", 1 },'; + printf '%s\n' '+ { "Alistair Leslie-Hughes", "dsdmo: Add IDirectSoundFXFlanger support.", 1 },'; + printf '%s\n' '+ { "Alistair Leslie-Hughes", "dsdmo: Add IDirectSoundFXGargle support.", 1 },'; + printf '%s\n' '+ { "Alistair Leslie-Hughes", "dsdmo: Add IDirectSoundFXParamEq support.", 1 },'; + printf '%s\n' '+ { "Alistair Leslie-Hughes", "dsdmo: Add IDirectSoundFXWavesReverb support.", 1 },'; + printf '%s\n' '+ { "Alistair Leslie-Hughes", "dsdmo: Add IDirectSoundFXI3DL2Reverb support.", 1 },'; + printf '%s\n' '+ { "Alistair Leslie-Hughes", "dsdmo: Implement IDirectSoundFXEcho GetAllParameters.", 1 },'; + printf '%s\n' '+ { "Alistair Leslie-Hughes", "dsdmo: Implement IDirectSoundFXGargle GetAllParameters.", 1 },'; + printf '%s\n' '+ { "Alistair Leslie-Hughes", "dsdmo: Implemnet IDirectSoundFXChorus GetAllParameters.", 1 },'; + printf '%s\n' '+ { "Alistair Leslie-Hughes", "dsdmo: Implemnet IDirectSoundFXFlanger GetAllParameters.", 1 },'; + printf '%s\n' '+ { "Alistair Leslie-Hughes", "dsdmo: Implemnet IDirectSoundFXDistortion GetAllParameters.", 1 },'; + printf '%s\n' '+ { "Alistair Leslie-Hughes", "dsdmo: Implemnet IDirectSoundFXCompressor GetAllParameters.", 1 },'; + printf '%s\n' '+ { "Alistair Leslie-Hughes", "dsdmo: Implemnet IDirectSoundFXParamEq GetAllParameters.", 1 },'; + printf '%s\n' '+ { "Alistair Leslie-Hughes", "dsdmo: Implemnet IDirectSoundFXI3DL2Reverb GetAllParameters.", 1 },'; + printf '%s\n' '+ { "Alistair Leslie-Hughes", "dsound: IDirectSoundBuffer8 GetObjectInPath loops for the requested interface.", 1 },'; + printf '%s\n' '+ { "Alistair Leslie-Hughes", "dsdmo: Implement IDirectSoundFXEcho SetAllParameters.", 1 },'; + printf '%s\n' '+ { "Alistair Leslie-Hughes", "dsdmo: Implement IDirectSoundFXGargle SetAllParameters.", 1 },'; + printf '%s\n' '+ { "Alistair Leslie-Hughes", "dsdmo: Implement IDirectSoundFXChorus SetAllParameters.", 1 },'; + printf '%s\n' '+ { "Alistair Leslie-Hughes", "dsdmo: Implement IDirectSoundFXFlanger SetAllParameters.", 1 },'; + printf '%s\n' '+ { "Alistair Leslie-Hughes", "dsdmo: Implement IDirectSoundFXDistortion SetAllParameters.", 1 },'; + printf '%s\n' '+ { "Alistair Leslie-Hughes", "dsdmo: Implement IDirectSoundFXCompressor SetAllParameters.", 1 },'; + printf '%s\n' '+ { "Alistair Leslie-Hughes", "dsdmo: Implement IDirectSoundFXParamEq SetAllParameters.", 1 },'; + printf '%s\n' '+ { "Alistair Leslie-Hughes", "dsdmo: Implement IDirectSoundFXI3DL2Reverb SetAllParameters.", 1 },'; + ) >> "$patchlist" +fi + # Patchset dsound-Fast_Mixer # | # | This patchset fixes the following Wine bugs: