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

dmband: Add partial implementation of Band track GetParam/SetParam.

parent f870aa49
......@@ -132,20 +132,57 @@ static HRESULT WINAPI band_track_Play(IDirectMusicTrack8 *iface, void *state_dat
return S_OK;
}
static HRESULT WINAPI band_track_GetParam(IDirectMusicTrack8 *iface, REFGUID rguidType,
MUSIC_TIME mtTime, MUSIC_TIME *pmtNext, void *pParam)
static HRESULT WINAPI band_track_GetParam(IDirectMusicTrack8 *iface, REFGUID type, MUSIC_TIME time,
MUSIC_TIME *next, void *param)
{
IDirectMusicBandTrack *This = impl_from_IDirectMusicTrack8(iface);
FIXME("(%p, %s, %d, %p, %p): stub\n", This, debugstr_dmguid(rguidType), mtTime, pmtNext, pParam);
return S_OK;
IDirectMusicBandTrack *This = impl_from_IDirectMusicTrack8(iface);
TRACE("(%p, %s, %d, %p, %p)\n", This, debugstr_dmguid(type), time, next, param);
if (!type)
return E_POINTER;
if (!IsEqualGUID(type, &GUID_BandParam))
return DMUS_E_GET_UNSUPPORTED;
FIXME("GUID_BandParam not handled yet\n");
return S_OK;
}
static HRESULT WINAPI band_track_SetParam(IDirectMusicTrack8 *iface, REFGUID rguidType,
MUSIC_TIME mtTime, void *pParam)
static HRESULT WINAPI band_track_SetParam(IDirectMusicTrack8 *iface, REFGUID type, MUSIC_TIME time,
void *param)
{
IDirectMusicBandTrack *This = impl_from_IDirectMusicTrack8(iface);
FIXME("(%p, %s, %d, %p): stub\n", This, debugstr_dmguid(rguidType), mtTime, pParam);
return S_OK;
IDirectMusicBandTrack *This = impl_from_IDirectMusicTrack8(iface);
TRACE("(%p, %s, %d, %p)\n", This, debugstr_dmguid(type), time, param);
if (!type)
return E_POINTER;
if (FAILED(IDirectMusicTrack8_IsParamSupported(iface, type)))
return DMUS_E_TYPE_UNSUPPORTED;
if (IsEqualGUID(type, &GUID_BandParam))
FIXME("GUID_BandParam not handled yet\n");
else if (IsEqualGUID(type, &GUID_Clear_All_Bands))
FIXME("GUID_Clear_All_Bands not handled yet\n");
else if (IsEqualGUID(type, &GUID_ConnectToDLSCollection))
FIXME("GUID_ConnectToDLSCollection not handled yet\n");
else if (IsEqualGUID(type, &GUID_Disable_Auto_Download))
FIXME("GUID_Disable_Auto_Download not handled yet\n");
else if (IsEqualGUID(type, &GUID_Download))
FIXME("GUID_Download not handled yet\n");
else if (IsEqualGUID(type, &GUID_DownloadToAudioPath))
FIXME("GUID_DownloadToAudioPath not handled yet\n");
else if (IsEqualGUID(type, &GUID_Enable_Auto_Download))
FIXME("GUID_Enable_Auto_Download not handled yet\n");
else if (IsEqualGUID(type, &GUID_IDirectMusicBand))
FIXME("GUID_IDirectMusicBand not handled yet\n");
else if (IsEqualGUID(type, &GUID_StandardMIDIFile))
FIXME("GUID_StandardMIDIFile not handled yet\n");
else if (IsEqualGUID(type, &GUID_UnloadFromAudioPath))
FIXME("GUID_UnloadFromAudioPath not handled yet\n");
return S_OK;
}
static HRESULT WINAPI band_track_IsParamSupported(IDirectMusicTrack8 *iface, REFGUID rguidType)
......
......@@ -180,6 +180,7 @@ static void test_bandtrack(void)
IPersistStream *ps;
CLSID class;
ULARGE_INTEGER size;
char buf[64] = { 0 };
HRESULT hr;
#define X(guid) &guid, #guid
const struct {
......@@ -233,26 +234,39 @@ static void test_bandtrack(void)
}
hr = IDirectMusicTrack8_EndPlay(dmt8, NULL);
ok(hr == S_OK, "IDirectMusicTrack8_EndPlay failed: %08x\n", hr);
todo_wine {
hr = IDirectMusicTrack8_Play(dmt8, NULL, 0, 0, 0, 0, NULL, NULL, 0);
todo_wine
ok(hr == DMUS_S_END, "IDirectMusicTrack8_Play failed: %08x\n", hr);
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);
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);
for (i = 0; i < ARRAY_SIZE(param_types); i++) {
hr = IDirectMusicTrack8_IsParamSupported(dmt8, param_types[i].type);
if (param_types[i].supported)
if (param_types[i].supported) {
ok(hr == S_OK, "IsParamSupported(%s) failed: %08x, expected S_OK\n",
param_types[i].name, hr);
else
hr = IDirectMusicTrack8_GetParam(dmt8, param_types[i].type, 0, NULL, buf);
if (param_types[i].type != &GUID_BandParam)
ok(hr == DMUS_E_GET_UNSUPPORTED,
"GetParam(%s) failed: %08x, expected DMUS_E_GET_UNSUPPORTED\n",
param_types[i].name, hr);
} else {
ok(hr == DMUS_E_TYPE_UNSUPPORTED,
"IsParamSupported(%s) failed: %08x, expected DMUS_E_TYPE_UNSUPPORTED\n",
param_types[i].name, hr);
hr = IDirectMusicTrack8_GetParam(dmt8, param_types[i].type, 0, NULL, buf);
ok(hr == DMUS_E_GET_UNSUPPORTED,
"GetParam(%s) failed: %08x, expected DMUS_E_GET_UNSUPPORTED\n",
param_types[i].name, hr);
hr = IDirectMusicTrack8_SetParam(dmt8, param_types[i].type, 0, buf);
ok(hr == DMUS_E_TYPE_UNSUPPORTED,
"SetParam(%s) failed: %08x, expected DMUS_E_TYPE_UNSUPPORTED\n",
param_types[i].name, hr);
}
}
hr = IDirectMusicTrack8_AddNotificationType(dmt8, NULL);
......
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