dmime: Partial implementation of the TimeSig track Get/SetParam.

Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Michael Stefaniuc 2019-12-03 23:51:23 +01:00 committed by Alexandre Julliard
parent d423339960
commit 2ff339f9ad
2 changed files with 37 additions and 10 deletions

View File

@ -716,6 +716,15 @@ static void test_track(void)
ok(hr == DMUS_E_TYPE_UNSUPPORTED, ok(hr == DMUS_E_TYPE_UNSUPPORTED,
"IsParamSupported(%s) failed: %08x, expected DMUS_E_TYPE_UNSUPPORTED\n", "IsParamSupported(%s) failed: %08x, expected DMUS_E_TYPE_UNSUPPORTED\n",
param_types[j].name, hr); param_types[j].name, hr);
/* GetParam / SetParam for IsParamSupported supported types */
if (class[i].clsid == &CLSID_DirectMusicTimeSigTrack) {
expect_getparam(dmt, &GUID_DisableTimeSig, "GUID_DisableTimeSig",
DMUS_E_GET_UNSUPPORTED);
expect_getparam(dmt, &GUID_EnableTimeSig, "GUID_EnableTimeSig",
DMUS_E_GET_UNSUPPORTED);
expect_setparam(dmt, &GUID_TimeSignature, "GUID_TimeSignature",
DMUS_E_SET_UNSUPPORTED);
}
} }
} else { } else {
hr = IDirectMusicTrack_GetParam(dmt, NULL, 0, NULL, NULL); hr = IDirectMusicTrack_GetParam(dmt, NULL, 0, NULL, NULL);

View File

@ -117,20 +117,38 @@ static HRESULT WINAPI IDirectMusicTrackImpl_Play(IDirectMusicTrack *iface, void
return S_OK; return S_OK;
} }
static HRESULT WINAPI IDirectMusicTrackImpl_GetParam(IDirectMusicTrack *iface, REFGUID rguidType, static HRESULT WINAPI IDirectMusicTrackImpl_GetParam(IDirectMusicTrack *iface, REFGUID type,
MUSIC_TIME mtTime, MUSIC_TIME *pmtNext, void *pParam) MUSIC_TIME time, MUSIC_TIME *next, void *param)
{ {
IDirectMusicTimeSigTrack *This = impl_from_IDirectMusicTrack(iface); IDirectMusicTimeSigTrack *This = impl_from_IDirectMusicTrack(iface);
FIXME("(%p, %s, %d, %p, %p): stub\n", This, debugstr_dmguid(rguidType), mtTime, pmtNext, pParam);
return S_OK; TRACE("(%p, %s, %d, %p, %p)\n", This, debugstr_dmguid(type), time, next, param);
if (IsEqualGUID(type, &GUID_TimeSignature)) {
FIXME("GUID_TimeSignature not handled yet\n");
return DMUS_E_NOT_FOUND;
}
return DMUS_E_GET_UNSUPPORTED;
} }
static HRESULT WINAPI IDirectMusicTrackImpl_SetParam(IDirectMusicTrack *iface, REFGUID rguidType, static HRESULT WINAPI IDirectMusicTrackImpl_SetParam(IDirectMusicTrack *iface, REFGUID type,
MUSIC_TIME mtTime, void *pParam) MUSIC_TIME time, void *param)
{ {
IDirectMusicTimeSigTrack *This = impl_from_IDirectMusicTrack(iface); IDirectMusicTimeSigTrack *This = impl_from_IDirectMusicTrack(iface);
FIXME("(%p, %s, %d, %p): stub\n", This, debugstr_dmguid(rguidType), mtTime, pParam);
TRACE("(%p, %s, %d, %p)\n", This, debugstr_dmguid(type), time, param);
if (IsEqualGUID(type, &GUID_DisableTimeSig)) {
FIXME("GUID_DisableTimeSig not handled yet\n");
return S_OK; return S_OK;
}
if (IsEqualGUID(type, &GUID_EnableTimeSig)) {
FIXME("GUID_EnableTimeSig not handled yet\n");
return S_OK;
}
return DMUS_E_SET_UNSUPPORTED;
} }
static HRESULT WINAPI IDirectMusicTrackImpl_IsParamSupported(IDirectMusicTrack *iface, static HRESULT WINAPI IDirectMusicTrackImpl_IsParamSupported(IDirectMusicTrack *iface,