wine-staging/patches/dsdmo-new-dll/0012-dsdmo-Implement-IDirectSoundFXGargle-GetAllParameter.patch
2019-09-19 11:54:33 +10:00

68 lines
2.3 KiB
Diff

From 8b3084ab7edfbbb8d03259ce9d0fa7e2d31cef3a Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Tue, 3 Sep 2019 09:24:45 +1000
Subject: [PATCH 12/27] dsdmo: Implement IDirectSoundFXGargle GetAllParameters
---
dlls/dsdmo/gargle.c | 15 +++++++++++++--
dlls/dsound/tests/dsound8.c | 2 +-
2 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/dlls/dsdmo/gargle.c b/dlls/dsdmo/gargle.c
index 7ad1e30b67..458ca8a323 100644
--- a/dlls/dsdmo/gargle.c
+++ b/dlls/dsdmo/gargle.c
@@ -27,6 +27,8 @@ struct dmo_garglefx
IMediaObject IMediaObject_iface;
IMediaObjectInPlace IMediaObjectInPlace_iface;
LONG ref;
+
+ DSFXGargle params;
};
static inline struct dmo_garglefx *impl_from_IDirectSoundFXGargle(IDirectSoundFXGargle *iface)
@@ -358,9 +360,15 @@ static HRESULT WINAPI garglefx_SetAllParameters(IDirectSoundFXGargle *iface, con
static HRESULT WINAPI garglefx_GetAllParameters(IDirectSoundFXGargle *iface, DSFXGargle *gargle)
{
struct dmo_garglefx *This = impl_from_IDirectSoundFXGargle(iface);
- FIXME("(%p) %p\n", This, gargle);
- return E_NOTIMPL;
+ TRACE("(%p) %p\n", This, gargle);
+
+ if(!gargle)
+ return E_INVALIDARG;
+
+ *gargle = This->params;
+
+ return S_OK;
}
static const struct IDirectSoundFXGargleVtbl garglefxVtbl =
@@ -390,6 +398,9 @@ HRESULT WINAPI GargleFactory_CreateInstance(IClassFactory *iface, IUnknown *oute
object->IMediaObjectInPlace_iface.lpVtbl = &gargle_mediainplaceVtbl;
object->ref = 1;
+ object->params.dwRateHz = 20;
+ object->params.dwWaveShape = DSFXGARGLE_WAVE_TRIANGLE;
+
ret = garglefx_QueryInterface(&object->IDirectSoundFXGargle_iface, riid, ppv);
garglefx_Release(&object->IDirectSoundFXGargle_iface);
diff --git a/dlls/dsound/tests/dsound8.c b/dlls/dsound/tests/dsound8.c
index 244f2f98e8..2b066ef756 100644
--- a/dlls/dsound/tests/dsound8.c
+++ b/dlls/dsound/tests/dsound8.c
@@ -1413,7 +1413,7 @@ static void test_gargle_parameters(IDirectSoundBuffer8 *secondary8)
DSFXGargle params;
rc = IDirectSoundFXGargle_GetAllParameters(gargle, &params);
- todo_wine ok(rc == DS_OK, "Failed: %08x\n", rc);
+ ok(rc == DS_OK, "Failed: %08x\n", rc);
if (rc == DS_OK)
{
ok(params.dwRateHz == 20, "got %d\n", params.dwRateHz);
--
2.17.1