wine-staging/patches/dsdmo-new-dll/0018-dsdmo-Implemnet-IDirectSoundFXI3DL2Reverb-GetAllPara.patch

78 lines
3.1 KiB
Diff
Raw Normal View History

2019-09-18 18:54:33 -07:00
From 7ec367e8edd32779638fa873ed1fce6adc8dc52e Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Tue, 3 Sep 2019 09:49:10 +1000
Subject: [PATCH 18/27] dsdmo: Implemnet IDirectSoundFXI3DL2Reverb
GetAllParameters
---
dlls/dsdmo/reverb2.c | 25 ++++++++++++++++++++++---
dlls/dsound/tests/dsound8.c | 2 +-
2 files changed, 23 insertions(+), 4 deletions(-)
diff --git a/dlls/dsdmo/reverb2.c b/dlls/dsdmo/reverb2.c
index 6e2ab93413..44a6b5f1b4 100644
--- a/dlls/dsdmo/reverb2.c
+++ b/dlls/dsdmo/reverb2.c
@@ -27,6 +27,8 @@ struct dmo_reverb2fx
IMediaObject IMediaObject_iface;
IMediaObjectInPlace IMediaObjectInPlace_iface;
LONG ref;
+
+ DSFXI3DL2Reverb params;
};
static inline struct dmo_reverb2fx *impl_from_IDirectSoundFXI3DL2Reverb(IDirectSoundFXI3DL2Reverb *iface)
@@ -357,10 +359,16 @@ static HRESULT WINAPI reverb2_SetAllParameters(IDirectSoundFXI3DL2Reverb *iface,
static HRESULT WINAPI reverb2_GetAllParameters(IDirectSoundFXI3DL2Reverb *iface, DSFXI3DL2Reverb *reverb)
{
- struct dmo_reverb2fx *This = impl_from_IDirectSoundFXI3DL2Reverb(iface);
- FIXME("(%p) %p\n", This, reverb);
+ struct dmo_reverb2fx *This = impl_from_IDirectSoundFXI3DL2Reverb(iface);
- return E_NOTIMPL;
+ TRACE("(%p) %p\n", This, reverb);
+
+ if(!reverb)
+ return E_INVALIDARG;
+
+ *reverb = This->params;
+
+ return S_OK;
}
static HRESULT WINAPI reverb2_SetPreset(IDirectSoundFXI3DL2Reverb *iface, DWORD preset)
@@ -429,5 +437,16 @@ HRESULT WINAPI I3DL2Reverb_CreateInstance(IClassFactory *iface, IUnknown *outer,
ret = reverb2_QueryInterface(&object->IDirectSoundFXI3DL2Reverb_iface, riid, ppv);
reverb2_Release(&object->IDirectSoundFXI3DL2Reverb_iface);
+ object->params.lRoom = DSFX_I3DL2REVERB_ROOM_DEFAULT;
+ object->params.flRoomRolloffFactor = DSFX_I3DL2REVERB_ROOMROLLOFFFACTOR_DEFAULT;
+ object->params.flDecayTime = DSFX_I3DL2REVERB_DECAYTIME_DEFAULT;
+ object->params.flDecayHFRatio = DSFX_I3DL2REVERB_DECAYHFRATIO_DEFAULT;
+ object->params.lReflections = DSFX_I3DL2REVERB_REFLECTIONS_DEFAULT;
+ object->params.lReverb = DSFX_I3DL2REVERB_REVERB_DEFAULT;
+ object->params.flReverbDelay = DSFX_I3DL2REVERB_REVERBDELAY_DEFAULT;
+ object->params.flDiffusion = DSFX_I3DL2REVERB_DIFFUSION_DEFAULT;
+ object->params.flDensity = DSFX_I3DL2REVERB_DENSITY_DEFAULT;
+ object->params.flHFReference = DSFX_I3DL2REVERB_HFREFERENCE_DEFAULT;
+
return ret;
}
diff --git a/dlls/dsound/tests/dsound8.c b/dlls/dsound/tests/dsound8.c
index e812130324..252de27ad4 100644
--- a/dlls/dsound/tests/dsound8.c
+++ b/dlls/dsound/tests/dsound8.c
@@ -1568,7 +1568,7 @@ static void test_reverb_parameters(IDirectSoundBuffer8 *secondary8)
DSFXI3DL2Reverb params;
rc = IDirectSoundFXI3DL2Reverb_GetAllParameters(reverb, &params);
- todo_wine ok(rc == DS_OK, "Failed: %08x\n", rc);
+ ok(rc == DS_OK, "Failed: %08x\n", rc);
if (rc == DS_OK)
{
ok(params.lRoom == -1000, "got %d\n", params.lRoom);
--
2.17.1