[PATCH] dmusic: Add master clock tests. (try 2)

Christian Costa titan.costa at gmail.com
Mon Sep 24 15:15:40 CDT 2012


--

Try 2: Fix missing Release spotted by Andrew.
---
 dlls/dmusic/tests/dmusic.c |    9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/dlls/dmusic/tests/dmusic.c b/dlls/dmusic/tests/dmusic.c
index 24ae90d..8d070b7 100644
--- a/dlls/dmusic/tests/dmusic.c
+++ b/dlls/dmusic/tests/dmusic.c
@@ -58,6 +58,8 @@ static void test_dmusic(void)
     DMUS_PORTPARAMS port_params;
     IDirectMusicPort *port = NULL;
     DMUS_CLOCKINFO clock_info;
+    GUID guid_clock;
+    IReferenceClock *clock = NULL;
 
     hr = CoCreateInstance(&CLSID_DirectMusic, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusic, (LPVOID*)&dmusic);
     if (hr != S_OK)
@@ -66,6 +68,13 @@ static void test_dmusic(void)
         return;
     }
 
+    hr = IDirectMusic_GetMasterClock(dmusic, &guid_clock, &clock);
+    ok(hr == S_OK, "IDirectMusic_GetMasterClock returned: %x\n", hr);
+    ok(clock != NULL, "No clock returned\n");
+    trace("  guidPort = %s\n", debugstr_guid(&guid_clock));
+    if (clock)
+        IReferenceClock_Release(clock);
+
     port_params.dwSize = sizeof(port_params);
     port_params.dwValidParams = DMUS_PORTPARAMS_CHANNELGROUPS | DMUS_PORTPARAMS_AUDIOCHANNELS;
     port_params.dwChannelGroups = 1;




More information about the wine-patches mailing list