Commit 861cfee2 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

dsdmo: Stub IDirectSoundFXParamEq.

parent ac528a49
......@@ -437,6 +437,57 @@ static void effect_init(struct effect *effect, IUnknown *outer, const struct eff
struct eq
{
struct effect effect;
IDirectSoundFXParamEq IDirectSoundFXParamEq_iface;
};
static struct eq *impl_from_IDirectSoundFXParamEq(IDirectSoundFXParamEq *iface)
{
return CONTAINING_RECORD(iface, struct eq, IDirectSoundFXParamEq_iface);
}
static HRESULT WINAPI eq_params_QueryInterface(IDirectSoundFXParamEq *iface, REFIID iid, void **out)
{
struct eq *effect = impl_from_IDirectSoundFXParamEq(iface);
return IUnknown_QueryInterface(effect->effect.outer_unk, iid, out);
}
static ULONG WINAPI eq_params_AddRef(IDirectSoundFXParamEq *iface)
{
struct eq *effect = impl_from_IDirectSoundFXParamEq(iface);
return IUnknown_AddRef(effect->effect.outer_unk);
}
static ULONG WINAPI eq_params_Release(IDirectSoundFXParamEq *iface)
{
struct eq *effect = impl_from_IDirectSoundFXParamEq(iface);
return IUnknown_Release(effect->effect.outer_unk);
}
static HRESULT WINAPI eq_params_SetAllParameters(IDirectSoundFXParamEq *iface, const DSFXParamEq *params)
{
struct eq *effect = impl_from_IDirectSoundFXParamEq(iface);
FIXME("effect %p, params %p, stub!\n", effect, params);
return E_NOTIMPL;
}
static HRESULT WINAPI eq_params_GetAllParameters(IDirectSoundFXParamEq *iface, DSFXParamEq *params)
{
struct eq *effect = impl_from_IDirectSoundFXParamEq(iface);
FIXME("effect %p, params %p, stub!\n", effect, params);
return E_NOTIMPL;
}
static const IDirectSoundFXParamEqVtbl eq_params_vtbl =
{
eq_params_QueryInterface,
eq_params_AddRef,
eq_params_Release,
eq_params_SetAllParameters,
eq_params_GetAllParameters,
};
static struct eq *impl_eq_from_effect(struct effect *iface)
......@@ -446,6 +497,10 @@ static struct eq *impl_eq_from_effect(struct effect *iface)
static void *eq_query_interface(struct effect *iface, REFIID iid)
{
struct eq *effect = impl_eq_from_effect(iface);
if (IsEqualGUID(iid, &IID_IDirectSoundFXParamEq))
return &effect->IDirectSoundFXParamEq_iface;
return NULL;
}
......@@ -470,6 +525,7 @@ static HRESULT eq_create(IUnknown *outer, IUnknown **out)
return E_OUTOFMEMORY;
effect_init(&object->effect, outer, &eq_ops);
object->IDirectSoundFXParamEq_iface.lpVtbl = &eq_params_vtbl;
TRACE("Created equalizer effect %p.\n", object);
*out = &object->effect.IUnknown_inner;
......
......@@ -450,15 +450,16 @@ static void test_eq_parameters(void)
hr = CoCreateInstance(&GUID_DSFX_STANDARD_PARAMEQ, NULL, CLSCTX_INPROC_SERVER,
&IID_IDirectSoundFXParamEq, (void **)&eq);
todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr);
if (hr != S_OK)
return;
ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IDirectSoundFXParamEq_GetAllParameters(eq, &params);
ok(hr == S_OK, "Got hr %#x.\n", hr);
ok(params.fCenter == 8000.0f, "Got center frequency %.8e Hz.\n", params.fCenter);
ok(params.fBandwidth == 12.0f, "Got band width %.8e semitones.\n", params.fBandwidth);
ok(params.fGain == 0.0f, "Got gain %.8e.\n", params.fGain);
todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr);
if (hr == S_OK)
{
ok(params.fCenter == 8000.0f, "Got center frequency %.8e Hz.\n", params.fCenter);
ok(params.fBandwidth == 12.0f, "Got band width %.8e semitones.\n", params.fBandwidth);
ok(params.fGain == 0.0f, "Got gain %.8e.\n", params.fGain);
}
ref = IDirectSoundFXParamEq_Release(eq);
ok(!ref, "Got outstanding refcount %d.\n", ref);
......@@ -526,7 +527,7 @@ START_TEST(dsdmo)
{&GUID_DSFX_STANDARD_FLANGER, &IID_IDirectSoundFXFlanger, TRUE},
{&GUID_DSFX_STANDARD_GARGLE, &IID_IDirectSoundFXGargle, TRUE},
{&GUID_DSFX_STANDARD_I3DL2REVERB, &IID_IDirectSoundFXI3DL2Reverb},
{&GUID_DSFX_STANDARD_PARAMEQ, &IID_IDirectSoundFXParamEq, TRUE},
{&GUID_DSFX_STANDARD_PARAMEQ, &IID_IDirectSoundFXParamEq},
{&GUID_DSFX_WAVES_REVERB, &IID_IDirectSoundFXWavesReverb},
};
unsigned int i;
......
......@@ -1724,15 +1724,13 @@ static void test_effects(void)
todo_wine ok(hr == DSERR_OBJECTNOTFOUND, "Got hr %#x.\n", hr);
hr = IDirectSoundBuffer8_GetObjectInPath(buffer8, &GUID_All_Objects, 0, &IID_IDirectSoundFXParamEq, (void **)&unk);
todo_wine ok(hr == DS_OK, "Got hr %#x.\n", hr);
if (hr == DS_OK)
IUnknown_Release(unk);
ok(hr == DS_OK, "Got hr %#x.\n", hr);
IUnknown_Release(unk);
hr = IDirectSoundBuffer8_GetObjectInPath(buffer8, &GUID_All_Objects, 0,
&IID_IDirectSoundFXParamEq, (void **)&unk);
todo_wine ok(hr == DS_OK, "Got hr %#x.\n", hr);
if (hr == DS_OK)
IUnknown_Release(unk);
ok(hr == DS_OK, "Got hr %#x.\n", hr);
IUnknown_Release(unk);
hr = IDirectSoundBuffer8_GetObjectInPath(buffer8, &GUID_All_Objects, 0,
&IID_IDirectSoundFXI3DL2Reverb, (void **)&unk);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment