Commit d08bce15 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

dmime: Implement the SegTrigger track Get/SetParam.

parent c88fd286
......@@ -134,20 +134,22 @@ static HRESULT WINAPI segment_track_Play(IDirectMusicTrack8 *iface, void *pState
return S_OK;
}
static HRESULT WINAPI segment_track_GetParam(IDirectMusicTrack8 *iface, REFGUID rguidType,
MUSIC_TIME mtTime, MUSIC_TIME *pmtNext, void *pParam)
static HRESULT WINAPI segment_track_GetParam(IDirectMusicTrack8 *iface, REFGUID type,
MUSIC_TIME time, MUSIC_TIME *next, void *param)
{
IDirectMusicSegTriggerTrack *This = impl_from_IDirectMusicTrack8(iface);
FIXME("(%p, %s, %d, %p, %p): stub\n", This, debugstr_dmguid(rguidType), mtTime, pmtNext, pParam);
return S_OK;
IDirectMusicSegTriggerTrack *This = impl_from_IDirectMusicTrack8(iface);
TRACE("(%p, %s, %d, %p, %p): not supported\n", This, debugstr_dmguid(type), time, next, param);
return DMUS_E_GET_UNSUPPORTED;
}
static HRESULT WINAPI segment_track_SetParam(IDirectMusicTrack8 *iface, REFGUID rguidType,
MUSIC_TIME mtTime, void *pParam)
static HRESULT WINAPI segment_track_SetParam(IDirectMusicTrack8 *iface, REFGUID type,
MUSIC_TIME time, void *param)
{
IDirectMusicSegTriggerTrack *This = impl_from_IDirectMusicTrack8(iface);
FIXME("(%p, %s, %d, %p): stub\n", This, debugstr_dmguid(rguidType), mtTime, pParam);
return S_OK;
IDirectMusicSegTriggerTrack *This = impl_from_IDirectMusicTrack8(iface);
TRACE("(%p, %s, %d, %p): not supported\n", This, debugstr_dmguid(type), time, param);
return S_OK;
}
static HRESULT WINAPI segment_track_IsParamSupported(IDirectMusicTrack8 *iface, REFGUID type)
......@@ -155,7 +157,6 @@ static HRESULT WINAPI segment_track_IsParamSupported(IDirectMusicTrack8 *iface,
IDirectMusicSegTriggerTrack *This = impl_from_IDirectMusicTrack8(iface);
TRACE("(%p, %s)\n", This, debugstr_dmguid(type));
return S_OK;
}
......
......@@ -604,6 +604,26 @@ static void test_track_identify(void)
IDirectMusicSegment8_Release(seg);
}
static void expect_getparam(IDirectMusicTrack *track, REFGUID type, const char *name,
HRESULT expect)
{
HRESULT hr;
char buf[64] = { 0 };
hr = IDirectMusicTrack8_GetParam(track, type, 0, NULL, buf);
ok(hr == expect, "GetParam(%s) failed: %08x, expected %08x\n", name, hr, expect);
}
static void expect_setparam(IDirectMusicTrack *track, REFGUID type, const char *name,
HRESULT expect)
{
HRESULT hr;
char buf[64] = { 0 };
hr = IDirectMusicTrack8_SetParam(track, type, 0, buf);
ok(hr == expect, "SetParam(%s) failed: %08x, expected %08x\n", name, hr, expect);
}
static void test_track(void)
{
IDirectMusicTrack *dmt;
......@@ -679,10 +699,15 @@ static void test_track(void)
if (class[i].has_params != ~0) {
for (j = 0; j < ARRAY_SIZE(param_types); j++) {
hr = IDirectMusicTrack8_IsParamSupported(dmt, param_types[j].type);
if (class[i].has_params & (1 << j))
if (class[i].has_params & (1 << j)) {
ok(hr == S_OK, "IsParamSupported(%s) failed: %08x, expected S_OK\n",
param_types[j].name, hr);
else
if (class[i].clsid == &CLSID_DirectMusicSegmentTriggerTrack) {
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
ok(hr == DMUS_E_TYPE_UNSUPPORTED,
"IsParamSupported(%s) failed: %08x, expected DMUS_E_TYPE_UNSUPPORTED\n",
param_types[j].name, hr);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment