wine-staging/patches/dsdmo-new-dll/0017-dsdmo-Implemnet-IDirectSoundFXParamEq-GetAllParamete.patch

69 lines
2.4 KiB
Diff
Raw Normal View History

2019-09-18 18:54:33 -07:00
From 86ee935b635ea60d179a912b0f3113d64d5e6a86 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Tue, 3 Sep 2019 09:44:41 +1000
Subject: [PATCH 17/27] dsdmo: Implemnet IDirectSoundFXParamEq GetAllParameters
---
dlls/dsdmo/parameq.c | 16 ++++++++++++++--
dlls/dsound/tests/dsound8.c | 2 +-
2 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/dlls/dsdmo/parameq.c b/dlls/dsdmo/parameq.c
index dc6d84fa08..5b6a066fd3 100644
--- a/dlls/dsdmo/parameq.c
+++ b/dlls/dsdmo/parameq.c
@@ -27,6 +27,8 @@ struct dmo_parameqfx
IMediaObject IMediaObject_iface;
IMediaObjectInPlace IMediaObjectInPlace_iface;
LONG ref;
+
+ DSFXParamEq params;
};
static inline struct dmo_parameqfx *impl_from_IDirectSoundFXParamEq(IDirectSoundFXParamEq *iface)
@@ -358,9 +360,15 @@ static HRESULT WINAPI parameqfx_SetAllParameters(IDirectSoundFXParamEq *iface, c
static HRESULT WINAPI parameqfx_GetAllParameters(IDirectSoundFXParamEq *iface, DSFXParamEq *param)
{
struct dmo_parameqfx *This = impl_from_IDirectSoundFXParamEq(iface);
- FIXME("(%p) %p\n", This, param);
- return E_NOTIMPL;
+ TRACE("(%p) %p\n", This, param);
+
+ if(!param)
+ return E_INVALIDARG;
+
+ *param = This->params;
+
+ return S_OK;
}
static const struct IDirectSoundFXParamEqVtbl parameqfxVtbl =
@@ -390,6 +398,10 @@ HRESULT WINAPI ParamEqFactory_CreateInstance(IClassFactory *iface, IUnknown *out
object->IMediaObjectInPlace_iface.lpVtbl = &parameq_mediainplaceVtbl;
object->ref = 1;
+ object->params.fCenter = 3675.0f;
+ object->params.fBandwidth = 12.0f;
+ object->params.fGain = 0.0f;
+
ret = parameqfx_QueryInterface(&object->IDirectSoundFXParamEq_iface, riid, ppv);
parameqfx_Release(&object->IDirectSoundFXParamEq_iface);
diff --git a/dlls/dsound/tests/dsound8.c b/dlls/dsound/tests/dsound8.c
index c624fcd6d2..e812130324 100644
--- a/dlls/dsound/tests/dsound8.c
+++ b/dlls/dsound/tests/dsound8.c
@@ -1544,7 +1544,7 @@ static void test_parameq_parameters(IDirectSoundBuffer8 *secondary8)
DSFXParamEq params;
rc = IDirectSoundFXParamEq_GetAllParameters(parameq, &params);
- todo_wine ok(rc == DS_OK, "Failed: %08x\n", rc);
+ ok(rc == DS_OK, "Failed: %08x\n", rc);
if (rc == DS_OK)
{
ok(params.fCenter == 3675.0f, "got %f\n", params.fCenter);
--
2.17.1