quartz: Return E_NOTIMPL from IBasicAudio methods if no filter supporting IBasicAudio is attached.

Based on a patch by Alistair Leslie-Hughes.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45366
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2018-08-23 12:43:14 -05:00 committed by Alexandre Julliard
parent 0649ba6629
commit 702e4a4ca1
2 changed files with 2 additions and 6 deletions

View File

@ -2963,7 +2963,7 @@ static const IObjectWithSiteVtbl IObjectWithSite_VTable =
static HRESULT GetTargetInterface(IFilterGraphImpl* pGraph, REFIID riid, LPVOID* ppvObj)
{
HRESULT hr = E_NOINTERFACE;
HRESULT hr;
int i;
int entry;
@ -3003,7 +3003,7 @@ static HRESULT GetTargetInterface(IFilterGraphImpl* pGraph, REFIID riid, LPVOID*
return hr;
}
return hr;
return IsEqualGUID(riid, &IID_IBasicAudio) ? E_NOTIMPL : E_NOINTERFACE;
}
static inline IFilterGraphImpl *impl_from_IBasicAudio(IBasicAudio *iface)

View File

@ -2304,7 +2304,6 @@ static void test_control_delegation(void)
hr = IFilterGraph2_QueryInterface(graph, &IID_IBasicAudio, (void **)&audio);
ok(hr == S_OK, "got %#x\n", hr);
todo_wine {
hr = IBasicAudio_put_Volume(audio, -10);
ok(hr == E_NOTIMPL, "got %#x\n", hr);
hr = IBasicAudio_get_Volume(audio, &val);
@ -2313,7 +2312,6 @@ todo_wine {
ok(hr == E_NOTIMPL, "got %#x\n", hr);
hr = IBasicAudio_get_Balance(audio, &val);
ok(hr == E_NOTIMPL, "got %#x\n", hr);
}
hr = CoCreateInstance(&CLSID_DSoundRender, NULL, CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (void **)&renderer);
if (hr != VFW_E_NO_AUDIO_HARDWARE)
@ -2349,7 +2347,6 @@ todo_wine {
IBasicAudio_Release(filter_audio);
}
todo_wine {
hr = IBasicAudio_put_Volume(audio, -10);
ok(hr == E_NOTIMPL, "got %#x\n", hr);
hr = IBasicAudio_get_Volume(audio, &val);
@ -2358,7 +2355,6 @@ todo_wine {
ok(hr == E_NOTIMPL, "got %#x\n", hr);
hr = IBasicAudio_get_Balance(audio, &val);
ok(hr == E_NOTIMPL, "got %#x\n", hr);
}
IBasicAudio_Release(audio);