From 42d18a3279efc9eca9b4cf1c44cba665ae540f62 Mon Sep 17 00:00:00 2001 From: Christian Costa Date: Thu, 3 May 2012 23:05:42 +0200 Subject: [PATCH] dmsynth: Add tests for querying IKsControl for Synth and SynthSink objects. --- dlls/dmsynth/tests/dmsynth.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/dlls/dmsynth/tests/dmsynth.c b/dlls/dmsynth/tests/dmsynth.c index df67cd47f7f..66da1fb0e9f 100644 --- a/dlls/dmsynth/tests/dmsynth.c +++ b/dlls/dmsynth/tests/dmsynth.c @@ -28,6 +28,7 @@ #include "initguid.h" #include "dmusics.h" #include "dmusici.h" +#include "dmksctrl.h" static void test_dmsynth(void) { @@ -35,6 +36,8 @@ static void test_dmsynth(void) IDirectMusicSynthSink *dmsynth_sink = NULL; IReferenceClock* clock_synth = NULL; IReferenceClock* clock_sink = NULL; + IKsControl* control_synth = NULL; + IKsControl* control_sink = NULL; HRESULT hr; hr = CoCreateInstance(&CLSID_DirectMusicSynth, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusicSynth, (LPVOID*)&dmsynth); @@ -47,6 +50,11 @@ static void test_dmsynth(void) hr = CoCreateInstance(&CLSID_DirectMusicSynthSink, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusicSynthSink, (LPVOID*)&dmsynth_sink); ok(hr == S_OK, "CoCreateInstance returned: %x\n", hr); + hr = IDirectMusicSynth_QueryInterface(dmsynth, &IID_IKsControl, (LPVOID*)&control_synth); + todo_wine ok(hr == S_OK, "IDirectMusicSynth_QueryInterface returned: %x\n", hr); + hr = IDirectMusicSynthSink_QueryInterface(dmsynth_sink, &IID_IKsControl, (LPVOID*)&control_sink); + todo_wine ok(hr == S_OK, "IDirectMusicSynthSink_QueryInterface returned: %x\n", hr); + /* Synth has no default clock */ hr = IDirectMusicSynth_GetLatencyClock(dmsynth, &clock_synth); ok(hr == DMUS_E_NOSYNTHSINK, "IDirectMusicSynth_GetLatencyClock returned: %x\n", hr); @@ -66,6 +74,10 @@ static void test_dmsynth(void) ok(clock_synth != NULL, "No clock returned\n"); ok(clock_synth == clock_sink, "Synth and SynthSink clocks are not the same\n"); + if (control_synth) + IDirectMusicSynth_Release(control_synth); + if (control_sink) + IDirectMusicSynth_Release(control_sink); if (clock_synth) IReferenceClock_Release(clock_synth); if (clock_sink)