Christian Costa : dmsynth: Add tests for querying IKsControl for Synth and SynthSink objects.
Alexandre Julliard
julliard at winehq.org
Tue May 8 14:16:56 CDT 2012
Module: wine
Branch: master
Commit: 42d18a3279efc9eca9b4cf1c44cba665ae540f62
URL: http://source.winehq.org/git/wine.git/?a=commit;h=42d18a3279efc9eca9b4cf1c44cba665ae540f62
Author: Christian Costa <titan.costa at gmail.com>
Date: Thu May 3 23:05:42 2012 +0200
dmsynth: Add tests for querying IKsControl for Synth and SynthSink objects.
---
dlls/dmsynth/tests/dmsynth.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/dlls/dmsynth/tests/dmsynth.c b/dlls/dmsynth/tests/dmsynth.c
index df67cd4..66da1fb 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)
More information about the wine-cvs
mailing list