From: Alistair Leslie-Hughes Subject: [PATCH 3/4] dsdmo: Implement IDirectSoundFXEcho GetAllParameters. Message-Id: Date: Mon, 30 Sep 2019 00:39:38 +0000 In-Reply-To: <20190930003921.10508-1-leslie_alistair@hotmail.com> References: <20190930003921.10508-1-leslie_alistair@hotmail.com> Signed-off-by: Alistair Leslie-Hughes --- 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 b66275973f..9e76afac4e 100644 --- a/dlls/dsound/tests/dsound8.c +++ b/dlls/dsound/tests/dsound8.c @@ -1436,7 +1436,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