Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/dsdmo/dsdmo.idl | 8 ++++++++ dlls/dsdmo/main.c | 43 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+)
diff --git a/dlls/dsdmo/dsdmo.idl b/dlls/dsdmo/dsdmo.idl index a967186af3f..e5735b42f73 100644 --- a/dlls/dsdmo/dsdmo.idl +++ b/dlls/dsdmo/dsdmo.idl @@ -18,6 +18,14 @@
#pragma makedep register
+[ + threading(both), + progid("Microsoft.DirectSoundI3DL2ReverbDMO.1"), + vi_progid("Microsoft.DirectSoundI3DL2ReverbDMO"), + uuid(ef985e71-d5c7-42d4-ba4d-2d073e2e96f4) +] +coclass DirectSoundI3DL2ReverbDMO {} + [ threading(both), progid("Microsoft.DirectSoundWavesReverbDMO.1"), diff --git a/dlls/dsdmo/main.c b/dlls/dsdmo/main.c index 1e992fe5419..f42d29f58ba 100644 --- a/dlls/dsdmo/main.c +++ b/dlls/dsdmo/main.c @@ -434,6 +434,48 @@ static void effect_init(struct effect *effect, IUnknown *outer, const struct eff effect->ops = ops; }
+struct reverb +{ + struct effect effect; +}; + +static struct reverb *impl_reverb_from_effect(struct effect *iface) +{ + return CONTAINING_RECORD(iface, struct reverb, effect); +} + +static void *reverb_query_interface(struct effect *iface, REFIID iid) +{ + return NULL; +} + +static void reverb_destroy(struct effect *iface) +{ + struct reverb *effect = impl_reverb_from_effect(iface); + + free(effect); +} + +static const struct effect_ops reverb_ops = +{ + .destroy = reverb_destroy, + .query_interface = reverb_query_interface, +}; + +static HRESULT reverb_create(IUnknown *outer, IUnknown **out) +{ + struct reverb *object; + + if (!(object = calloc(1, sizeof(*object)))) + return E_OUTOFMEMORY; + + effect_init(&object->effect, outer, &reverb_ops); + + TRACE("Created I3DL2 reverb effect %p.\n", object); + *out = &object->effect.IUnknown_inner; + return S_OK; +} + struct waves_reverb { struct effect effect; @@ -628,6 +670,7 @@ static struct } class_factories[] = { + {&GUID_DSFX_STANDARD_I3DL2REVERB, {{&class_factory_vtbl}, reverb_create}}, {&GUID_DSFX_WAVES_REVERB, {{&class_factory_vtbl}, waves_reverb_create}}, };
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/dsdmo/main.c | 96 ++++++++++++++++++++++++++++++++++++++++ dlls/dsdmo/tests/dsdmo.c | 35 ++++++++------- 2 files changed, 114 insertions(+), 17 deletions(-)
diff --git a/dlls/dsdmo/main.c b/dlls/dsdmo/main.c index f42d29f58ba..8efef855b29 100644 --- a/dlls/dsdmo/main.c +++ b/dlls/dsdmo/main.c @@ -437,6 +437,97 @@ static void effect_init(struct effect *effect, IUnknown *outer, const struct eff struct reverb { struct effect effect; + IDirectSoundFXI3DL2Reverb IDirectSoundFXI3DL2Reverb_iface; +}; + +static struct reverb *impl_from_IDirectSoundFXI3DL2Reverb(IDirectSoundFXI3DL2Reverb *iface) +{ + return CONTAINING_RECORD(iface, struct reverb, IDirectSoundFXI3DL2Reverb_iface); +} + +static HRESULT WINAPI reverb_params_QueryInterface(IDirectSoundFXI3DL2Reverb *iface, REFIID iid, void **out) +{ + struct reverb *effect = impl_from_IDirectSoundFXI3DL2Reverb(iface); + return IUnknown_QueryInterface(effect->effect.outer_unk, iid, out); +} + +static ULONG WINAPI reverb_params_AddRef(IDirectSoundFXI3DL2Reverb *iface) +{ + struct reverb *effect = impl_from_IDirectSoundFXI3DL2Reverb(iface); + return IUnknown_AddRef(effect->effect.outer_unk); +} + +static ULONG WINAPI reverb_params_Release(IDirectSoundFXI3DL2Reverb *iface) +{ + struct reverb *effect = impl_from_IDirectSoundFXI3DL2Reverb(iface); + return IUnknown_Release(effect->effect.outer_unk); +} + +static HRESULT WINAPI reverb_params_SetAllParameters(IDirectSoundFXI3DL2Reverb *iface, const DSFXI3DL2Reverb *params) +{ + struct reverb *effect = impl_from_IDirectSoundFXI3DL2Reverb(iface); + + FIXME("effect %p, params %p, stub!\n", effect, params); + + return E_NOTIMPL; +} + +static HRESULT WINAPI reverb_params_GetAllParameters(IDirectSoundFXI3DL2Reverb *iface, DSFXI3DL2Reverb *params) +{ + struct reverb *effect = impl_from_IDirectSoundFXI3DL2Reverb(iface); + + FIXME("effect %p, params %p, stub!\n", effect, params); + + return E_NOTIMPL; +} + +static HRESULT WINAPI reverb_params_SetPreset(IDirectSoundFXI3DL2Reverb *iface, DWORD preset) +{ + struct reverb *effect = impl_from_IDirectSoundFXI3DL2Reverb(iface); + + FIXME("effect %p, preset %u, stub!\n", effect, preset); + + return E_NOTIMPL; +} + +static HRESULT WINAPI reverb_params_GetPreset(IDirectSoundFXI3DL2Reverb *iface, DWORD *preset) +{ + struct reverb *effect = impl_from_IDirectSoundFXI3DL2Reverb(iface); + + FIXME("effect %p, preset %p, stub!\n", effect, preset); + + return E_NOTIMPL; +} + +static HRESULT WINAPI reverb_params_SetQuality(IDirectSoundFXI3DL2Reverb *iface, LONG quality) +{ + struct reverb *effect = impl_from_IDirectSoundFXI3DL2Reverb(iface); + + FIXME("effect %p, quality %u, stub!\n", effect, quality); + + return E_NOTIMPL; +} + +static HRESULT WINAPI reverb_params_GetQuality(IDirectSoundFXI3DL2Reverb *iface, LONG *quality) +{ + struct reverb *effect = impl_from_IDirectSoundFXI3DL2Reverb(iface); + + FIXME("effect %p, quality %p, stub!\n", effect, quality); + + return E_NOTIMPL; +} + +static const IDirectSoundFXI3DL2ReverbVtbl reverb_params_vtbl = +{ + reverb_params_QueryInterface, + reverb_params_AddRef, + reverb_params_Release, + reverb_params_SetAllParameters, + reverb_params_GetAllParameters, + reverb_params_SetPreset, + reverb_params_GetPreset, + reverb_params_SetQuality, + reverb_params_GetQuality, };
static struct reverb *impl_reverb_from_effect(struct effect *iface) @@ -446,6 +537,10 @@ static struct reverb *impl_reverb_from_effect(struct effect *iface)
static void *reverb_query_interface(struct effect *iface, REFIID iid) { + struct reverb *effect = impl_reverb_from_effect(iface); + + if (IsEqualGUID(iid, &IID_IDirectSoundFXI3DL2Reverb)) + return &effect->IDirectSoundFXI3DL2Reverb_iface; return NULL; }
@@ -470,6 +565,7 @@ static HRESULT reverb_create(IUnknown *outer, IUnknown **out) return E_OUTOFMEMORY;
effect_init(&object->effect, outer, &reverb_ops); + object->IDirectSoundFXI3DL2Reverb_iface.lpVtbl = &reverb_params_vtbl;
TRACE("Created I3DL2 reverb effect %p.\n", object); *out = &object->effect.IUnknown_inner; diff --git a/dlls/dsdmo/tests/dsdmo.c b/dlls/dsdmo/tests/dsdmo.c index 9026728f6c6..f949d02e882 100644 --- a/dlls/dsdmo/tests/dsdmo.c +++ b/dlls/dsdmo/tests/dsdmo.c @@ -473,24 +473,25 @@ static void test_reverb_parameters(void)
hr = CoCreateInstance(&GUID_DSFX_STANDARD_I3DL2REVERB, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectSoundFXI3DL2Reverb, (void **)&reverb); - 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 = IDirectSoundFXI3DL2Reverb_GetAllParameters(reverb, ¶ms); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(params.lRoom == -1000, "Got room attenuation %d mB.\n", params.lRoom); - ok(params.lRoomHF == -100, "Got room high-frequency attenuation %d mB.\n", params.lRoomHF); - ok(params.flRoomRolloffFactor == 0.0f, "Got room rolloff factor %.8e.\n", params.flRoomRolloffFactor); - ok(params.flDecayTime == 1.49f, "Got decay time %.8e s.\n", params.flDecayTime); - ok(params.flDecayHFRatio == 0.83f, "Got decay time ratio %.8e.\n", params.flDecayHFRatio); - ok(params.lReflections == -2602, "Got early reflection attenuation %d mB.\n", params.lReflections); - ok(params.flReflectionsDelay == 0.007f, "Got first reflection delay %.8e s.\n", params.flReflectionsDelay); - ok(params.lReverb == 200, "Got reverb attenuation %d mB.\n", params.lReverb); - ok(params.flReverbDelay == 0.011f, "Got reverb delay %.8e s.\n", params.flReverbDelay); - ok(params.flDiffusion == 100.0f, "Got diffusion %.8e%%.\n", params.flDiffusion); - ok(params.flDensity == 100.0f, "Got density %.8e%%.\n", params.flDensity); - ok(params.flHFReference == 5000.0f, "Got reference high frequency %.8e Hz.\n", params.flHFReference); + todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + if (hr == S_OK) + { + ok(params.lRoom == -1000, "Got room attenuation %d mB.\n", params.lRoom); + ok(params.lRoomHF == -100, "Got room high-frequency attenuation %d mB.\n", params.lRoomHF); + ok(params.flRoomRolloffFactor == 0.0f, "Got room rolloff factor %.8e.\n", params.flRoomRolloffFactor); + ok(params.flDecayTime == 1.49f, "Got decay time %.8e s.\n", params.flDecayTime); + ok(params.flDecayHFRatio == 0.83f, "Got decay time ratio %.8e.\n", params.flDecayHFRatio); + ok(params.lReflections == -2602, "Got early reflection attenuation %d mB.\n", params.lReflections); + ok(params.flReflectionsDelay == 0.007f, "Got first reflection delay %.8e s.\n", params.flReflectionsDelay); + ok(params.lReverb == 200, "Got reverb attenuation %d mB.\n", params.lReverb); + ok(params.flReverbDelay == 0.011f, "Got reverb delay %.8e s.\n", params.flReverbDelay); + ok(params.flDiffusion == 100.0f, "Got diffusion %.8e%%.\n", params.flDiffusion); + ok(params.flDensity == 100.0f, "Got density %.8e%%.\n", params.flDensity); + ok(params.flHFReference == 5000.0f, "Got reference high frequency %.8e Hz.\n", params.flHFReference); + }
ref = IDirectSoundFXI3DL2Reverb_Release(reverb); ok(!ref, "Got outstanding refcount %d.\n", ref); @@ -512,7 +513,7 @@ START_TEST(dsdmo) {&GUID_DSFX_STANDARD_ECHO, &IID_IDirectSoundFXEcho, TRUE}, {&GUID_DSFX_STANDARD_FLANGER, &IID_IDirectSoundFXFlanger, TRUE}, {&GUID_DSFX_STANDARD_GARGLE, &IID_IDirectSoundFXGargle, TRUE}, - {&GUID_DSFX_STANDARD_I3DL2REVERB, &IID_IDirectSoundFXI3DL2Reverb, TRUE}, + {&GUID_DSFX_STANDARD_I3DL2REVERB, &IID_IDirectSoundFXI3DL2Reverb}, {&GUID_DSFX_STANDARD_PARAMEQ, &IID_IDirectSoundFXParamEq, TRUE}, {&GUID_DSFX_WAVES_REVERB, &IID_IDirectSoundFXWavesReverb}, };
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=76191
Your paranoid android.
=== debiant (32 bit report) ===
dsdmo: dsdmo.c:530: Test failed: Failed to create {ef985e71-d5c7-42d4-ba4d-2d073e2e96f4}, hr 0x80040154. dsdmo.c:476: Test failed: Got hr 0x80040154. Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x004036eb).
Report validation errors: dsdmo:dsdmo crashed (c0000005)
=== debiant (32 bit French report) ===
dsdmo: dsdmo.c:530: Test failed: Failed to create {ef985e71-d5c7-42d4-ba4d-2d073e2e96f4}, hr 0x80040154. dsdmo.c:476: Test failed: Got hr 0x80040154. Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x004036eb).
Report validation errors: dsdmo:dsdmo crashed (c0000005)
=== debiant (32 bit Japanese:Japan report) ===
dsdmo: dsdmo.c:530: Test failed: Failed to create {ef985e71-d5c7-42d4-ba4d-2d073e2e96f4}, hr 0x80040154. dsdmo.c:476: Test failed: Got hr 0x80040154. Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x004036eb).
Report validation errors: dsdmo:dsdmo crashed (c0000005)
=== debiant (32 bit Chinese:China report) ===
dsdmo: dsdmo.c:530: Test failed: Failed to create {ef985e71-d5c7-42d4-ba4d-2d073e2e96f4}, hr 0x80040154. dsdmo.c:476: Test failed: Got hr 0x80040154. Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x004036eb).
Report validation errors: dsdmo:dsdmo crashed (c0000005)
=== debiant (32 bit WoW report) ===
dsdmo: dsdmo.c:530: Test failed: Failed to create {ef985e71-d5c7-42d4-ba4d-2d073e2e96f4}, hr 0x80040154. dsdmo.c:476: Test failed: Got hr 0x80040154. Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x004036eb).
Report validation errors: dsdmo:dsdmo crashed (c0000005)
=== debiant (64 bit WoW report) ===
dsdmo: dsdmo.c:530: Test failed: Failed to create {ef985e71-d5c7-42d4-ba4d-2d073e2e96f4}, hr 0x80040154. dsdmo.c:476: Test failed: Got hr 0x80040154. Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x004036eb).
Report validation errors: dsdmo:dsdmo crashed (c0000005)
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/dsdmo/main.c | 28 +++++++++++++++++++++---- dlls/dsdmo/tests/dsdmo.c | 44 +++++++++++++++++++++++++--------------- 2 files changed, 52 insertions(+), 20 deletions(-)
diff --git a/dlls/dsdmo/main.c b/dlls/dsdmo/main.c index 8efef855b29..5755c6f1444 100644 --- a/dlls/dsdmo/main.c +++ b/dlls/dsdmo/main.c @@ -438,6 +438,7 @@ struct reverb { struct effect effect; IDirectSoundFXI3DL2Reverb IDirectSoundFXI3DL2Reverb_iface; + DSFXI3DL2Reverb params; };
static struct reverb *impl_from_IDirectSoundFXI3DL2Reverb(IDirectSoundFXI3DL2Reverb *iface) @@ -467,18 +468,24 @@ static HRESULT WINAPI reverb_params_SetAllParameters(IDirectSoundFXI3DL2Reverb * { struct reverb *effect = impl_from_IDirectSoundFXI3DL2Reverb(iface);
- FIXME("effect %p, params %p, stub!\n", effect, params); + TRACE("effect %p, params %p.\n", effect, params);
- return E_NOTIMPL; + EnterCriticalSection(&effect->effect.cs); + effect->params = *params; + LeaveCriticalSection(&effect->effect.cs); + return S_OK; }
static HRESULT WINAPI reverb_params_GetAllParameters(IDirectSoundFXI3DL2Reverb *iface, DSFXI3DL2Reverb *params) { struct reverb *effect = impl_from_IDirectSoundFXI3DL2Reverb(iface);
- FIXME("effect %p, params %p, stub!\n", effect, params); + TRACE("effect %p, params %p.\n", effect, params);
- return E_NOTIMPL; + EnterCriticalSection(&effect->effect.cs); + *params = effect->params; + LeaveCriticalSection(&effect->effect.cs); + return S_OK; }
static HRESULT WINAPI reverb_params_SetPreset(IDirectSoundFXI3DL2Reverb *iface, DWORD preset) @@ -567,6 +574,19 @@ static HRESULT reverb_create(IUnknown *outer, IUnknown **out) effect_init(&object->effect, outer, &reverb_ops); object->IDirectSoundFXI3DL2Reverb_iface.lpVtbl = &reverb_params_vtbl;
+ object->params.lRoom = DSFX_I3DL2REVERB_ROOM_DEFAULT; + object->params.lRoomHF = DSFX_I3DL2REVERB_ROOMHF_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.flReflectionsDelay = DSFX_I3DL2REVERB_REFLECTIONSDELAY_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; + TRACE("Created I3DL2 reverb effect %p.\n", object); *out = &object->effect.IUnknown_inner; return S_OK; diff --git a/dlls/dsdmo/tests/dsdmo.c b/dlls/dsdmo/tests/dsdmo.c index f949d02e882..349e300f02e 100644 --- a/dlls/dsdmo/tests/dsdmo.c +++ b/dlls/dsdmo/tests/dsdmo.c @@ -476,22 +476,34 @@ static void test_reverb_parameters(void) ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IDirectSoundFXI3DL2Reverb_GetAllParameters(reverb, ¶ms); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); - if (hr == S_OK) - { - ok(params.lRoom == -1000, "Got room attenuation %d mB.\n", params.lRoom); - ok(params.lRoomHF == -100, "Got room high-frequency attenuation %d mB.\n", params.lRoomHF); - ok(params.flRoomRolloffFactor == 0.0f, "Got room rolloff factor %.8e.\n", params.flRoomRolloffFactor); - ok(params.flDecayTime == 1.49f, "Got decay time %.8e s.\n", params.flDecayTime); - ok(params.flDecayHFRatio == 0.83f, "Got decay time ratio %.8e.\n", params.flDecayHFRatio); - ok(params.lReflections == -2602, "Got early reflection attenuation %d mB.\n", params.lReflections); - ok(params.flReflectionsDelay == 0.007f, "Got first reflection delay %.8e s.\n", params.flReflectionsDelay); - ok(params.lReverb == 200, "Got reverb attenuation %d mB.\n", params.lReverb); - ok(params.flReverbDelay == 0.011f, "Got reverb delay %.8e s.\n", params.flReverbDelay); - ok(params.flDiffusion == 100.0f, "Got diffusion %.8e%%.\n", params.flDiffusion); - ok(params.flDensity == 100.0f, "Got density %.8e%%.\n", params.flDensity); - ok(params.flHFReference == 5000.0f, "Got reference high frequency %.8e Hz.\n", params.flHFReference); - } + ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(params.lRoom == -1000, "Got room attenuation %d mB.\n", params.lRoom); + ok(params.lRoomHF == -100, "Got room high-frequency attenuation %d mB.\n", params.lRoomHF); + ok(params.flRoomRolloffFactor == 0.0f, "Got room rolloff factor %.8e.\n", params.flRoomRolloffFactor); + ok(params.flDecayTime == 1.49f, "Got decay time %.8e s.\n", params.flDecayTime); + ok(params.flDecayHFRatio == 0.83f, "Got decay time ratio %.8e.\n", params.flDecayHFRatio); + ok(params.lReflections == -2602, "Got early reflection attenuation %d mB.\n", params.lReflections); + ok(params.flReflectionsDelay == 0.007f, "Got first reflection delay %.8e s.\n", params.flReflectionsDelay); + ok(params.lReverb == 200, "Got reverb attenuation %d mB.\n", params.lReverb); + ok(params.flReverbDelay == 0.011f, "Got reverb delay %.8e s.\n", params.flReverbDelay); + ok(params.flDiffusion == 100.0f, "Got diffusion %.8e%%.\n", params.flDiffusion); + ok(params.flDensity == 100.0f, "Got density %.8e%%.\n", params.flDensity); + ok(params.flHFReference == 5000.0f, "Got reference high frequency %.8e Hz.\n", params.flHFReference); + + params.lRoom = -10001; + hr = IDirectSoundFXI3DL2Reverb_SetAllParameters(reverb, ¶ms); + todo_wine ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + params.lRoom = 1; + hr = IDirectSoundFXI3DL2Reverb_SetAllParameters(reverb, ¶ms); + todo_wine ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + params.lRoom = -900; + hr = IDirectSoundFXI3DL2Reverb_SetAllParameters(reverb, ¶ms); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + memset(¶ms, 0xcc, sizeof(params)); + hr = IDirectSoundFXI3DL2Reverb_GetAllParameters(reverb, ¶ms); + ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(params.lRoom == -900, "Got room attenuation %d mB.\n", params.lRoom);
ref = IDirectSoundFXI3DL2Reverb_Release(reverb); ok(!ref, "Got outstanding refcount %d.\n", ref);
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=76192
Your paranoid android.
=== debiant (32 bit report) ===
dsdmo: dsdmo.c:542: Test failed: Failed to create {ef985e71-d5c7-42d4-ba4d-2d073e2e96f4}, hr 0x80040154. dsdmo.c:476: Test failed: Got hr 0x80040154. Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x004036eb).
Report validation errors: dsdmo:dsdmo crashed (c0000005)
=== debiant (32 bit French report) ===
dsdmo: dsdmo.c:542: Test failed: Failed to create {ef985e71-d5c7-42d4-ba4d-2d073e2e96f4}, hr 0x80040154. dsdmo.c:476: Test failed: Got hr 0x80040154. Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x004036eb).
Report validation errors: dsdmo:dsdmo crashed (c0000005)
=== debiant (32 bit Japanese:Japan report) ===
dsdmo: dsdmo.c:542: Test failed: Failed to create {ef985e71-d5c7-42d4-ba4d-2d073e2e96f4}, hr 0x80040154. dsdmo.c:476: Test failed: Got hr 0x80040154. Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x004036eb).
Report validation errors: dsdmo:dsdmo crashed (c0000005)
=== debiant (32 bit Chinese:China report) ===
dsdmo: dsdmo.c:542: Test failed: Failed to create {ef985e71-d5c7-42d4-ba4d-2d073e2e96f4}, hr 0x80040154. dsdmo.c:476: Test failed: Got hr 0x80040154. Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x004036eb).
Report validation errors: dsdmo:dsdmo crashed (c0000005)
=== debiant (32 bit WoW report) ===
dsdmo: dsdmo.c:542: Test failed: Failed to create {ef985e71-d5c7-42d4-ba4d-2d073e2e96f4}, hr 0x80040154. dsdmo.c:476: Test failed: Got hr 0x80040154. Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x004036eb).
Report validation errors: dsdmo:dsdmo crashed (c0000005)
=== debiant (64 bit WoW report) ===
dsdmo: dsdmo.c:542: Test failed: Failed to create {ef985e71-d5c7-42d4-ba4d-2d073e2e96f4}, hr 0x80040154. dsdmo.c:476: Test failed: Got hr 0x80040154. Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x004036eb).
Report validation errors: dsdmo:dsdmo crashed (c0000005)
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/dsdmo/dsdmo.idl | 8 +++++ dlls/dsdmo/main.c | 43 ++++++++++++++++++++++ dlls/dsound/tests/dsound8.c | 71 +++++++++++++++---------------------- 3 files changed, 80 insertions(+), 42 deletions(-)
diff --git a/dlls/dsdmo/dsdmo.idl b/dlls/dsdmo/dsdmo.idl index e5735b42f73..7f172084828 100644 --- a/dlls/dsdmo/dsdmo.idl +++ b/dlls/dsdmo/dsdmo.idl @@ -26,6 +26,14 @@ ] coclass DirectSoundI3DL2ReverbDMO {}
+[ + threading(both), + progid("Microsoft.DirectSoundParamEqDMO.1"), + vi_progid("Microsoft.DirectSoundParamEqDMO"), + uuid(120ced89-3bf4-4173-a132-3cb406cf3231) +] +coclass DirectSoundParamEqDMO {} + [ threading(both), progid("Microsoft.DirectSoundWavesReverbDMO.1"), diff --git a/dlls/dsdmo/main.c b/dlls/dsdmo/main.c index 5755c6f1444..482b8202db2 100644 --- a/dlls/dsdmo/main.c +++ b/dlls/dsdmo/main.c @@ -434,6 +434,48 @@ static void effect_init(struct effect *effect, IUnknown *outer, const struct eff effect->ops = ops; }
+struct eq +{ + struct effect effect; +}; + +static struct eq *impl_eq_from_effect(struct effect *iface) +{ + return CONTAINING_RECORD(iface, struct eq, effect); +} + +static void *eq_query_interface(struct effect *iface, REFIID iid) +{ + return NULL; +} + +static void eq_destroy(struct effect *iface) +{ + struct eq *effect = impl_eq_from_effect(iface); + + free(effect); +} + +static const struct effect_ops eq_ops = +{ + .destroy = eq_destroy, + .query_interface = eq_query_interface, +}; + +static HRESULT eq_create(IUnknown *outer, IUnknown **out) +{ + struct eq *object; + + if (!(object = calloc(1, sizeof(*object)))) + return E_OUTOFMEMORY; + + effect_init(&object->effect, outer, &eq_ops); + + TRACE("Created equalizer effect %p.\n", object); + *out = &object->effect.IUnknown_inner; + return S_OK; +} + struct reverb { struct effect effect; @@ -787,6 +829,7 @@ static struct class_factories[] = { {&GUID_DSFX_STANDARD_I3DL2REVERB, {{&class_factory_vtbl}, reverb_create}}, + {&GUID_DSFX_STANDARD_PARAMEQ, {{&class_factory_vtbl}, eq_create}}, {&GUID_DSFX_WAVES_REVERB, {{&class_factory_vtbl}, waves_reverb_create}}, };
diff --git a/dlls/dsound/tests/dsound8.c b/dlls/dsound/tests/dsound8.c index 702cd4b2ba3..05dfabbd253 100644 --- a/dlls/dsound/tests/dsound8.c +++ b/dlls/dsound/tests/dsound8.c @@ -1617,8 +1617,8 @@ static void test_effects(void)
results[0] = 0xdeadbeef; hr = IDirectSoundBuffer8_SetFX(buffer8, 1, effects, results); - todo_wine ok(hr == DS_OK, "Got hr %#x.\n", hr); - todo_wine ok(results[0] == DSFXR_LOCSOFTWARE, "Got result %#x.\n", results[0]); + ok(hr == DS_OK, "Got hr %#x.\n", hr); + ok(results[0] == DSFXR_LOCSOFTWARE, "Got result %#x.\n", results[0]);
hr = IDirectSoundBuffer8_Lock(buffer8, 0, 0, &ptr1, &size1, &ptr2, &size2, DSBLOCK_ENTIREBUFFER); ok(hr == DS_OK, "Got hr %#x.\n", hr); @@ -1648,38 +1648,33 @@ static void test_effects(void) effects[0].guidDSFXClass = GUID_DSFX_STANDARD_PARAMEQ; results[0] = 0xdeadbeef; hr = IDirectSoundBuffer8_SetFX(buffer8, 1, effects, results); - todo_wine ok(hr == DS_OK, "Got hr %#x.\n", hr); - todo_wine ok(results[0] == DSFXR_LOCSOFTWARE, "Got result %#x.\n", results[0]); + ok(hr == DS_OK, "Got hr %#x.\n", hr); + ok(results[0] == DSFXR_LOCSOFTWARE, "Got result %#x.\n", results[0]);
hr = IDirectSoundBuffer8_GetObjectInPath(buffer8, &GUID_All_Objects, 0, &IID_IMediaObject, NULL); - todo_wine ok(hr == DSERR_INVALIDPARAM, "Got hr %#x.\n", hr); + ok(hr == DSERR_INVALIDPARAM, "Got hr %#x.\n", hr);
dmo = (IMediaObject *)0xdeadbeef; hr = IDirectSoundBuffer8_GetObjectInPath(buffer8, &GUID_All_Objects, 0, &GUID_NULL, (void **)&dmo); - todo_wine ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); - todo_wine ok(!dmo, "Got object %p.\n", dmo); + ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(!dmo, "Got object %p.\n", dmo);
dmo = (IMediaObject *)0xdeadbeef; hr = IDirectSoundBuffer8_GetObjectInPath(buffer8, &GUID_NULL, 0, &IID_IMediaObject, (void **)&dmo); - todo_wine ok(hr == DSERR_OBJECTNOTFOUND, "Got hr %#x.\n", hr); + ok(hr == DSERR_OBJECTNOTFOUND, "Got hr %#x.\n", hr); ok(dmo == (IMediaObject *)0xdeadbeef, "Got object %p.\n", dmo);
dmo = NULL; hr = IDirectSoundBuffer8_GetObjectInPath(buffer8, &GUID_All_Objects, 0, &IID_IMediaObject, (void **)&dmo); - todo_wine ok(hr == DS_OK, "Got hr %#x.\n", hr); - if (hr == DS_OK) - { - ok(!!dmo, "Expected a non-NULL object.\n"); - IMediaObject_Release(dmo); - } + ok(hr == DS_OK, "Got hr %#x.\n", hr); + ok(!!dmo, "Expected a non-NULL object.\n"); + IMediaObject_Release(dmo);
dmo = NULL; hr = IDirectSoundBuffer8_GetObjectInPath(buffer8, &GUID_DSFX_STANDARD_PARAMEQ, 0, &IID_IMediaObject, (void **)&dmo); - if (hr == DS_OK) - { - ok(!!dmo, "Expected a non-NULL object.\n"); - IMediaObject_Release(dmo); - } + ok(hr == DS_OK, "Got hr %#x.\n", hr); + ok(!!dmo, "Expected a non-NULL object.\n"); + IMediaObject_Release(dmo);
dmo = (IMediaObject *)0xdeadbeef; hr = IDirectSoundBuffer8_GetObjectInPath(buffer8, &GUID_All_Objects, 1, &IID_IMediaObject, (void **)&dmo); @@ -1691,7 +1686,7 @@ static void test_effects(void) results[0] = results[1] = 0xdeadbeef; hr = IDirectSoundBuffer8_SetFX(buffer8, 2, effects, results); ok(hr == REGDB_E_CLASSNOTREG, "Got hr %#x.\n", hr); - todo_wine ok(results[0] == DSFXR_PRESENT, "Got result %#x.\n", results[0]); + ok(results[0] == DSFXR_PRESENT, "Got result %#x.\n", results[0]); ok(results[1] == DSFXR_UNKNOWN, "Got result %#x.\n", results[1]);
hr = IDirectSoundBuffer8_GetObjectInPath(buffer8, &GUID_All_Objects, 0, &IID_IMediaObject, (void **)&dmo); @@ -1701,14 +1696,13 @@ static void test_effects(void) effects[1].guidDSFXClass = GUID_DSFX_STANDARD_I3DL2REVERB; results[0] = results[1] = 0xdeadbeef; hr = IDirectSoundBuffer8_SetFX(buffer8, 2, effects, results); - todo_wine ok(hr == DS_OK, "Got hr %#x.\n", hr); - todo_wine ok(results[0] == DSFXR_LOCSOFTWARE, "Got result %#x.\n", results[0]); - todo_wine ok(results[1] == DSFXR_LOCSOFTWARE, "Got result %#x.\n", results[1]); + ok(hr == DS_OK, "Got hr %#x.\n", hr); + ok(results[0] == DSFXR_LOCSOFTWARE, "Got result %#x.\n", results[0]); + ok(results[1] == DSFXR_LOCSOFTWARE, "Got result %#x.\n", results[1]);
hr = IDirectSoundBuffer8_GetObjectInPath(buffer8, &GUID_DSFX_STANDARD_PARAMEQ, 0, &IID_IMediaObject, (void **)&dmo); - todo_wine ok(hr == DS_OK, "Got hr %#x.\n", hr); - if (hr == DS_OK) - echo = dmo; + ok(hr == DS_OK, "Got hr %#x.\n", hr); + echo = dmo; hr = IDirectSoundBuffer8_GetObjectInPath(buffer8, &GUID_DSFX_STANDARD_I3DL2REVERB, 0, &IID_IMediaObject, (void **)&dmo); todo_wine ok(hr == DS_OK, "Got hr %#x.\n", hr); @@ -1716,20 +1710,14 @@ static void test_effects(void) reverb = dmo;
hr = IDirectSoundBuffer8_GetObjectInPath(buffer8, &GUID_All_Objects, 0, &IID_IMediaObject, (void **)&dmo); - todo_wine ok(hr == DS_OK, "Got hr %#x.\n", hr); - if (hr == DS_OK) - { - ok(dmo == echo, "Expected %p, got %p.\n", echo, dmo); - IMediaObject_Release(dmo); - } + ok(hr == DS_OK, "Got hr %#x.\n", hr); + ok(dmo == echo, "Expected %p, got %p.\n", echo, dmo); + IMediaObject_Release(dmo);
hr = IDirectSoundBuffer8_GetObjectInPath(buffer8, &GUID_All_Objects, 1, &IID_IMediaObject, (void **)&dmo); - todo_wine ok(hr == DS_OK, "Got hr %#x.\n", hr); - if (hr == DS_OK) - { - ok(dmo == reverb, "Expected %p, got %p.\n", reverb, dmo); - IMediaObject_Release(dmo); - } + ok(hr == DS_OK, "Got hr %#x.\n", hr); + todo_wine ok(dmo == reverb, "Expected %p, got %p.\n", reverb, dmo); + IMediaObject_Release(dmo);
hr = IDirectSoundBuffer8_GetObjectInPath(buffer8, &GUID_DSFX_STANDARD_I3DL2REVERB, 1, &IID_IMediaObject, (void **)&dmo); @@ -1748,13 +1736,12 @@ static void test_effects(void)
hr = IDirectSoundBuffer8_GetObjectInPath(buffer8, &GUID_All_Objects, 0, &IID_IDirectSoundFXI3DL2Reverb, (void **)&unk); - todo_wine ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr);
hr = IDirectSoundBuffer8_GetObjectInPath(buffer8, &GUID_All_Objects, 1, &IID_IDirectSoundFXI3DL2Reverb, (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_DSFX_STANDARD_I3DL2REVERB, 0, &IID_IDirectSoundFXI3DL2Reverb, (void **)&unk);
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=76193
Your paranoid android.
=== debiant (32 bit report) ===
dsdmo: dsdmo.c:542: Test failed: Failed to create {ef985e71-d5c7-42d4-ba4d-2d073e2e96f4}, hr 0x80040154. dsdmo.c:476: Test failed: Got hr 0x80040154. Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x004036eb).
dsound: dsound8.c:1620: Test failed: Got hr 0x80040154. dsound8.c:1621: Test failed: Got result 0x5. dsound8.c:1651: Test failed: Got hr 0x80040154. dsound8.c:1652: Test failed: Got result 0x5. dsound8.c:1655: Test failed: Got hr 0x8878001e. dsound8.c:1659: Test failed: Got hr 0x8878001e. dsound8.c:1660: Test failed: Got object DEADBEEF. dsound8.c:1664: Test failed: Got hr 0x8878001e. dsound8.c:1669: Test failed: Got hr 0x8878001e. dsound8.c:1670: Test failed: Expected a non-NULL object. Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x0041aaa4).
Report validation errors: dsdmo:dsdmo crashed (c0000005) dsound:dsound8 crashed (c0000005)
=== debiant (32 bit French report) ===
dsound: dsound8.c:1620: Test failed: Got hr 0x80040154. dsound8.c:1621: Test failed: Got result 0x5. dsound8.c:1651: Test failed: Got hr 0x80040154. dsound8.c:1652: Test failed: Got result 0x5. dsound8.c:1655: Test failed: Got hr 0x8878001e. dsound8.c:1659: Test failed: Got hr 0x8878001e. dsound8.c:1660: Test failed: Got object DEADBEEF. dsound8.c:1664: Test failed: Got hr 0x8878001e. dsound8.c:1669: Test failed: Got hr 0x8878001e. dsound8.c:1670: Test failed: Expected a non-NULL object. Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x0041aaa4).
Report validation errors: dsound:dsound8 crashed (c0000005)
=== debiant (32 bit Japanese:Japan report) ===
dsound: dsound8.c:1620: Test failed: Got hr 0x80040154. dsound8.c:1621: Test failed: Got result 0x5. dsound8.c:1651: Test failed: Got hr 0x80040154. dsound8.c:1652: Test failed: Got result 0x5. dsound8.c:1655: Test failed: Got hr 0x8878001e. dsound8.c:1659: Test failed: Got hr 0x8878001e. dsound8.c:1660: Test failed: Got object DEADBEEF. dsound8.c:1664: Test failed: Got hr 0x8878001e. dsound8.c:1669: Test failed: Got hr 0x8878001e. dsound8.c:1670: Test failed: Expected a non-NULL object. Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x0041aaa4).
Report validation errors: dsound:dsound8 crashed (c0000005)
=== debiant (32 bit Chinese:China report) ===
dsdmo: dsdmo.c:542: Test failed: Failed to create {ef985e71-d5c7-42d4-ba4d-2d073e2e96f4}, hr 0x80040154. dsdmo.c:476: Test failed: Got hr 0x80040154. Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x004036eb).
dsound: dsound8.c:1620: Test failed: Got hr 0x80040154. dsound8.c:1621: Test failed: Got result 0x5. dsound8.c:1651: Test failed: Got hr 0x80040154. dsound8.c:1652: Test failed: Got result 0x5. dsound8.c:1655: Test failed: Got hr 0x8878001e. dsound8.c:1659: Test failed: Got hr 0x8878001e. dsound8.c:1660: Test failed: Got object DEADBEEF. dsound8.c:1664: Test failed: Got hr 0x8878001e. dsound8.c:1669: Test failed: Got hr 0x8878001e. dsound8.c:1670: Test failed: Expected a non-NULL object. Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x0041aaa4).
Report validation errors: dsdmo:dsdmo crashed (c0000005) dsound:dsound8 crashed (c0000005)
=== debiant (32 bit WoW report) ===
dsdmo: dsdmo.c:542: Test failed: Failed to create {ef985e71-d5c7-42d4-ba4d-2d073e2e96f4}, hr 0x80040154. dsdmo.c:476: Test failed: Got hr 0x80040154. Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x004036eb).
dsound: dsound8.c:1620: Test failed: Got hr 0x80040154. dsound8.c:1621: Test failed: Got result 0x5. dsound8.c:1651: Test failed: Got hr 0x80040154. dsound8.c:1652: Test failed: Got result 0x5. dsound8.c:1655: Test failed: Got hr 0x8878001e. dsound8.c:1659: Test failed: Got hr 0x8878001e. dsound8.c:1660: Test failed: Got object DEADBEEF. dsound8.c:1664: Test failed: Got hr 0x8878001e. dsound8.c:1669: Test failed: Got hr 0x8878001e. dsound8.c:1670: Test failed: Expected a non-NULL object. Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x0041aaa4).
Report validation errors: dsdmo:dsdmo crashed (c0000005) dsound:dsound8 crashed (c0000005)
=== debiant (64 bit WoW report) ===
dsdmo: dsdmo.c:542: Test failed: Failed to create {ef985e71-d5c7-42d4-ba4d-2d073e2e96f4}, hr 0x80040154. dsdmo.c:476: Test failed: Got hr 0x80040154. Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x004036eb).
dsound: dsound8.c:1620: Test failed: Got hr 0x80040154. dsound8.c:1621: Test failed: Got result 0x5. dsound8.c:1651: Test failed: Got hr 0x80040154. dsound8.c:1652: Test failed: Got result 0x5. dsound8.c:1655: Test failed: Got hr 0x8878001e. dsound8.c:1659: Test failed: Got hr 0x8878001e. dsound8.c:1660: Test failed: Got object DEADBEEF. dsound8.c:1664: Test failed: Got hr 0x8878001e. dsound8.c:1669: Test failed: Got hr 0x8878001e. dsound8.c:1670: Test failed: Expected a non-NULL object. Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x0041aaa4).
Report validation errors: dsdmo:dsdmo crashed (c0000005) dsound:dsound8 crashed (c0000005)
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/dsdmo/main.c | 56 +++++++++++++++++++++++++++++++++++++ dlls/dsdmo/tests/dsdmo.c | 17 +++++------ dlls/dsound/tests/dsound8.c | 10 +++---- 3 files changed, 69 insertions(+), 14 deletions(-)
diff --git a/dlls/dsdmo/main.c b/dlls/dsdmo/main.c index 482b8202db2..ff103be159e 100644 --- a/dlls/dsdmo/main.c +++ b/dlls/dsdmo/main.c @@ -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; diff --git a/dlls/dsdmo/tests/dsdmo.c b/dlls/dsdmo/tests/dsdmo.c index 349e300f02e..c59361e5fcf 100644 --- a/dlls/dsdmo/tests/dsdmo.c +++ b/dlls/dsdmo/tests/dsdmo.c @@ -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, ¶ms); - 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; diff --git a/dlls/dsound/tests/dsound8.c b/dlls/dsound/tests/dsound8.c index 05dfabbd253..fcac31ba637 100644 --- a/dlls/dsound/tests/dsound8.c +++ b/dlls/dsound/tests/dsound8.c @@ -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);
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=76194
Your paranoid android.
=== debiant (32 bit report) ===
dsdmo: dsdmo.c:543: Test failed: Failed to create {ef985e71-d5c7-42d4-ba4d-2d073e2e96f4}, hr 0x80040154. dsdmo.c:543: Test failed: Failed to create {120ced89-3bf4-4173-a132-3cb406cf3231}, hr 0x80040154. dsdmo.c:477: Test failed: Got hr 0x80040154. Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x004036eb).
dsound: dsound8.c:1620: Test failed: Got hr 0x80040154. dsound8.c:1621: Test failed: Got result 0x5. dsound8.c:1651: Test failed: Got hr 0x80040154. dsound8.c:1652: Test failed: Got result 0x5. dsound8.c:1655: Test failed: Got hr 0x8878001e. dsound8.c:1659: Test failed: Got hr 0x8878001e. dsound8.c:1660: Test failed: Got object DEADBEEF. dsound8.c:1664: Test failed: Got hr 0x8878001e. dsound8.c:1669: Test failed: Got hr 0x8878001e. dsound8.c:1670: Test failed: Expected a non-NULL object. Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x0041aaab).
Report validation errors: dsdmo:dsdmo crashed (c0000005) dsound:dsound8 crashed (c0000005)
=== debiant (32 bit French report) ===
dsdmo: dsdmo.c:543: Test failed: Failed to create {ef985e71-d5c7-42d4-ba4d-2d073e2e96f4}, hr 0x80040154. dsdmo.c:543: Test failed: Failed to create {120ced89-3bf4-4173-a132-3cb406cf3231}, hr 0x80040154. dsdmo.c:477: Test failed: Got hr 0x80040154. Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x004036eb).
dsound: dsound8.c:1620: Test failed: Got hr 0x80040154. dsound8.c:1621: Test failed: Got result 0x5. dsound8.c:1651: Test failed: Got hr 0x80040154. dsound8.c:1652: Test failed: Got result 0x5. dsound8.c:1655: Test failed: Got hr 0x8878001e. dsound8.c:1659: Test failed: Got hr 0x8878001e. dsound8.c:1660: Test failed: Got object DEADBEEF. dsound8.c:1664: Test failed: Got hr 0x8878001e. dsound8.c:1669: Test failed: Got hr 0x8878001e. dsound8.c:1670: Test failed: Expected a non-NULL object. Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x0041aaab).
Report validation errors: dsdmo:dsdmo crashed (c0000005) dsound:dsound8 crashed (c0000005)
=== debiant (32 bit Japanese:Japan report) ===
dsdmo: dsdmo.c:543: Test failed: Failed to create {ef985e71-d5c7-42d4-ba4d-2d073e2e96f4}, hr 0x80040154. dsdmo.c:543: Test failed: Failed to create {120ced89-3bf4-4173-a132-3cb406cf3231}, hr 0x80040154. dsdmo.c:477: Test failed: Got hr 0x80040154. Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x004036eb).
dsound: dsound8.c:1620: Test failed: Got hr 0x80040154. dsound8.c:1621: Test failed: Got result 0x5. dsound8.c:1651: Test failed: Got hr 0x80040154. dsound8.c:1652: Test failed: Got result 0x5. dsound8.c:1655: Test failed: Got hr 0x8878001e. dsound8.c:1659: Test failed: Got hr 0x8878001e. dsound8.c:1660: Test failed: Got object DEADBEEF. dsound8.c:1664: Test failed: Got hr 0x8878001e. dsound8.c:1669: Test failed: Got hr 0x8878001e. dsound8.c:1670: Test failed: Expected a non-NULL object. Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x0041aaab).
Report validation errors: dsdmo:dsdmo crashed (c0000005) dsound:dsound8 crashed (c0000005)
=== debiant (32 bit Chinese:China report) ===
dsdmo: dsdmo.c:543: Test failed: Failed to create {ef985e71-d5c7-42d4-ba4d-2d073e2e96f4}, hr 0x80040154. dsdmo.c:543: Test failed: Failed to create {120ced89-3bf4-4173-a132-3cb406cf3231}, hr 0x80040154. dsdmo.c:477: Test failed: Got hr 0x80040154. Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x004036eb).
dsound: dsound8.c:1620: Test failed: Got hr 0x80040154. dsound8.c:1621: Test failed: Got result 0x5. dsound8.c:1651: Test failed: Got hr 0x80040154. dsound8.c:1652: Test failed: Got result 0x5. dsound8.c:1655: Test failed: Got hr 0x8878001e. dsound8.c:1659: Test failed: Got hr 0x8878001e. dsound8.c:1660: Test failed: Got object DEADBEEF. dsound8.c:1664: Test failed: Got hr 0x8878001e. dsound8.c:1669: Test failed: Got hr 0x8878001e. dsound8.c:1670: Test failed: Expected a non-NULL object. Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x0041aaab).
Report validation errors: dsdmo:dsdmo crashed (c0000005) dsound:dsound8 crashed (c0000005)
=== debiant (32 bit WoW report) ===
dsdmo: dsdmo.c:543: Test failed: Failed to create {ef985e71-d5c7-42d4-ba4d-2d073e2e96f4}, hr 0x80040154. dsdmo.c:543: Test failed: Failed to create {120ced89-3bf4-4173-a132-3cb406cf3231}, hr 0x80040154. dsdmo.c:477: Test failed: Got hr 0x80040154. Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x004036eb).
dsound: dsound8.c:1620: Test failed: Got hr 0x80040154. dsound8.c:1621: Test failed: Got result 0x5. dsound8.c:1651: Test failed: Got hr 0x80040154. dsound8.c:1652: Test failed: Got result 0x5. dsound8.c:1655: Test failed: Got hr 0x8878001e. dsound8.c:1659: Test failed: Got hr 0x8878001e. dsound8.c:1660: Test failed: Got object DEADBEEF. dsound8.c:1664: Test failed: Got hr 0x8878001e. dsound8.c:1669: Test failed: Got hr 0x8878001e. dsound8.c:1670: Test failed: Expected a non-NULL object. Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x0041aaab).
Report validation errors: dsdmo:dsdmo crashed (c0000005) dsound:dsound8 crashed (c0000005)
=== debiant (64 bit WoW report) ===
dsdmo: dsdmo.c:543: Test failed: Failed to create {ef985e71-d5c7-42d4-ba4d-2d073e2e96f4}, hr 0x80040154. dsdmo.c:543: Test failed: Failed to create {120ced89-3bf4-4173-a132-3cb406cf3231}, hr 0x80040154. dsdmo.c:477: Test failed: Got hr 0x80040154. Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x004036eb).
dsound: dsound8.c:1620: Test failed: Got hr 0x80040154. dsound8.c:1621: Test failed: Got result 0x5. dsound8.c:1651: Test failed: Got hr 0x80040154. dsound8.c:1652: Test failed: Got result 0x5. dsound8.c:1655: Test failed: Got hr 0x8878001e. dsound8.c:1659: Test failed: Got hr 0x8878001e. dsound8.c:1660: Test failed: Got object DEADBEEF. dsound8.c:1664: Test failed: Got hr 0x8878001e. dsound8.c:1669: Test failed: Got hr 0x8878001e. dsound8.c:1670: Test failed: Expected a non-NULL object. Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x0041aaab).
Report validation errors: dsdmo:dsdmo crashed (c0000005) dsound:dsound8 crashed (c0000005)
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/dsdmo/main.c | 19 +++++++++++++++---- dlls/dsdmo/tests/dsdmo.c | 28 +++++++++++++++++++++------- 2 files changed, 36 insertions(+), 11 deletions(-)
diff --git a/dlls/dsdmo/main.c b/dlls/dsdmo/main.c index ff103be159e..57214b32752 100644 --- a/dlls/dsdmo/main.c +++ b/dlls/dsdmo/main.c @@ -438,6 +438,7 @@ struct eq { struct effect effect; IDirectSoundFXParamEq IDirectSoundFXParamEq_iface; + DSFXParamEq params; };
static struct eq *impl_from_IDirectSoundFXParamEq(IDirectSoundFXParamEq *iface) @@ -467,18 +468,24 @@ static HRESULT WINAPI eq_params_SetAllParameters(IDirectSoundFXParamEq *iface, c { struct eq *effect = impl_from_IDirectSoundFXParamEq(iface);
- FIXME("effect %p, params %p, stub!\n", effect, params); + TRACE("effect %p, params %p.\n", effect, params);
- return E_NOTIMPL; + EnterCriticalSection(&effect->effect.cs); + effect->params = *params; + LeaveCriticalSection(&effect->effect.cs); + return S_OK; }
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); + TRACE("effect %p, params %p.\n", effect, params);
- return E_NOTIMPL; + EnterCriticalSection(&effect->effect.cs); + *params = effect->params; + LeaveCriticalSection(&effect->effect.cs); + return S_OK; }
static const IDirectSoundFXParamEqVtbl eq_params_vtbl = @@ -527,6 +534,10 @@ static HRESULT eq_create(IUnknown *outer, IUnknown **out) effect_init(&object->effect, outer, &eq_ops); object->IDirectSoundFXParamEq_iface.lpVtbl = &eq_params_vtbl;
+ object->params.fCenter = 8000.0f; + object->params.fBandwidth = 12.0f; + object->params.fGain = 0.0f; + TRACE("Created equalizer effect %p.\n", object); *out = &object->effect.IUnknown_inner; return S_OK; diff --git a/dlls/dsdmo/tests/dsdmo.c b/dlls/dsdmo/tests/dsdmo.c index c59361e5fcf..1ecafeb7ceb 100644 --- a/dlls/dsdmo/tests/dsdmo.c +++ b/dlls/dsdmo/tests/dsdmo.c @@ -453,13 +453,27 @@ static void test_eq_parameters(void) ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IDirectSoundFXParamEq_GetAllParameters(eq, ¶ms); - 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); - } + 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); + + params.fCenter = 79.0f; + hr = IDirectSoundFXParamEq_SetAllParameters(eq, ¶ms); + todo_wine ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + params.fCenter = 16001.0f; + hr = IDirectSoundFXParamEq_SetAllParameters(eq, ¶ms); + todo_wine ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + params.fCenter = 738.0f; + hr = IDirectSoundFXParamEq_SetAllParameters(eq, ¶ms); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + memset(¶ms, 0xcc, sizeof(params)); + hr = IDirectSoundFXParamEq_GetAllParameters(eq, ¶ms); + ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(params.fCenter == 738.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);
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=76195
Your paranoid android.
=== debiant (32 bit report) ===
dsdmo: dsdmo.c:557: Test failed: Failed to create {ef985e71-d5c7-42d4-ba4d-2d073e2e96f4}, hr 0x80040154. dsdmo.c:557: Test failed: Failed to create {120ced89-3bf4-4173-a132-3cb406cf3231}, hr 0x80040154. dsdmo.c:491: Test failed: Got hr 0x80040154. Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x004036eb).
Report validation errors: dsdmo:dsdmo crashed (c0000005)
=== debiant (32 bit French report) ===
dsdmo: dsdmo.c:557: Test failed: Failed to create {ef985e71-d5c7-42d4-ba4d-2d073e2e96f4}, hr 0x80040154. dsdmo.c:557: Test failed: Failed to create {120ced89-3bf4-4173-a132-3cb406cf3231}, hr 0x80040154. dsdmo.c:491: Test failed: Got hr 0x80040154. Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x004036eb).
Report validation errors: dsdmo:dsdmo crashed (c0000005)
=== debiant (32 bit Japanese:Japan report) ===
dsdmo: dsdmo.c:557: Test failed: Failed to create {ef985e71-d5c7-42d4-ba4d-2d073e2e96f4}, hr 0x80040154. dsdmo.c:557: Test failed: Failed to create {120ced89-3bf4-4173-a132-3cb406cf3231}, hr 0x80040154. dsdmo.c:491: Test failed: Got hr 0x80040154. Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x004036eb).
Report validation errors: dsdmo:dsdmo crashed (c0000005)
=== debiant (32 bit Chinese:China report) ===
dsdmo: dsdmo.c:557: Test failed: Failed to create {ef985e71-d5c7-42d4-ba4d-2d073e2e96f4}, hr 0x80040154. dsdmo.c:557: Test failed: Failed to create {120ced89-3bf4-4173-a132-3cb406cf3231}, hr 0x80040154. dsdmo.c:491: Test failed: Got hr 0x80040154. Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x004036eb).
Report validation errors: dsdmo:dsdmo crashed (c0000005)
=== debiant (32 bit WoW report) ===
dsdmo: dsdmo.c:557: Test failed: Failed to create {ef985e71-d5c7-42d4-ba4d-2d073e2e96f4}, hr 0x80040154. dsdmo.c:557: Test failed: Failed to create {120ced89-3bf4-4173-a132-3cb406cf3231}, hr 0x80040154. dsdmo.c:491: Test failed: Got hr 0x80040154. Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x004036eb).
Report validation errors: dsdmo:dsdmo crashed (c0000005)
=== debiant (64 bit WoW report) ===
dsdmo: dsdmo.c:557: Test failed: Failed to create {ef985e71-d5c7-42d4-ba4d-2d073e2e96f4}, hr 0x80040154. dsdmo.c:557: Test failed: Failed to create {120ced89-3bf4-4173-a132-3cb406cf3231}, hr 0x80040154. dsdmo.c:491: Test failed: Got hr 0x80040154. Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x004036eb).
Report validation errors: dsdmo:dsdmo crashed (c0000005)