Rebase against 0d42388095e4fd5c7702a61824b01ce0f9fc4d74.

This commit is contained in:
Zebediah Figura 2020-07-24 18:41:25 -05:00
parent 99c296e10c
commit f7013bb1b4
35 changed files with 57 additions and 6115 deletions

View File

@ -1,4 +1,4 @@
From d8ab42564dc0d4d6be59235487c903b4197dbe8c Mon Sep 17 00:00:00 2001
From dd7df362ecf1c3a7483e930dd9b9c8519db47aba Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sat, 5 Aug 2017 03:39:55 +0200
Subject: [PATCH] ntdll: Implement process token elevation through manifests.
@ -12,7 +12,7 @@ Subject: [PATCH] ntdll: Implement process token elevation through manifests.
5 files changed, 67 insertions(+)
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index bf8d71adeb3..ff35128ebe8 100644
index 6290cbcb4e6..9a8f13901b2 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -3489,6 +3489,32 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, void **entry, ULONG_PTR unknow
@ -56,9 +56,9 @@ index bf8d71adeb3..ff35128ebe8 100644
WINE_MODREF *wm;
NTSTATUS status;
ANSI_STRING func_name;
@@ -4008,6 +4035,16 @@ void __wine_process_init(void)
NtTerminateProcess( GetCurrentProcess(), status );
@@ -4021,6 +4048,16 @@ void __wine_process_init(void)
}
#endif
+ /* elevate process if necessary */
+ status = RtlQueryInformationActivationContext( 0, NULL, 0, RunlevelInformationInActivationContext,
@ -105,10 +105,10 @@ index fb29f21cb12..d0b7ec4987b 100644
/* console functions */
extern void inherit_console( struct thread *parent_thread, struct process *parent,
diff --git a/server/protocol.def b/server/protocol.def
index 56b52dd2231..36c10ce7da8 100644
index dbc80b2d673..ed60a8da7df 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -3589,6 +3589,13 @@ struct handle_info
@@ -3567,6 +3567,13 @@ struct handle_info
@END

View File

@ -1,592 +0,0 @@
From 57c73f606deafc66230b16b5f2bea4dda86d85e0 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
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

View File

@ -1,494 +0,0 @@
From 6233bb9da6cf391db945440ed68f089b31b65e04 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
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

View File

@ -1,495 +0,0 @@
From abb55212b7e4ed43526bfc24fa78715f9dafa3e2 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
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

View File

@ -1,496 +0,0 @@
From 63f04f4a7272534796dd9b942a6dd0fe874699d2 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Sun, 25 Aug 2019 15:00:07 +1000
Subject: [PATCH] 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..0a1efa0462 100644
--- a/dlls/dsdmo/Makefile.in
+++ b/dlls/dsdmo/Makefile.in
@@ -5,6 +5,7 @@ EXTRADLLFLAGS = -mno-cygwin
C_SRCS = \
chorus.c \
compressor.c \
+ distortion.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 539626973d..a7671a5095 100644
--- a/dlls/dsdmo/main.c
+++ b/dlls/dsdmo/main.c
@@ -107,9 +107,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
@@ -133,6 +142,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

View File

@ -1,497 +0,0 @@
From aa9c0ccf2a014880c1bf469bf349d8d0e0eba83b Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Sun, 25 Aug 2019 16:51:33 +1000
Subject: [PATCH] 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 0a1efa0462c..2c4a0eabbd9 100644
--- a/dlls/dsdmo/Makefile.in
+++ b/dlls/dsdmo/Makefile.in
@@ -7,6 +7,7 @@ C_SRCS = \
compressor.c \
distortion.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 8060d4c2af3..48d1f96e888 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 03186366c64..027fb6e177f 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 00000000000..ea70bc929ba
--- /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 WINAPI flanger_mediainplace_AddRef(IMediaObjectInPlace *iface)
+{
+ struct dmo_flangerfx *This = impl_from_IMediaObjectInPlace(iface);
+ return IDirectSoundFXFlanger_AddRef(&This->IDirectSoundFXFlanger_iface);
+}
+
+static ULONG WINAPI 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 a7671a5095c..8ea1b625ea1 100644
--- a/dlls/dsdmo/main.c
+++ b/dlls/dsdmo/main.c
@@ -115,10 +115,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
@@ -147,6 +156,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

View File

@ -1,498 +0,0 @@
From 333193fd90ac8673052b1bb983b656bbfea5c6a8 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Mon, 26 Aug 2019 09:03:54 +1000
Subject: [PATCH] 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 2c4a0eabbd9..7b021a4c4f9 100644
--- a/dlls/dsdmo/Makefile.in
+++ b/dlls/dsdmo/Makefile.in
@@ -8,6 +8,7 @@ C_SRCS = \
distortion.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 48d1f96e888..f114f4831b9 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 027fb6e177f..313c66ba3df 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 00000000000..7ad1e30b67b
--- /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 8ea1b625ea1..74c3c08ee22 100644
--- a/dlls/dsdmo/main.c
+++ b/dlls/dsdmo/main.c
@@ -123,11 +123,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
@@ -161,6 +170,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

View File

@ -1,500 +0,0 @@
From 5a76d7c7f2460dc788bb5cc67a8306ed2943caf7 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
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(&parameqfx_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 = &parameqfxVtbl;
+ object->IMediaObject_iface.lpVtbl = &parameq_mediaobjectVtbl;
+ object->IMediaObjectInPlace_iface.lpVtbl = &parameq_mediainplaceVtbl;
+ object->ref = 1;
+
+ ret = parameqfx_QueryInterface(&object->IDirectSoundFXParamEq_iface, riid, ppv);
+ parameqfx_Release(&object->IDirectSoundFXParamEq_iface);
+
+ return ret;
+}
--
2.17.1

View File

@ -1,501 +0,0 @@
From 42190f4d749db861feabd4678a282e97827d78fb Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
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(&parameqfx_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

View File

@ -1,537 +0,0 @@
From 48121737e3b4838306106adb0dccc73fbcde57f1 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
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

View File

@ -1,70 +0,0 @@
From cc8299d2dea6d96d8460adf855548c58c3497d55 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
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, &params);
- 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

View File

@ -1,67 +0,0 @@
From 8b3084ab7edfbbb8d03259ce9d0fa7e2d31cef3a Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
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, &params);
- 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

View File

@ -1,72 +0,0 @@
From 55299a34a5cbf7abdbeeb521ae2267d26f555b4e Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
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, &params);
- 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

View File

@ -1,72 +0,0 @@
From 9e70f31d09979c8a75e203d52e79b8ff406d8b27 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
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, &params);
- 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

View File

@ -1,71 +0,0 @@
From 307c0c499cc76d14bc73019f8acf1910cfdec99c Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
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, &params);
- 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

View File

@ -1,71 +0,0 @@
From 738f2f9cd5dd254643e14e5a6f6a5481f04393fb Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
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, &params);
- 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

View File

@ -1,68 +0,0 @@
From 86ee935b635ea60d179a912b0f3113d64d5e6a86 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
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 = &parameq_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, &params);
- 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

View File

@ -1,77 +0,0 @@
From 7ec367e8edd32779638fa873ed1fce6adc8dc52e Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
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, &params);
- 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

View File

@ -1,111 +0,0 @@
From 1f9415285a79c8e92eae56d883603e03485668b3 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
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**)&parameq);
- 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

View File

@ -1,88 +0,0 @@
From 3bca4e54eaf2496dadfa3ebced16c76d563a1926 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Mon, 9 Sep 2019 10:20:50 +1000
Subject: [PATCH] dsdmo: Implement IDirectSoundFXEcho SetAllParameters.
---
dlls/dsdmo/echo.c | 20 ++++++++++++++++++--
dlls/dsound/tests/dsound8.c | 32 ++++++++++++++++++++++++++++++++
2 files changed, 50 insertions(+), 2 deletions(-)
diff --git a/dlls/dsdmo/echo.c b/dlls/dsdmo/echo.c
index e9add8a019e..f0084dca24d 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 073e3addb1f..b502f7598f7 100644
--- a/dlls/dsound/tests/dsound8.c
+++ b/dlls/dsound/tests/dsound8.c
@@ -1480,6 +1480,38 @@ static void test_echo_parameters(IDirectSoundBuffer8 *secondary8)
test_dsfx_interfaces("FXEcho", (IUnknown *)echo, &IID_IDirectSoundFXEcho);
+ 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, &params);
+ ok(rc == E_INVALIDARG, "got: %08x\n", rc);
+
+ /* Out of range Max */
+ params.fWetDryMix = 101.0f;
+
+ rc = IDirectSoundFXEcho_SetAllParameters(echo, &params);
+ ok(rc == E_INVALIDARG, "got: %08x\n", rc);
+
+ params.fWetDryMix = DSFXECHO_WETDRYMIX_MIN;
+
+ rc = IDirectSoundFXEcho_SetAllParameters(echo, &params);
+ ok(rc == S_OK, "Failed: %08x\n", rc);
+
+ rc = IDirectSoundFXEcho_GetAllParameters(echo, &params);
+ 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.24.0.rc1

View File

@ -1,81 +0,0 @@
From dee460be6585aaf94221575e676745f4d7806aaf Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Mon, 9 Sep 2019 11:06:11 +1000
Subject: [PATCH] dsdmo: Implement IDirectSoundFXGargle SetAllParameters.
---
dlls/dsdmo/gargle.c | 17 +++++++++++++++--
dlls/dsound/tests/dsound8.c | 28 ++++++++++++++++++++++++++++
2 files changed, 43 insertions(+), 2 deletions(-)
diff --git a/dlls/dsdmo/gargle.c b/dlls/dsdmo/gargle.c
index 458ca8a3234..03358ec5352 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 b502f7598f7..cf77d2375e5 100644
--- a/dlls/dsound/tests/dsound8.c
+++ b/dlls/dsound/tests/dsound8.c
@@ -1537,6 +1537,34 @@ static void test_gargle_parameters(IDirectSoundBuffer8 *secondary8)
test_dsfx_interfaces("FXGargle", (IUnknown *)gargle, &IID_IDirectSoundFXGargle);
+ rc = IDirectSoundFXGargle_SetAllParameters(gargle, NULL);
+ ok(rc == E_POINTER, "got: %08x\n", rc);
+
+ /* Out of range Min */
+ params.dwRateHz = 0;
+
+ rc = IDirectSoundFXGargle_SetAllParameters(gargle, &params);
+ ok(rc == E_INVALIDARG, "got: %08x\n", rc);
+
+ /* Out of range Max */
+ params.dwRateHz = 1001;
+ rc = IDirectSoundFXGargle_SetAllParameters(gargle, &params);
+ ok(rc == E_INVALIDARG, "got: %08x\n", rc);
+
+ params.dwRateHz = 800;
+ params.dwWaveShape = DSFXGARGLE_WAVE_SQUARE;
+ rc = IDirectSoundFXGargle_SetAllParameters(gargle, &params);
+ ok(rc == S_OK, "got: %08x\n", rc);
+
+ rc = IDirectSoundFXGargle_GetAllParameters(gargle, &params);
+ 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.24.0.rc1

View File

@ -1,90 +0,0 @@
From 7a940d2c6837c40e130d00536ce3068a4a07a297 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Mon, 9 Sep 2019 11:48:31 +1000
Subject: [PATCH] dsdmo: Implement IDirectSoundFXChorus SetAllParameters.
---
dlls/dsdmo/chorus.c | 22 ++++++++++++++++++++--
dlls/dsound/tests/dsound8.c | 32 ++++++++++++++++++++++++++++++++
2 files changed, 52 insertions(+), 2 deletions(-)
diff --git a/dlls/dsdmo/chorus.c b/dlls/dsdmo/chorus.c
index 03195d247db..979074f2f5a 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 cf77d2375e5..ecd755e0330 100644
--- a/dlls/dsound/tests/dsound8.c
+++ b/dlls/dsound/tests/dsound8.c
@@ -1595,6 +1595,38 @@ static void test_chorus_parameters(IDirectSoundBuffer8 *secondary8)
test_dsfx_interfaces("FXChorus", (IUnknown *)chorus, &IID_IDirectSoundFXChorus);
+ 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, &params);
+ ok(rc == E_INVALIDARG, "got: %08x\n", rc);
+
+ /* Out of range Max */
+ params.fWetDryMix = 101.1f;
+ rc = IDirectSoundFXChorus_SetAllParameters(chorus, &params);
+ ok(rc == E_INVALIDARG, "got: %08x\n", rc);
+
+ params.fWetDryMix = 80.1f;
+ rc = IDirectSoundFXChorus_SetAllParameters(chorus, &params);
+ ok(rc == S_OK, "got: %08x\n", rc);
+
+ rc = IDirectSoundFXChorus_GetAllParameters(chorus, &params);
+ 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.24.0.rc1

View File

@ -1,89 +0,0 @@
From 00e59f2589dc4a44b990c6455b0bdc6e38b97db1 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Mon, 9 Sep 2019 13:44:41 +1000
Subject: [PATCH] dsdmo: Implement IDirectSoundFXFlanger SetAllParameters.
---
dlls/dsdmo/flanger.c | 21 +++++++++++++++++++--
dlls/dsound/tests/dsound8.c | 32 ++++++++++++++++++++++++++++++++
2 files changed, 51 insertions(+), 2 deletions(-)
diff --git a/dlls/dsdmo/flanger.c b/dlls/dsdmo/flanger.c
index a647c862fa9..e1012b8d1ce 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 ecd755e0330..4e4aa8a795a 100644
--- a/dlls/dsound/tests/dsound8.c
+++ b/dlls/dsound/tests/dsound8.c
@@ -1657,6 +1657,38 @@ static void test_flanger_parameters(IDirectSoundBuffer8 *secondary8)
test_dsfx_interfaces("FXFlanger", (IUnknown *)flanger, &IID_IDirectSoundFXFlanger);
+ 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, &params);
+ ok(rc == E_INVALIDARG, "got: %08x\n", rc);
+
+ /* Out of range Max */
+ params.fWetDryMix = 101.1f;
+ rc = IDirectSoundFXFlanger_SetAllParameters(flanger, &params);
+ ok(rc == E_INVALIDARG, "got: %08x\n", rc);
+
+ params.fWetDryMix = 80.1f;
+ rc = IDirectSoundFXFlanger_SetAllParameters(flanger, &params);
+ ok(rc == S_OK, "got: %08x\n", rc);
+
+ rc = IDirectSoundFXFlanger_GetAllParameters(flanger, &params);
+ 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.24.0.rc1

View File

@ -1,85 +0,0 @@
From df349f6697236a1405f7c6df3be9af9c56b88dd3 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Mon, 9 Sep 2019 13:57:45 +1000
Subject: [PATCH] dsdmo: Implement IDirectSoundFXDistortion SetAllParameters.
---
dlls/dsdmo/distortion.c | 19 +++++++++++++++++--
dlls/dsound/tests/dsound8.c | 30 ++++++++++++++++++++++++++++++
2 files changed, 47 insertions(+), 2 deletions(-)
diff --git a/dlls/dsdmo/distortion.c b/dlls/dsdmo/distortion.c
index e6952c3fe1c..d5014adce00 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 4e4aa8a795a..3a89a2308f6 100644
--- a/dlls/dsound/tests/dsound8.c
+++ b/dlls/dsound/tests/dsound8.c
@@ -1717,6 +1717,36 @@ static void test_distortion_parameters(IDirectSoundBuffer8 *secondary8)
test_dsfx_interfaces("FXDistortion", (IUnknown *)distortion, &IID_IDirectSoundFXDistortion);
+ 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, &params);
+ ok(rc == E_INVALIDARG, "got: %08x\n", rc);
+
+ /* Out of range Max */
+ params.fGain = 1.1f;
+ rc = IDirectSoundFXDistortion_SetAllParameters(distortion, &params);
+ ok(rc == E_INVALIDARG, "got: %08x\n", rc);
+
+ params.fGain = -20.0f;
+ rc = IDirectSoundFXDistortion_SetAllParameters(distortion, &params);
+ ok(rc == S_OK, "got: %08x\n", rc);
+
+ rc = IDirectSoundFXDistortion_GetAllParameters(distortion, &params);
+ 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.24.0.rc1

View File

@ -1,85 +0,0 @@
From 5479103312056237494503e0d45fd90a7ae023e4 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Mon, 9 Sep 2019 14:13:30 +1000
Subject: [PATCH] dsdmo: Implement IDirectSoundFXCompressor SetAllParameters.
---
dlls/dsdmo/compressor.c | 19 +++++++++++++++++--
dlls/dsound/tests/dsound8.c | 30 ++++++++++++++++++++++++++++++
2 files changed, 47 insertions(+), 2 deletions(-)
diff --git a/dlls/dsdmo/compressor.c b/dlls/dsdmo/compressor.c
index 36f8c198d03..71005b1fa37 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 3a89a2308f6..aea2d3ba2a9 100644
--- a/dlls/dsound/tests/dsound8.c
+++ b/dlls/dsound/tests/dsound8.c
@@ -1775,6 +1775,36 @@ static void test_compressor_parameters(IDirectSoundBuffer8 *secondary8)
test_dsfx_interfaces("FXCompressor", (IUnknown *)compressor, &IID_IDirectSoundFXCompressor);
+ 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, &params);
+ ok(rc == E_INVALIDARG, "got: %08x\n", rc);
+
+ /* Out of range Max */
+ params.fGain = 61.1f;
+ rc = IDirectSoundFXCompressor_SetAllParameters(compressor, &params);
+ ok(rc == E_INVALIDARG, "got: %08x\n", rc);
+
+ params.fGain = -21.0f;
+ rc = IDirectSoundFXCompressor_SetAllParameters(compressor, &params);
+ ok(rc == S_OK, "got: %08x\n", rc);
+
+ params.fGain = -21.0f;
+ rc = IDirectSoundFXCompressor_GetAllParameters(compressor, &params);
+ 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.24.0.rc1

View File

@ -1,80 +0,0 @@
From d8ede09bcd5f5e29e1ea1d6543e4cf1de9806835 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Mon, 9 Sep 2019 14:32:24 +1000
Subject: [PATCH] dsdmo: Implement IDirectSoundFXParamEq SetAllParameters.
---
dlls/dsdmo/parameq.c | 17 +++++++++++++++--
dlls/dsound/tests/dsound8.c | 27 +++++++++++++++++++++++++++
2 files changed, 42 insertions(+), 2 deletions(-)
diff --git a/dlls/dsdmo/parameq.c b/dlls/dsdmo/parameq.c
index 5b6a066fd3c..b8e2addf9f4 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 aea2d3ba2a9..68a48dc285d 100644
--- a/dlls/dsound/tests/dsound8.c
+++ b/dlls/dsound/tests/dsound8.c
@@ -1831,6 +1831,33 @@ static void test_parameq_parameters(IDirectSoundBuffer8 *secondary8)
test_dsfx_interfaces("FXParamEq", (IUnknown *)parameq, &IID_IDirectSoundFXParamEq);
+ 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, &params);
+ ok(rc == E_INVALIDARG, "got: %08x\n", rc);
+
+ /* Out of range Max */
+ params.fGain = 61.1f;
+ rc = IDirectSoundFXParamEq_SetAllParameters(parameq, &params);
+ ok(rc == E_INVALIDARG, "got: %08x\n", rc);
+
+ params.fGain = -10.0f;
+ rc = IDirectSoundFXParamEq_SetAllParameters(parameq, &params);
+ ok(rc == S_OK, "got: %08x\n", rc);
+
+ rc = IDirectSoundFXParamEq_GetAllParameters(parameq, &params);
+ 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.24.0.rc1

View File

@ -1,94 +0,0 @@
From bae98635c83c1aa1f3457096267698985e9931a8 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Mon, 9 Sep 2019 14:53:58 +1000
Subject: [PATCH] dsdmo: Implement IDirectSoundFXI3DL2Reverb SetAllParameters.
---
dlls/dsdmo/reverb2.c | 24 ++++++++++++++++++++++--
dlls/dsound/tests/dsound8.c | 34 ++++++++++++++++++++++++++++++++++
2 files changed, 56 insertions(+), 2 deletions(-)
diff --git a/dlls/dsdmo/reverb2.c b/dlls/dsdmo/reverb2.c
index 44a6b5f1b40..52d83882ee3 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 68a48dc285d..6bb2766acf5 100644
--- a/dlls/dsound/tests/dsound8.c
+++ b/dlls/dsound/tests/dsound8.c
@@ -1891,6 +1891,40 @@ static void test_reverb_parameters(IDirectSoundBuffer8 *secondary8)
test_dsfx_interfaces("FXI3DL2Reverb", (IUnknown *)reverb, &IID_IDirectSoundFXI3DL2Reverb);
+ rc = IDirectSoundFXI3DL2Reverb_SetAllParameters(reverb, NULL);
+ ok(rc == E_POINTER, "got: %08x\n", rc);
+
+ /* Out of range Min */
+ params.lRoom = -10001;
+ rc = IDirectSoundFXI3DL2Reverb_SetAllParameters(reverb, &params);
+ ok(rc == E_INVALIDARG, "got: %08x\n", rc);
+
+ /* Out of range Max */
+ params.lRoom = 1;
+ rc = IDirectSoundFXI3DL2Reverb_SetAllParameters(reverb, &params);
+ ok(rc == E_INVALIDARG, "got: %08x\n", rc);
+
+ params.lRoom = -900;
+ rc = IDirectSoundFXI3DL2Reverb_SetAllParameters(reverb, &params);
+ ok(rc == S_OK, "got: %08x\n", rc);
+
+ rc = IDirectSoundFXI3DL2Reverb_GetAllParameters(reverb, &params);
+ 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.24.0.rc1

View File

@ -1,3 +0,0 @@
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.

View File

@ -1,4 +1,4 @@
From 299205b6bbf5156bad5514dd52cd1bcd67dc4f14 Mon Sep 17 00:00:00 2001
From 1d56beba1aeb7acb135db5333c2f61f40988b23f Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Fri, 21 Aug 2015 06:39:47 +0800
Subject: [PATCH] ntdll: Do not allow to deallocate thread stack for current
@ -10,22 +10,22 @@ Subject: [PATCH] ntdll: Do not allow to deallocate thread stack for current
2 files changed, 13 insertions(+)
diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h
index b509994f7ab..2c7cf2c9b07 100644
index 0714d9ff898..5ea9664edcf 100644
--- a/dlls/ntdll/unix/unix_private.h
+++ b/dlls/ntdll/unix/unix_private.h
@@ -57,6 +57,7 @@ struct ntdll_thread_data
@@ -58,6 +58,7 @@ struct ntdll_thread_data
int reply_fd; /* fd for receiving server replies */
int wait_fd[2]; /* fd for sleeping server requests */
BOOL wow64_redir; /* Wow64 filesystem redirection flag */
pthread_t pthread_id; /* pthread thread id */
+ void *pthread_stack; /* pthread stack */
struct list entry; /* entry in TEB list */
};
PRTL_THREAD_START_ROUTINE start; /* thread entry point */
void *param; /* thread entry point parameter */
diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c
index 66bcde8aff1..a08ef1ce140 100644
index 9b1ca761e9b..cb5db2891c6 100644
--- a/dlls/ntdll/unix/virtual.c
+++ b/dlls/ntdll/unix/virtual.c
@@ -2819,6 +2819,8 @@ NTSTATUS CDECL virtual_alloc_thread_stack( INITIAL_TEB *stack, SIZE_T reserve_si
@@ -2804,6 +2804,8 @@ NTSTATUS virtual_alloc_thread_stack( INITIAL_TEB *stack, SIZE_T reserve_size, SI
stack->DeallocationStack = view->base;
stack->StackBase = (char *)view->base + view->size;
stack->StackLimit = (char *)view->base + 2 * page_size;
@ -34,7 +34,7 @@ index 66bcde8aff1..a08ef1ce140 100644
done:
server_leave_uninterrupted_section( &virtual_mutex, &sigset );
return status;
@@ -3590,6 +3592,16 @@ NTSTATUS WINAPI NtFreeVirtualMemory( HANDLE process, PVOID *addr_ptr, SIZE_T *si
@@ -3594,6 +3596,16 @@ NTSTATUS WINAPI NtFreeVirtualMemory( HANDLE process, PVOID *addr_ptr, SIZE_T *si
/* Free the pages */
if (size || (base != view->base)) status = STATUS_INVALID_PARAMETER;

View File

@ -1,4 +1,4 @@
From 7264548fa5272de83119327be9f7b1f2815dbc79 Mon Sep 17 00:00:00 2001
From c8bf6f3b7bd054d712463725ddd891b87801bf27 Mon Sep 17 00:00:00 2001
From: Paul Gofman <pgofman@codeweavers.com>
Date: Tue, 14 Jan 2020 21:42:21 +0300
Subject: [PATCH] ntdll: Use free area list for virtual memory allocation.
@ -8,10 +8,10 @@ Subject: [PATCH] ntdll: Use free area list for virtual memory allocation.
1 file changed, 230 insertions(+), 112 deletions(-)
diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c
index cc7ca87241b..ec404479329 100644
index 2164c08f756..0939893d7c1 100644
--- a/dlls/ntdll/unix/virtual.c
+++ b/dlls/ntdll/unix/virtual.c
@@ -189,7 +189,11 @@ static BYTE *pages_vprot;
@@ -185,7 +185,11 @@ static BYTE *pages_vprot;
#endif
static struct file_view *view_block_start, *view_block_end, *next_free_view;
@ -23,7 +23,7 @@ index cc7ca87241b..ec404479329 100644
static void *preload_reserve_start;
static void *preload_reserve_end;
static BOOL force_exec_prot; /* whether to force PROT_EXEC on all PROT_READ mmaps */
@@ -546,13 +550,13 @@ static struct range_entry *free_ranges_lower_bound( void *addr )
@@ -527,13 +531,13 @@ static struct range_entry *free_ranges_lower_bound( void *addr )
*
* Updates the free_ranges after a new view has been created.
*/
@ -40,7 +40,7 @@ index cc7ca87241b..ec404479329 100644
/* free_ranges initial value is such that the view is either inside range or before another one. */
assert( range != free_ranges_end );
assert( range->end > view_base || next != free_ranges_end );
@@ -563,7 +567,7 @@ static void free_ranges_insert_view( struct file_view *view )
@@ -544,7 +548,7 @@ static void free_ranges_insert_view( struct file_view *view )
(range->end == view_base && next->base >= view_end))
{
/* on Win64, assert that it's correctly aligned so we're not going to be in trouble later */
@ -49,7 +49,7 @@ index cc7ca87241b..ec404479329 100644
WARN( "range %p - %p is already mapped\n", view_base, view_end );
return;
}
@@ -603,6 +607,12 @@ static void free_ranges_insert_view( struct file_view *view )
@@ -584,6 +588,12 @@ static void free_ranges_insert_view( struct file_view *view )
}
}
@ -62,7 +62,7 @@ index cc7ca87241b..ec404479329 100644
/***********************************************************************
* free_ranges_remove_view
@@ -633,6 +643,7 @@ static void free_ranges_remove_view( struct file_view *view )
@@ -614,6 +624,7 @@ static void free_ranges_remove_view( struct file_view *view )
return;
}
#endif
@ -70,7 +70,7 @@ index cc7ca87241b..ec404479329 100644
/* free_ranges initial value is such that the view is either inside range or before another one. */
assert( range != free_ranges_end );
@@ -1008,44 +1019,6 @@ static struct file_view *find_view_range( const void *addr, size_t size )
@@ -960,44 +971,6 @@ static struct file_view *find_view_range( const void *addr, size_t size )
}
@ -115,7 +115,7 @@ index cc7ca87241b..ec404479329 100644
/***********************************************************************
* try_map_free_area
*
@@ -1084,65 +1057,11 @@ static void* try_map_free_area( void *base, void *end, ptrdiff_t step,
@@ -1036,65 +1009,11 @@ static void* try_map_free_area( void *base, void *end, ptrdiff_t step,
return NULL;
}
@ -181,7 +181,7 @@ index cc7ca87241b..ec404479329 100644
*/
static void *find_reserved_free_area( void *base, void *end, size_t size, int top_down )
{
@@ -1356,8 +1275,7 @@ static void delete_view( struct file_view *view ) /* [in] View */
@@ -1308,8 +1227,7 @@ static void delete_view( struct file_view *view ) /* [in] View */
{
if (!(view->protect & VPROT_SYSTEM)) unmap_area( view->base, view->size );
set_page_vprot( view->base, view->size, 0 );
@ -191,7 +191,7 @@ index cc7ca87241b..ec404479329 100644
wine_rb_remove( &views_tree, &view->entry );
*(struct file_view **)view = next_free_view;
next_free_view = view;
@@ -1405,8 +1323,7 @@ static NTSTATUS create_view( struct file_view **view_ret, void *base, size_t siz
@@ -1357,8 +1275,7 @@ static NTSTATUS create_view( struct file_view **view_ret, void *base, size_t siz
set_page_vprot( base, size, vprot );
wine_rb_put( &views_tree, view->base, &view->entry );
@ -201,7 +201,7 @@ index cc7ca87241b..ec404479329 100644
*view_ret = view;
@@ -1651,6 +1568,7 @@ struct alloc_area
@@ -1590,6 +1507,7 @@ struct alloc_area
int top_down;
void *limit;
void *result;
@ -209,7 +209,7 @@ index cc7ca87241b..ec404479329 100644
};
/***********************************************************************
@@ -1692,6 +1610,210 @@ static int CDECL alloc_reserved_area_callback( void *start, SIZE_T size, void *a
@@ -1631,6 +1549,210 @@ static int CDECL alloc_reserved_area_callback( void *start, SIZE_T size, void *a
return 0;
}
@ -420,7 +420,7 @@ index cc7ca87241b..ec404479329 100644
/***********************************************************************
* map_fixed_area
*
@@ -1777,11 +1899,15 @@ static NTSTATUS map_view( struct file_view **view_ret, void *base, size_t size,
@@ -1716,11 +1838,15 @@ static NTSTATUS map_view( struct file_view **view_ret, void *base, size_t size,
alloc.size = size;
alloc.top_down = top_down;
alloc.limit = (void*)(get_zero_bits_64_mask( zero_bits_64 ) & (UINT_PTR)user_space_limit);
@ -439,7 +439,7 @@ index cc7ca87241b..ec404479329 100644
}
if (mmap_enum_reserved_areas( alloc_reserved_area_callback, &alloc, top_down ))
@@ -1793,15 +1919,6 @@ static NTSTATUS map_view( struct file_view **view_ret, void *base, size_t size,
@@ -1732,15 +1858,6 @@ static NTSTATUS map_view( struct file_view **view_ret, void *base, size_t size,
goto done;
}
@ -455,14 +455,14 @@ index cc7ca87241b..ec404479329 100644
view_size = size + granularity_mask + 1;
for (;;)
@@ -2456,6 +2573,7 @@ void virtual_init(void)
@@ -2393,6 +2510,7 @@ void virtual_init(void)
if (preload_reserve_start)
address_space_start = min( address_space_start, preload_reserve_start );
}
+ TRACE("preload reserve %p-%p.\n", preload_reserve_start, preload_reserve_end);
}
size = teb_size + max( MINSIGSTKSZ, 8192 );
/* try to find space in a reserved area for the views and pages protection table */
--
2.27.0

View File

@ -1,4 +1,4 @@
From 1532ada677d566e60146cbe246f31d133b4dc955 Mon Sep 17 00:00:00 2001
From 9bf96d63c4815fd6f4480102be400517e9c8d387 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Mon, 3 Apr 2017 05:30:27 +0200
Subject: [PATCH] ntdll: Implement HashLinks field in LDR module data.
@ -110,7 +110,7 @@ index 757a230ae15..466e5a444f4 100644
test_dll_file( "kernel32.dll", TRUE );
test_dll_file( "advapi32.dll", TRUE );
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index 3513102b6f0..485fd895787 100644
index 6290cbcb4e6..9953746bdaa 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -118,6 +118,9 @@ struct file_id
@ -205,15 +205,15 @@ index 3513102b6f0..485fd895787 100644
if (wm->ldr.InInitializationOrderLinks.Flink)
RemoveEntryList(&wm->ldr.InInitializationOrderLinks);
@@ -3931,6 +3987,7 @@ void __wine_process_init(void)
ULONG_PTR val;
@@ -3908,6 +3964,7 @@ void __wine_process_init(void)
INITIAL_TEB stack;
TEB *teb = NtCurrentTeb();
PEB *peb = teb->Peb;
+ DWORD i;
peb->LdrData = &ldr;
peb->FastPebLock = &peb_lock;
@@ -3968,6 +4025,10 @@ void __wine_process_init(void)
@@ -3946,6 +4003,10 @@ void __wine_process_init(void)
load_global_options();
version_init();
@ -224,7 +224,7 @@ index 3513102b6f0..485fd895787 100644
/* setup the load callback and create ntdll modref */
RtlInitUnicodeString( &nt_name, ntdllW );
NtQueryVirtualMemory( GetCurrentProcess(), __wine_process_init, MemoryBasicInformation,
@@ -4043,6 +4104,9 @@ void __wine_process_init(void)
@@ -4032,6 +4093,9 @@ void __wine_process_init(void)
teb->Tib.StackLimit = stack.StackLimit;
teb->DeallocationStack = stack.DeallocationStack;
@ -235,10 +235,10 @@ index 3513102b6f0..485fd895787 100644
}
diff --git a/include/winternl.h b/include/winternl.h
index 9a70a2014f1..424481b1a6d 100644
index 8efdaf31193..2ed26e397c4 100644
--- a/include/winternl.h
+++ b/include/winternl.h
@@ -2370,8 +2370,8 @@ typedef struct _LDR_DATA_TABLE_ENTRY
@@ -2672,8 +2672,8 @@ typedef struct _LDR_DATA_TABLE_ENTRY
ULONG Flags;
SHORT LoadCount;
SHORT TlsIndex;

View File

@ -1,4 +1,4 @@
From 2a24fffb9cfb960455306ba8209ce6889fb379cb Mon Sep 17 00:00:00 2001
From a569b1652595651e6b3a55c83b061f774cbb785f Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sat, 30 May 2015 02:23:15 +0200
Subject: [PATCH] ntdll: Add support for hiding wine version information from
@ -10,7 +10,7 @@ Subject: [PATCH] ntdll: Add support for hiding wine version information from
2 files changed, 103 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index d0cdad0a9ff..434f3ef8803 100644
index 9a8f13901b2..3b72c5420ad 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -76,6 +76,9 @@ static const WCHAR system_path[] =
@ -32,7 +32,7 @@ index d0cdad0a9ff..434f3ef8803 100644
struct ldr_notification
{
struct list entry;
@@ -1802,6 +1807,96 @@ NTSTATUS WINAPI LdrUnlockLoaderLock( ULONG flags, ULONG_PTR magic )
@@ -1704,6 +1709,96 @@ NTSTATUS WINAPI LdrUnlockLoaderLock( ULONG flags, ULONG_PTR magic )
}
@ -129,7 +129,7 @@ index d0cdad0a9ff..434f3ef8803 100644
/******************************************************************
* LdrGetProcedureAddress (NTDLL.@)
*/
@@ -1822,7 +1917,7 @@ NTSTATUS WINAPI LdrGetProcedureAddress(HMODULE module, const ANSI_STRING *name,
@@ -1724,7 +1819,7 @@ NTSTATUS WINAPI LdrGetProcedureAddress(HMODULE module, const ANSI_STRING *name,
LPCWSTR load_path = NtCurrentTeb()->Peb->ProcessParameters->DllPath.Buffer;
void *proc = name ? find_named_export( module, exports, exp_size, name->Buffer, -1, load_path )
: find_ordinal_export( module, exports, exp_size, ord - exports->Base, load_path );
@ -138,9 +138,9 @@ index d0cdad0a9ff..434f3ef8803 100644
{
*address = proc;
ret = STATUS_SUCCESS;
@@ -4174,6 +4269,8 @@ void __wine_process_init(void)
NtTerminateProcess( GetCurrentProcess(), status );
@@ -4048,6 +4143,8 @@ void __wine_process_init(void)
}
#endif
+ hidden_exports_init( wm->ldr.FullDllName.Buffer );
+
@ -148,10 +148,10 @@ index d0cdad0a9ff..434f3ef8803 100644
status = RtlQueryInformationActivationContext( 0, NULL, 0, RunlevelInformationInActivationContext,
&runlevel, sizeof(runlevel), NULL );
diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h
index ccba5bc8bd6..75a008fdf4a 100644
index 0603ee9c495..0d088ddd07f 100644
--- a/dlls/ntdll/ntdll_misc.h
+++ b/dlls/ntdll/ntdll_misc.h
@@ -176,6 +176,11 @@ void WINAPI LdrInitializeThunk(CONTEXT*,void**,ULONG_PTR,ULONG_PTR);
@@ -128,6 +128,11 @@ void WINAPI LdrInitializeThunk(CONTEXT*,void**,ULONG_PTR,ULONG_PTR);
#define InterlockedCompareExchange64(dest,xchg,cmp) RtlInterlockedCompareExchange64(dest,xchg,cmp)
#endif

View File

@ -52,7 +52,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "2a6de8d7f7d6f5ac018d8e330cfa580fc0c3b9e5"
echo "0d42388095e4fd5c7702a61824b01ce0f9fc4d74"
}
# Show version information
@ -124,7 +124,6 @@ patch_enable_all ()
enable_dinput_joy_mappings="$1"
enable_dinput_reconnect_joystick="$1"
enable_dinput_remap_joystick="$1"
enable_dsdmo_new_dll="$1"
enable_dsound_EAX="$1"
enable_dsound_Fast_Mixer="$1"
enable_dwmapi_DwmGetTransportAttributes="$1"
@ -464,9 +463,6 @@ patch_enable ()
dinput-remap-joystick)
enable_dinput_remap_joystick="$2"
;;
dsdmo-new-dll)
enable_dsdmo_new_dll="$2"
;;
dsound-EAX)
enable_dsound_EAX="$2"
;;
@ -2692,76 +2688,6 @@ if test "$enable_dinput_remap_joystick" -eq 1; then
) >> "$patchlist"
fi
# Patchset dsdmo-new-dll
# |
# | This patchset fixes the following Wine bugs:
# | * [#35478] - Multiple applications and games need dsdmo.dll (DirectSound Effects)
# | * [#10603] - IDirectSoundBufferImpl_SetFX needed for sound effects in several games.
# | * [#34708] - Silent Hill 4: The Room crashes after first videoscene when trying to go to the door.
# |
# | Modified files:
# | * dlls/dsdmo/Makefile.in, dlls/dsdmo/chorus.c, dlls/dsdmo/compressor.c, dlls/dsdmo/distortion.c,
# | 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/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: 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:

View File

@ -1,4 +1,4 @@
From 00809244f00603cadec94cb8f80a92662091b41a Mon Sep 17 00:00:00 2001
From eb7f9381fb1109c3468047f604b0e57a1cbb4edb Mon Sep 17 00:00:00 2001
From: Paul Gofman <pgofman@codeweavers.com>
Date: Tue, 14 Jul 2020 14:43:01 +0300
Subject: [PATCH] winebuild: Call __wine_syscall_dispatcher through the fixed
@ -17,17 +17,17 @@ call syscall thunks from the loaded image.
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c
index ff569762953..f67901678f8 100644
index 9b1ca761e9b..0f4fd8d95ee 100644
--- a/dlls/ntdll/unix/virtual.c
+++ b/dlls/ntdll/unix/virtual.c
@@ -2802,20 +2802,22 @@ TEB *virtual_alloc_first_teb(void)
TEB *teb;
@@ -2594,20 +2594,22 @@ TEB *virtual_alloc_first_teb(void)
PEB *peb;
void *ptr;
NTSTATUS status;
- SIZE_T data_size = page_size;
+ SIZE_T data_size = page_size * 2;
SIZE_T peb_size = page_size;
SIZE_T block_size = signal_stack_size + teb_size;
SIZE_T peb_size = page_size * (is_win64 ? 1 : 2);
SIZE_T block_size = signal_stack_mask + 1;
SIZE_T total = 32 * block_size;
/* reserve space for shared user data */
@ -42,7 +42,7 @@ index ff569762953..f67901678f8 100644
+ *((void **)((char *)user_shared_data + 0x1000)) = __wine_syscall_dispatcher;
+
NtAllocateVirtualMemory( NtCurrentProcess(), (void **)&teb_block, 0, &total,
NtAllocateVirtualMemory( NtCurrentProcess(), &teb_block, 0, &total,
MEM_RESERVE | MEM_TOP_DOWN, PAGE_READWRITE );
teb_block_pos = 30;
diff --git a/tools/winebuild/import.c b/tools/winebuild/import.c

View File

@ -1 +1 @@
2a6de8d7f7d6f5ac018d8e330cfa580fc0c3b9e5
0d42388095e4fd5c7702a61824b01ce0f9fc4d74