Michael Stefaniuc : dmstyle: Partially implement Audition track GetParam/SetParam methods.

Alexandre Julliard julliard at winehq.org
Thu Jan 23 15:48:48 CST 2020


Module: wine
Branch: master
Commit: 62ff6ee754f33ca96054afec78c6412c1aa7c262
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=62ff6ee754f33ca96054afec78c6412c1aa7c262

Author: Michael Stefaniuc <mstefani at winehq.org>
Date:   Wed Jan 22 22:24:28 2020 +0100

dmstyle: Partially implement Audition track GetParam/SetParam methods.

Temporary drop a todo_wine test until all dmstyle tracks have their
SetParam() method implemented.

Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/dmstyle/auditiontrack.c | 45 ++++++++++++++++++++++++++++++++++----------
 dlls/dmstyle/tests/dmstyle.c |  2 --
 2 files changed, 35 insertions(+), 12 deletions(-)

diff --git a/dlls/dmstyle/auditiontrack.c b/dlls/dmstyle/auditiontrack.c
index 9d45f1bcd0..ececce9728 100644
--- a/dlls/dmstyle/auditiontrack.c
+++ b/dlls/dmstyle/auditiontrack.c
@@ -117,24 +117,49 @@ static HRESULT WINAPI audition_track_Play(IDirectMusicTrack8 *iface, void *pStat
 	return S_OK;
 }
 
-static HRESULT WINAPI audition_track_GetParam(IDirectMusicTrack8 *iface, REFGUID rguidType,
-        MUSIC_TIME mtTime, MUSIC_TIME *pmtNext, void *pParam)
+static HRESULT WINAPI audition_track_GetParam(IDirectMusicTrack8 *iface, REFGUID type,
+        MUSIC_TIME time, MUSIC_TIME *next, void *param)
 {
     IDirectMusicAuditionTrack *This = impl_from_IDirectMusicTrack8(iface);
-    FIXME("(%p, %s, %d, %p, %p): stub\n", This, debugstr_dmguid(rguidType), mtTime, pmtNext, pParam);
 
-    if (!rguidType)
+    TRACE("(%p, %s, %d, %p, %p):\n", This, debugstr_dmguid(type), time, next, param);
+
+    if (!type)
         return E_POINTER;
 
-    return S_OK;
+    if (IsEqualGUID(type, &GUID_Valid_Start_Time)) {
+        FIXME("GUID_Valid_Start_Time not handled yet\n");
+        return S_OK;
+    } else if (IsEqualGUID(type, &GUID_Variations)) {
+        FIXME("GUID_Variations not handled yet\n");
+        return S_OK;
+    }
+
+    return DMUS_E_GET_UNSUPPORTED;
 }
 
-static HRESULT WINAPI audition_track_SetParam(IDirectMusicTrack8 *iface, REFGUID rguidType,
-        MUSIC_TIME mtTime, void *pParam)
+static HRESULT WINAPI audition_track_SetParam(IDirectMusicTrack8 *iface, REFGUID type,
+        MUSIC_TIME time, void *param)
 {
-        IDirectMusicAuditionTrack *This = impl_from_IDirectMusicTrack8(iface);
-	FIXME("(%p, %s, %d, %p): stub\n", This, debugstr_dmguid(rguidType), mtTime, pParam);
-	return S_OK;
+    IDirectMusicAuditionTrack *This = impl_from_IDirectMusicTrack8(iface);
+
+    TRACE("(%p, %s, %d, %p)\n", This, debugstr_dmguid(type), time, param);
+
+    if (!type)
+        return E_POINTER;
+
+    if (IsEqualGUID(type, &GUID_DisableTimeSig)) {
+        FIXME("GUID_DisableTimeSig not handled yet\n");
+        return S_OK;
+    } else if (IsEqualGUID(type, &GUID_EnableTimeSig)) {
+        FIXME("GUID_EnableTimeSig not handled yet\n");
+        return S_OK;
+    } else if (IsEqualGUID(type, &GUID_SeedVariations)) {
+        FIXME("GUID_SeedVariations not handled yet\n");
+        return S_OK;
+    }
+
+    return DMUS_E_SET_UNSUPPORTED;
 }
 
 static HRESULT WINAPI audition_track_IsParamSupported(IDirectMusicTrack8 *iface, REFGUID type)
diff --git a/dlls/dmstyle/tests/dmstyle.c b/dlls/dmstyle/tests/dmstyle.c
index 5130af773c..5759a85aee 100644
--- a/dlls/dmstyle/tests/dmstyle.c
+++ b/dlls/dmstyle/tests/dmstyle.c
@@ -320,8 +320,6 @@ static void test_track(void)
 
         hr = IDirectMusicTrack8_GetParam(dmt8, NULL, 0, NULL, NULL);
         ok(hr == E_POINTER, "IDirectMusicTrack8_GetParam failed: %08x\n", hr);
-        hr = IDirectMusicTrack8_SetParam(dmt8, NULL, 0, NULL);
-        todo_wine ok(hr == E_POINTER, "IDirectMusicTrack8_SetParam failed: %08x\n", hr);
 
         hr = IDirectMusicTrack8_IsParamSupported(dmt8, NULL);
         ok(hr == E_POINTER, "IDirectMusicTrack8_IsParamSupported failed: %08x\n", hr);




More information about the wine-cvs mailing list