mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-04-13 14:42:51 -07:00
Rebase against 0d42388095e4fd5c7702a61824b01ce0f9fc4d74.
This commit is contained in:
parent
99c296e10c
commit
f7013bb1b4
@ -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
|
||||
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -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, ¶ms);
|
||||
- todo_wine ok(rc == DS_OK, "Failed: %08x\n", rc);
|
||||
+ ok(rc == DS_OK, "Failed: %08x\n", rc);
|
||||
if (rc == DS_OK )
|
||||
{
|
||||
ok(params.fWetDryMix == 50.0f, "got %f\n", params.fWetDryMix);
|
||||
--
|
||||
2.17.1
|
||||
|
@ -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, ¶ms);
|
||||
- todo_wine ok(rc == DS_OK, "Failed: %08x\n", rc);
|
||||
+ ok(rc == DS_OK, "Failed: %08x\n", rc);
|
||||
if (rc == DS_OK)
|
||||
{
|
||||
ok(params.dwRateHz == 20, "got %d\n", params.dwRateHz);
|
||||
--
|
||||
2.17.1
|
||||
|
@ -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, ¶ms);
|
||||
- todo_wine ok(rc == DS_OK, "Failed: %08x\n", rc);
|
||||
+ ok(rc == DS_OK, "Failed: %08x\n", rc);
|
||||
if (rc == DS_OK)
|
||||
{
|
||||
ok(params.fWetDryMix == 50.0f, "got %f\n", params.fWetDryMix);
|
||||
--
|
||||
2.17.1
|
||||
|
@ -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, ¶ms);
|
||||
- todo_wine ok(rc == DS_OK, "Failed: %08x\n", rc);
|
||||
+ ok(rc == DS_OK, "Failed: %08x\n", rc);
|
||||
if (rc == DS_OK)
|
||||
{
|
||||
ok(params.fWetDryMix == 50.0f, "got %f\n", params.fWetDryMix);
|
||||
--
|
||||
2.17.1
|
||||
|
@ -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, ¶ms);
|
||||
- todo_wine ok(rc == DS_OK, "Failed: %08x\n", rc);
|
||||
+ ok(rc == DS_OK, "Failed: %08x\n", rc);
|
||||
if (rc == DS_OK)
|
||||
{
|
||||
ok(params.fGain == -18.0f, "got %f\n", params.fGain);
|
||||
--
|
||||
2.17.1
|
||||
|
@ -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, ¶ms);
|
||||
- todo_wine ok(rc == DS_OK, "Failed: %08x\n", rc);
|
||||
+ ok(rc == DS_OK, "Failed: %08x\n", rc);
|
||||
if (rc == DS_OK)
|
||||
{
|
||||
ok(params.fGain == 0.0f, "got %f\n", params.fGain);
|
||||
--
|
||||
2.17.1
|
||||
|
@ -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 = ¶meq_mediainplaceVtbl;
|
||||
object->ref = 1;
|
||||
|
||||
+ object->params.fCenter = 3675.0f;
|
||||
+ object->params.fBandwidth = 12.0f;
|
||||
+ object->params.fGain = 0.0f;
|
||||
+
|
||||
ret = parameqfx_QueryInterface(&object->IDirectSoundFXParamEq_iface, riid, ppv);
|
||||
parameqfx_Release(&object->IDirectSoundFXParamEq_iface);
|
||||
|
||||
diff --git a/dlls/dsound/tests/dsound8.c b/dlls/dsound/tests/dsound8.c
|
||||
index c624fcd6d2..e812130324 100644
|
||||
--- a/dlls/dsound/tests/dsound8.c
|
||||
+++ b/dlls/dsound/tests/dsound8.c
|
||||
@@ -1544,7 +1544,7 @@ static void test_parameq_parameters(IDirectSoundBuffer8 *secondary8)
|
||||
DSFXParamEq params;
|
||||
|
||||
rc = IDirectSoundFXParamEq_GetAllParameters(parameq, ¶ms);
|
||||
- todo_wine ok(rc == DS_OK, "Failed: %08x\n", rc);
|
||||
+ ok(rc == DS_OK, "Failed: %08x\n", rc);
|
||||
if (rc == DS_OK)
|
||||
{
|
||||
ok(params.fCenter == 3675.0f, "got %f\n", params.fCenter);
|
||||
--
|
||||
2.17.1
|
||||
|
@ -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, ¶ms);
|
||||
- todo_wine ok(rc == DS_OK, "Failed: %08x\n", rc);
|
||||
+ ok(rc == DS_OK, "Failed: %08x\n", rc);
|
||||
if (rc == DS_OK)
|
||||
{
|
||||
ok(params.lRoom == -1000, "got %d\n", params.lRoom);
|
||||
--
|
||||
2.17.1
|
||||
|
@ -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**)¶meq);
|
||||
- todo_wine ok(rc == DS_OK, "GetObjectInPath failed: %08x\n", rc);
|
||||
+ ok(rc == DS_OK, "GetObjectInPath failed: %08x\n", rc);
|
||||
if (rc == DS_OK)
|
||||
{
|
||||
DSFXParamEq params;
|
||||
@@ -1562,7 +1562,7 @@ static void test_reverb_parameters(IDirectSoundBuffer8 *secondary8)
|
||||
IDirectSoundFXI3DL2Reverb *reverb;
|
||||
|
||||
rc = IDirectSoundBuffer8_GetObjectInPath(secondary8, &GUID_DSFX_STANDARD_I3DL2REVERB, 0, &IID_IDirectSoundFXI3DL2Reverb, (void**)&reverb);
|
||||
- todo_wine ok(rc == DS_OK, "GetObjectInPath failed: %08x\n", rc);
|
||||
+ ok(rc == DS_OK, "GetObjectInPath failed: %08x\n", rc);
|
||||
if (rc == DS_OK)
|
||||
{
|
||||
DSFXI3DL2Reverb params;
|
||||
--
|
||||
2.17.1
|
||||
|
@ -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, ¶ms);
|
||||
+ ok(rc == E_INVALIDARG, "got: %08x\n", rc);
|
||||
+
|
||||
+ /* Out of range Max */
|
||||
+ params.fWetDryMix = 101.0f;
|
||||
+
|
||||
+ rc = IDirectSoundFXEcho_SetAllParameters(echo, ¶ms);
|
||||
+ ok(rc == E_INVALIDARG, "got: %08x\n", rc);
|
||||
+
|
||||
+ params.fWetDryMix = DSFXECHO_WETDRYMIX_MIN;
|
||||
+
|
||||
+ rc = IDirectSoundFXEcho_SetAllParameters(echo, ¶ms);
|
||||
+ ok(rc == S_OK, "Failed: %08x\n", rc);
|
||||
+
|
||||
+ rc = IDirectSoundFXEcho_GetAllParameters(echo, ¶ms);
|
||||
+ ok(rc == DS_OK, "Failed: %08x\n", rc);
|
||||
+ if (rc == DS_OK )
|
||||
+ {
|
||||
+ ok(params.fWetDryMix == DSFXECHO_WETDRYMIX_MIN, "got %f\n", params.fWetDryMix);
|
||||
+ ok(params.fFeedback == 50.0f, "got %f\n", params.fFeedback);
|
||||
+ ok(params.fLeftDelay == 500.0f,"got %f\n", params.fLeftDelay);
|
||||
+ ok(params.fRightDelay == 500.0f,"got %f\n", params.fRightDelay);
|
||||
+ ok(params.lPanDelay == 0, "got %d\n", params.lPanDelay);
|
||||
+ }
|
||||
+
|
||||
+
|
||||
IDirectSoundFXEcho_Release(echo);
|
||||
}
|
||||
}
|
||||
--
|
||||
2.24.0.rc1
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user