[PATCH 3/4] dmusic: Implement IDirectMusic8Impl_EnumMasterClock.
Christian Costa
titan.costa at gmail.com
Tue May 1 03:07:09 CDT 2012
---
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 fac1d53..d42fe7d 100644
--- a/dlls/dmusic/dmusic.c
+++ b/dlls/dmusic/dmusic.c
@@ -236,11 +236,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)
+ {
+ GUID guid_system_clock = { 0x58d58419, 0x71b4, 0x11d1, { 0xa7, 0x4c, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12 } };
+ 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
+ {
+ GUID guid_dsound_clock = { 0x58d58420, 0x71b4, 0x11d1, { 0xa7, 0x4c, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12 } };
+ 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-patches
mailing list