Zebediah Figura : quartz/tests: Add some tests for flushing on the DirectSound renderer.
Alexandre Julliard
julliard at winehq.org
Fri Nov 20 14:54:32 CST 2020
Module: wine
Branch: master
Commit: 6e9920a1d3c2440e10f695daf348744bd2a31fa2
URL: https://source.winehq.org/git/wine.git/?a=commit;h=6e9920a1d3c2440e10f695daf348744bd2a31fa2
Author: Zebediah Figura <z.figura12 at gmail.com>
Date: Thu Nov 19 17:21:19 2020 -0600
quartz/tests: Add some tests for flushing on the DirectSound renderer.
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/quartz/tests/dsoundrender.c | 46 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 46 insertions(+)
diff --git a/dlls/quartz/tests/dsoundrender.c b/dlls/quartz/tests/dsoundrender.c
index 5142ca2da6d..558e6989c98 100644
--- a/dlls/quartz/tests/dsoundrender.c
+++ b/dlls/quartz/tests/dsoundrender.c
@@ -832,6 +832,51 @@ static void test_filter_state(IMemInputPin *input, IMediaControl *control)
* completely paused. */
}
+static void test_flushing(IPin *pin, IMemInputPin *input, IMediaControl *control)
+{
+ OAFilterState state;
+ HRESULT hr;
+
+ hr = IMediaControl_Pause(control);
+ ok(hr == S_FALSE, "Got hr %#x.\n", hr);
+
+ hr = send_frame(input);
+ todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr);
+
+ hr = IMediaControl_GetState(control, 0, &state);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+
+ hr = IPin_BeginFlush(pin);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+
+ hr = send_frame(input);
+ ok(hr == S_FALSE, "Got hr %#x.\n", hr);
+
+ hr = IPin_EndFlush(pin);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+
+ hr = IMediaControl_GetState(control, 0, &state);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+
+ hr = IMediaControl_Run(control);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+
+ hr = IPin_BeginFlush(pin);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+
+ hr = send_frame(input);
+ ok(hr == S_FALSE, "Got hr %#x.\n", hr);
+
+ hr = IPin_EndFlush(pin);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+
+ hr = send_frame(input);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+
+ hr = IMediaControl_Stop(control);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+}
+
static void test_connect_pin(void)
{
ALLOCATOR_PROPERTIES req_props = {1, 4 * 44100, 1, 0}, ret_props;
@@ -925,6 +970,7 @@ static void test_connect_pin(void)
ok(hr == S_OK, "Got hr %#x.\n", hr);
test_filter_state(input, control);
+ test_flushing(pin, input, control);
hr = IFilterGraph2_Disconnect(graph, pin);
ok(hr == S_OK, "Got hr %#x.\n", hr);
More information about the wine-cvs
mailing list