From d827b65204571198f8e2e9deb2eb53f600315644 Mon Sep 17 00:00:00 2001 From: Michael Stefaniuc Date: Tue, 3 Dec 2019 23:51:21 +0100 Subject: [PATCH] dmime: Partial implementation of the Marker track Get/SetParam. Signed-off-by: Michael Stefaniuc Signed-off-by: Alexandre Julliard --- dlls/dmime/markertrack.c | 35 +++++++++++++++++++++++++---------- dlls/dmime/tests/dmime.c | 4 +++- 2 files changed, 28 insertions(+), 11 deletions(-) diff --git a/dlls/dmime/markertrack.c b/dlls/dmime/markertrack.c index 32dd025ed4f..f41bed668a6 100644 --- a/dlls/dmime/markertrack.c +++ b/dlls/dmime/markertrack.c @@ -117,20 +117,35 @@ static HRESULT WINAPI IDirectMusicTrackImpl_Play(IDirectMusicTrack *iface, void return S_OK; } -static HRESULT WINAPI IDirectMusicTrackImpl_GetParam(IDirectMusicTrack *iface, REFGUID rguidType, - MUSIC_TIME mtTime, MUSIC_TIME *pmtNext, void *pParam) +static HRESULT WINAPI IDirectMusicTrackImpl_GetParam(IDirectMusicTrack *iface, REFGUID type, + MUSIC_TIME time, MUSIC_TIME *next, void *param) { - IDirectMusicMarkerTrack *This = impl_from_IDirectMusicTrack(iface); - FIXME("(%p, %s, %d, %p, %p): stub\n", This, debugstr_dmguid(rguidType), mtTime, pmtNext, pParam); - return S_OK; + IDirectMusicMarkerTrack *This = impl_from_IDirectMusicTrack(iface); + + TRACE("(%p, %s, %d, %p, %p)\n", This, debugstr_dmguid(type), time, next, param); + + if (!param) + return E_POINTER; + + if (IsEqualGUID(type, &GUID_Play_Marker)) { + FIXME("GUID_Play_Marker not handled yet\n"); + return S_FALSE; + } + if (IsEqualGUID(type, &GUID_Valid_Start_Time)) { + FIXME("GUID_Valid_Start_Time not handled yet\n"); + return DMUS_E_NOT_FOUND; + } + + return DMUS_E_GET_UNSUPPORTED; } -static HRESULT WINAPI IDirectMusicTrackImpl_SetParam(IDirectMusicTrack *iface, REFGUID rguidType, - MUSIC_TIME mtTime, void *pParam) +static HRESULT WINAPI IDirectMusicTrackImpl_SetParam(IDirectMusicTrack *iface, REFGUID type, + MUSIC_TIME time, void *param) { - IDirectMusicMarkerTrack *This = impl_from_IDirectMusicTrack(iface); - FIXME("(%p, %s, %d, %p): stub\n", This, debugstr_dmguid(rguidType), mtTime, pParam); - return S_OK; + IDirectMusicMarkerTrack *This = impl_from_IDirectMusicTrack(iface); + + TRACE("(%p, %s, %d, %p): not supported\n", This, debugstr_dmguid(type), time, param); + return DMUS_E_SET_UNSUPPORTED; } static HRESULT WINAPI IDirectMusicTrackImpl_IsParamSupported(IDirectMusicTrack *iface, diff --git a/dlls/dmime/tests/dmime.c b/dlls/dmime/tests/dmime.c index 0f4c43700c9..723dc883994 100644 --- a/dlls/dmime/tests/dmime.c +++ b/dlls/dmime/tests/dmime.c @@ -706,7 +706,9 @@ static void test_track(void) expect_getparam(dmt, param_types[j].type, param_types[j].name, DMUS_E_GET_UNSUPPORTED); expect_setparam(dmt, param_types[j].type, param_types[j].name, S_OK); - } + } else if (class[i].clsid == &CLSID_DirectMusicMarkerTrack) + expect_setparam(dmt, param_types[j].type, param_types[j].name, + DMUS_E_SET_UNSUPPORTED); } else ok(hr == DMUS_E_TYPE_UNSUPPORTED, "IsParamSupported(%s) failed: %08x, expected DMUS_E_TYPE_UNSUPPORTED\n",