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

Alexandre Julliard julliard at winehq.org
Fri Aug 24 13:59:14 CDT 2018


Module: wine
Branch: master
Commit: 702e4a4ca11bd5918d650bb13833da14d1f64379
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=702e4a4ca11bd5918d650bb13833da14d1f64379

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Thu Aug 23 12:43:14 2018 -0500

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 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 0113674..aa4b0c9 100644
--- a/dlls/quartz/filtergraph.c
+++ b/dlls/quartz/filtergraph.c
@@ -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)
diff --git a/dlls/quartz/tests/filtergraph.c b/dlls/quartz/tests/filtergraph.c
index de7b904..6a8afb3 100644
--- a/dlls/quartz/tests/filtergraph.c
+++ b/dlls/quartz/tests/filtergraph.c
@@ -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);
 




More information about the wine-cvs mailing list