[PATCH v2 2/2] quartz: Return E_NOTIMPL from IBasicAudio methods if no filter supporting IBasicAudio is attached.
Zebediah Figura
z.figura12 at gmail.com
Thu Aug 23 12:43:14 CDT 2018
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 at gmail.com>
---
dlls/quartz/filtergraph.c | 4 ++--
dlls/quartz/tests/filtergraph.c | 4 ----
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c
index d1643c3..da6c776 100644
--- a/dlls/quartz/filtergraph.c
+++ b/dlls/quartz/filtergraph.c
@@ -2966,7 +2966,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;
@@ -3006,7 +3006,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)
diff --git a/dlls/quartz/tests/filtergraph.c b/dlls/quartz/tests/filtergraph.c
index ba962c3..062f8cb 100644
--- a/dlls/quartz/tests/filtergraph.c
+++ b/dlls/quartz/tests/filtergraph.c
@@ -1579,7 +1579,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);
@@ -1588,7 +1587,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)
@@ -1624,7 +1622,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);
@@ -1633,7 +1630,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);
--
2.7.4
More information about the wine-devel
mailing list