Christian Costa : dmusic: Implement IDirectMusic8Impl_EnumMasterClock.

Alexandre Julliard julliard at winehq.org
Wed May 2 14:30:03 CDT 2012


Module: wine
Branch: master
Commit: 5ae038b2e80dd057534d41fe81c56392b3fa76dd
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=5ae038b2e80dd057534d41fe81c56392b3fa76dd

Author: Christian Costa <titan.costa at gmail.com>
Date:   Tue May  1 10:07:09 2012 +0200

dmusic: Implement IDirectMusic8Impl_EnumMasterClock.

---

 dlls/dmusic/dmusic.c |   29 ++++++++++++++++++++++++++---
 1 files changed, 26 insertions(+), 3 deletions(-)

diff --git a/dlls/dmusic/dmusic.c b/dlls/dmusic/dmusic.c
index f4b6c8c..28c8d35 100644
--- a/dlls/dmusic/dmusic.c
+++ b/dlls/dmusic/dmusic.c
@@ -233,11 +233,34 @@ static HRESULT WINAPI IDirectMusic8Impl_CreatePort(LPDIRECTMUSIC8 iface, REFCLSI
 
 static HRESULT WINAPI IDirectMusic8Impl_EnumMasterClock(LPDIRECTMUSIC8 iface, DWORD index, LPDMUS_CLOCKINFO clock_info)
 {
-    IDirectMusic8Impl *This = impl_from_IDirectMusic8(iface);
+    TRACE("(%p)->(%d, %p)\n", iface, index, clock_info);
 
-    FIXME("(%p)->(%d, %p): stub\n", This, index, clock_info);
+    if (!clock_info)
+        return E_POINTER;
 
-    return S_FALSE;
+    if (index > 1)
+        return S_FALSE;
+
+    if (!index)
+    {
+        static const GUID guid_system_clock = { 0x58d58419, 0x71b4, 0x11d1, { 0xa7, 0x4c, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12 } };
+        static const WCHAR name_system_clock[] = { 'S','y','s','t','e','m',' ','C','l','o','c','k',0 };
+
+        clock_info->ctType = 0;
+        clock_info->guidClock = guid_system_clock;
+        strcpyW(clock_info->wszDescription, name_system_clock);
+    }
+    else
+    {
+        static const GUID guid_dsound_clock = { 0x58d58420, 0x71b4, 0x11d1, { 0xa7, 0x4c, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12 } };
+        static const WCHAR name_dsound_clock[] = { 'D','i','r','e','c','t','S','o','u','n','d',' ','C','l','o','c','k',0 };
+
+        clock_info->ctType = 0;
+        clock_info->guidClock = guid_dsound_clock;
+        strcpyW(clock_info->wszDescription, name_dsound_clock);
+    }
+
+    return S_OK;
 }
 
 static HRESULT WINAPI IDirectMusic8Impl_GetMasterClock(LPDIRECTMUSIC8 iface, LPGUID pguidClock, IReferenceClock** ppReferenceClock)




More information about the wine-cvs mailing list