Wine-bug: https://bugs.winehq.org/show_bug.cgi?id=45366
Signed-off-by: Alistair Leslie-Hughes leslie_alistair@hotmail.com --- dlls/quartz/filtergraph.c | 2 ++ dlls/quartz/tests/filtergraph.c | 15 +++++++++++++++ 2 files changed, 17 insertions(+)
diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c index 0113674..210eb3e 100644 --- a/dlls/quartz/filtergraph.c +++ b/dlls/quartz/filtergraph.c @@ -3140,6 +3140,8 @@ static HRESULT WINAPI BasicAudio_put_Volume(IBasicAudio *iface, LONG lVolume)
if (hr == S_OK) hr = IBasicAudio_put_Volume(pBasicAudio, lVolume); + else + hr = E_NOTIMPL;
LeaveCriticalSection(&This->cs);
diff --git a/dlls/quartz/tests/filtergraph.c b/dlls/quartz/tests/filtergraph.c index 85079d9..3842491 100644 --- a/dlls/quartz/tests/filtergraph.c +++ b/dlls/quartz/tests/filtergraph.c @@ -284,6 +284,20 @@ static void test_basic_video(IFilterGraph2 *graph) IBasicVideo_Release(pbv); }
+static void test_basic_audio(IFilterGraph2 *graph) +{ + IBasicAudio* basic; + HRESULT hr; + + hr = IFilterGraph2_QueryInterface(graph, &IID_IBasicAudio, (void **)&basic); + ok(hr==S_OK, "Cannot get IBasicAudio interface returned: %x\n", hr); + + hr = IBasicAudio_put_Volume(basic, 0); + ok(hr==E_NOTIMPL || hr==S_OK, "returned: %x\n", hr); + + IBasicAudio_Release(basic); +} + static void test_media_seeking(IFilterGraph2 *graph) { IMediaSeeking *seeking; @@ -492,6 +506,7 @@ todo_wine
static void rungraph(IFilterGraph2 *graph) { + test_basic_audio(graph); test_basic_video(graph); test_media_seeking(graph); test_state_change(graph);
On 21/08/18 01:06, Alistair Leslie-Hughes wrote:
diff --git a/dlls/quartz/tests/filtergraph.c b/dlls/quartz/tests/filtergraph.c index 85079d9..3842491 100644 --- a/dlls/quartz/tests/filtergraph.c +++ b/dlls/quartz/tests/filtergraph.c @@ -284,6 +284,20 @@ static void test_basic_video(IFilterGraph2 *graph) IBasicVideo_Release(pbv); }
+static void test_basic_audio(IFilterGraph2 *graph) +{
- IBasicAudio* basic;
- HRESULT hr;
- hr = IFilterGraph2_QueryInterface(graph, &IID_IBasicAudio, (void **)&basic);
- ok(hr==S_OK, "Cannot get IBasicAudio interface returned: %x\n", hr);
- hr = IBasicAudio_put_Volume(basic, 0);
- ok(hr==E_NOTIMPL || hr==S_OK, "returned: %x\n", hr);
- IBasicAudio_Release(basic);
+}
static void test_media_seeking(IFilterGraph2 *graph) { IMediaSeeking *seeking; @@ -492,6 +506,7 @@ todo_wine
static void rungraph(IFilterGraph2 *graph) {
- test_basic_audio(graph); test_basic_video(graph); test_media_seeking(graph); test_state_change(graph);
This change looks correct, but I don't think this test is very convincing. I think we should test put_Volume() before and after adding a filter that supports it.