Commit 608ac8e3 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

dmscript: Implement the Script track GetParam/SetParam methods.

parent 9bc84396
......@@ -124,20 +124,24 @@ static HRESULT WINAPI script_track_Play(IDirectMusicTrack8 *iface, void *pStateD
return S_OK;
}
static HRESULT WINAPI script_track_GetParam(IDirectMusicTrack8 *iface, REFGUID rguidType,
MUSIC_TIME mtTime, MUSIC_TIME *pmtNext, void *pParam)
static HRESULT WINAPI script_track_GetParam(IDirectMusicTrack8 *iface, REFGUID type,
MUSIC_TIME time, MUSIC_TIME *next, void *param)
{
DirectMusicScriptTrack *This = impl_from_IDirectMusicTrack8(iface);
FIXME("(%p, %s, %d, %p, %p): stub\n", This, debugstr_dmguid(rguidType), mtTime, pmtNext, pParam);
return S_OK;
DirectMusicScriptTrack *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 script_track_SetParam(IDirectMusicTrack8 *iface, REFGUID rguidType,
MUSIC_TIME mtTime, void *pParam)
static HRESULT WINAPI script_track_SetParam(IDirectMusicTrack8 *iface, REFGUID type,
MUSIC_TIME time, void *param)
{
DirectMusicScriptTrack *This = impl_from_IDirectMusicTrack8(iface);
FIXME("(%p, %s, %d, %p): stub\n", This, debugstr_dmguid(rguidType), mtTime, pParam);
return S_OK;
DirectMusicScriptTrack *This = impl_from_IDirectMusicTrack8(iface);
TRACE("(%p, %s, %d, %p): not supported\n", This, debugstr_dmguid(type), time, param);
return DMUS_E_SET_UNSUPPORTED;
}
static HRESULT WINAPI script_track_IsParamSupported(IDirectMusicTrack8 *iface, REFGUID type)
......
......@@ -207,6 +207,7 @@ static void test_scripttrack(void)
IPersistStream *ps;
CLSID class;
ULARGE_INTEGER size;
char buf[64] = { 0 };
HRESULT hr;
#define X(guid) &guid, #guid
const struct {
......@@ -260,14 +261,22 @@ static void test_scripttrack(void)
ok(hr == E_POINTER, "IDirectMusicTrack8_EndPlay failed: %08x\n", hr);
hr = IDirectMusicTrack8_Play(dmt, NULL, 0, 0, 0, 0, NULL, NULL, 0);
ok(hr == E_POINTER, "IDirectMusicTrack8_Play failed: %08x\n", hr);
}
hr = IDirectMusicTrack8_GetParam(dmt, NULL, 0, NULL, NULL);
ok(hr == DMUS_E_GET_UNSUPPORTED, "IDirectMusicTrack8_GetParam failed: %08x\n", hr);
}
for (i = 0; i < ARRAY_SIZE(unsupported); i++) {
hr = IDirectMusicTrack8_IsParamSupported(dmt, unsupported[i].type);
ok(hr == DMUS_E_TYPE_UNSUPPORTED,
"IsParamSupported(%s) failed: %08x, expected DMUS_E_TYPE_UNSUPPORTED\n",
unsupported[i].name, hr);
hr = IDirectMusicTrack8_GetParam(dmt, unsupported[i].type, 0, NULL, buf);
ok(hr == DMUS_E_GET_UNSUPPORTED,
"GetParam(%s) failed: %08x, expected DMUS_E_GET_UNSUPPORTED\n",
unsupported[i].name, hr);
hr = IDirectMusicTrack8_SetParam(dmt, unsupported[i].type, 0, buf);
ok(hr == DMUS_E_SET_UNSUPPORTED,
"SetParam(%s) failed: %08x, expected DMUS_E_SET_UNSUPPORTED\n",
unsupported[i].name, hr);
}
hr = IDirectMusicTrack8_AddNotificationType(dmt, NULL);
ok(hr == E_NOTIMPL, "IDirectMusicTrack8_AddNotificationType failed: %08x\n", 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