- First drafts for IDirectMusicSegment::GetParam and
IDirectMusicTempoTrack::GetParam (need modif on Load). - Return value fixes for GetClassID of TempoTrack and Segment.
This commit is contained in:
parent
c8aba95f50
commit
8d954393e1
|
@ -153,6 +153,12 @@ typedef struct _DMUS_PRIVATE_SEGMENT_TRACK {
|
|||
IDirectMusicTrack* pTrack;
|
||||
} DMUS_PRIVATE_SEGMENT_TRACK, *LPDMUS_PRIVATE_SEGMENT_TRACK;
|
||||
|
||||
typedef struct _DMUS_PRIVATE_TEMPO_ITEM {
|
||||
struct list entry; /* for listing elements */
|
||||
DMUS_IO_TEMPO_ITEM item;
|
||||
} DMUS_PRIVATE_TEMPO_ITEM, *LPDMUS_PRIVATE_TEMPO_ITEM;
|
||||
|
||||
|
||||
/* some sort of aux. performance channel: as far as i can understand, these are
|
||||
used to represent a particular midi channel in particular group at particular
|
||||
group; so all we need to do is to fill it with parent port, group and midi
|
||||
|
@ -796,6 +802,8 @@ struct IDirectMusicTempoTrack {
|
|||
|
||||
/* IDirectMusicTempoTrack fields */
|
||||
LPDMUS_OBJECTDESC pDesc;
|
||||
BOOL enabled;
|
||||
struct list Items;
|
||||
};
|
||||
|
||||
/* IUnknown: */
|
||||
|
|
|
@ -147,23 +147,83 @@ HRESULT WINAPI IDirectMusicSegment8Impl_IDirectMusicSegment8_SetDefaultResolutio
|
|||
|
||||
HRESULT WINAPI IDirectMusicSegment8Impl_IDirectMusicSegment8_GetTrack (LPDIRECTMUSICSEGMENT8 iface, REFGUID rguidType, DWORD dwGroupBits, DWORD dwIndex, IDirectMusicTrack** ppTrack) {
|
||||
ICOM_THIS_MULTI(IDirectMusicSegment8Impl, SegmentVtbl, iface);
|
||||
FIXME("(%p, %s, %ld, %ld, %p): stub\n", This, debugstr_dmguid(rguidType), dwGroupBits, dwIndex, ppTrack);
|
||||
return S_OK;
|
||||
|
||||
CLSID pIt_clsid;
|
||||
struct list* pEntry = NULL;
|
||||
LPDMUS_PRIVATE_SEGMENT_TRACK pIt = NULL;
|
||||
IPersistStream* pCLSIDStream = NULL;
|
||||
HRESULT hr = S_OK;
|
||||
|
||||
TRACE("(%p, %s, %ld, 0x%lx, %p)\n", This, debugstr_dmguid(rguidType), dwGroupBits, dwIndex, ppTrack);
|
||||
|
||||
if (NULL == ppTrack) {
|
||||
return E_POINTER;
|
||||
}
|
||||
|
||||
LIST_FOR_EACH (pEntry, &This->Tracks) {
|
||||
pIt = LIST_ENTRY(pEntry, DMUS_PRIVATE_SEGMENT_TRACK, entry);
|
||||
TRACE(" - %p -> 0x%lx,%p\n", pIt, pIt->dwGroupBits, pIt->pTrack);
|
||||
if (0xFFFFFFFF != dwGroupBits && 0 == (pIt->dwGroupBits & dwGroupBits)) continue ;
|
||||
if (FALSE == IsEqualGUID(&GUID_NULL, rguidType)) {
|
||||
/**
|
||||
* it rguidType is not null we must check if CLSID are equals
|
||||
* and the unqiue way to get it its using IPersistStream Interface
|
||||
*/
|
||||
hr = IDirectMusicTrack_QueryInterface(pIt->pTrack, &IID_IPersistStream, (void**) &pCLSIDStream);
|
||||
if (FAILED(hr)) {
|
||||
ERR("(%p): object %p don't implement IPersistStream Interface. Expect a crash (critical problem)\n", This, pIt->pTrack);
|
||||
continue ;
|
||||
}
|
||||
hr = IPersistStream_GetClassID(pCLSIDStream, &pIt_clsid);
|
||||
IPersistStream_Release(pCLSIDStream); pCLSIDStream = NULL;
|
||||
if (FAILED(hr)) {
|
||||
ERR("(%p): non-implemented GetClassID for object %p\n", This, pIt->pTrack);
|
||||
continue ;
|
||||
}
|
||||
TRACE(" - %p -> %s\n", pIt, debugstr_dmguid(&pIt_clsid));
|
||||
if (FALSE == IsEqualGUID(&pIt_clsid, rguidType)) continue ;
|
||||
}
|
||||
if (0 == dwIndex) {
|
||||
*ppTrack = pIt->pTrack;
|
||||
IDirectMusicTrack_AddRef(*ppTrack);
|
||||
return S_OK;
|
||||
}
|
||||
--dwIndex;
|
||||
}
|
||||
return DMUS_E_NOT_FOUND;
|
||||
}
|
||||
|
||||
HRESULT WINAPI IDirectMusicSegment8Impl_IDirectMusicSegment8_GetTrackGroup (LPDIRECTMUSICSEGMENT8 iface, IDirectMusicTrack* pTrack, DWORD* pdwGroupBits) {
|
||||
ICOM_THIS_MULTI(IDirectMusicSegment8Impl, SegmentVtbl, iface);
|
||||
FIXME("(%p, %p, %p): stub\n", This, pTrack, pdwGroupBits);
|
||||
return S_OK;
|
||||
|
||||
struct list* pEntry = NULL;
|
||||
LPDMUS_PRIVATE_SEGMENT_TRACK pIt = NULL;
|
||||
|
||||
TRACE("(%p, %p, %p)\n", This, pTrack, pdwGroupBits);
|
||||
|
||||
if (NULL == pdwGroupBits) {
|
||||
return E_POINTER;
|
||||
}
|
||||
|
||||
LIST_FOR_EACH (pEntry, &This->Tracks) {
|
||||
pIt = LIST_ENTRY(pEntry, DMUS_PRIVATE_SEGMENT_TRACK, entry);
|
||||
TRACE(" - %p -> %ld,%p\n", pIt, pIt->dwGroupBits, pIt->pTrack);
|
||||
if (NULL != pIt && pIt->pTrack == pTrack) {
|
||||
*pdwGroupBits = pIt->dwGroupBits;
|
||||
return S_OK;
|
||||
}
|
||||
}
|
||||
|
||||
return DMUS_E_NOT_FOUND;
|
||||
}
|
||||
|
||||
HRESULT WINAPI IDirectMusicSegment8Impl_IDirectMusicSegment8_InsertTrack (LPDIRECTMUSICSEGMENT8 iface, IDirectMusicTrack* pTrack, DWORD dwGroupBits) {
|
||||
LPDMUS_PRIVATE_SEGMENT_TRACK pNewSegTrack;
|
||||
ICOM_THIS_MULTI(IDirectMusicSegment8Impl, SegmentVtbl, iface);
|
||||
|
||||
struct list *pEntry;
|
||||
DWORD i = 0;
|
||||
struct list* pEntry = NULL;
|
||||
LPDMUS_PRIVATE_SEGMENT_TRACK pIt = NULL;
|
||||
LPDMUS_PRIVATE_SEGMENT_TRACK pNewSegTrack = NULL;
|
||||
|
||||
TRACE("(%p, %p, %ld)\n", This, pTrack, dwGroupBits);
|
||||
|
||||
|
@ -194,14 +254,12 @@ HRESULT WINAPI IDirectMusicSegment8Impl_IDirectMusicSegment8_InsertTrack (LPDIRE
|
|||
HRESULT WINAPI IDirectMusicSegment8Impl_IDirectMusicSegment8_RemoveTrack (LPDIRECTMUSICSEGMENT8 iface, IDirectMusicTrack* pTrack) {
|
||||
ICOM_THIS_MULTI(IDirectMusicSegment8Impl, SegmentVtbl, iface);
|
||||
|
||||
struct list *pEntry;
|
||||
DWORD i = 0;
|
||||
struct list* pEntry = NULL;
|
||||
LPDMUS_PRIVATE_SEGMENT_TRACK pIt = NULL;
|
||||
|
||||
FIXME("(%p, %p): stub\n", This, pTrack);
|
||||
TRACE("(%p, %p)\n", This, pTrack);
|
||||
|
||||
LIST_FOR_EACH (pEntry, &This->Tracks) {
|
||||
i++;
|
||||
pIt = LIST_ENTRY(pEntry, DMUS_PRIVATE_SEGMENT_TRACK, entry);
|
||||
if (pIt->pTrack == pTrack) {
|
||||
TRACE("(%p, %p): track in list\n", This, pTrack);
|
||||
|
@ -266,33 +324,74 @@ HRESULT WINAPI IDirectMusicSegment8Impl_IDirectMusicSegment8_SetGraph (LPDIRECTM
|
|||
}
|
||||
|
||||
HRESULT WINAPI IDirectMusicSegment8Impl_IDirectMusicSegment8_AddNotificationType (LPDIRECTMUSICSEGMENT8 iface, REFGUID rguidNotificationType) {
|
||||
ICOM_THIS_MULTI(IDirectMusicSegment8Impl, SegmentVtbl, iface);
|
||||
FIXME("(%p, %s): stub\n", This, debugstr_dmguid(rguidNotificationType));
|
||||
return S_OK;
|
||||
ICOM_THIS_MULTI(IDirectMusicSegment8Impl, SegmentVtbl, iface);
|
||||
FIXME("(%p, %s): stub\n", This, debugstr_dmguid(rguidNotificationType));
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT WINAPI IDirectMusicSegment8Impl_IDirectMusicSegment8_RemoveNotificationType (LPDIRECTMUSICSEGMENT8 iface, REFGUID rguidNotificationType) {
|
||||
ICOM_THIS_MULTI(IDirectMusicSegment8Impl, SegmentVtbl, iface);
|
||||
FIXME("(%p, %s): stub\n", This, debugstr_dmguid(rguidNotificationType));
|
||||
return S_OK;
|
||||
ICOM_THIS_MULTI(IDirectMusicSegment8Impl, SegmentVtbl, iface);
|
||||
FIXME("(%p, %s): stub\n", This, debugstr_dmguid(rguidNotificationType));
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT WINAPI IDirectMusicSegment8Impl_IDirectMusicSegment8_GetParam (LPDIRECTMUSICSEGMENT8 iface, REFGUID rguidType, DWORD dwGroupBits, DWORD dwIndex, MUSIC_TIME mtTime, MUSIC_TIME* pmtNext, void* pParam) {
|
||||
ICOM_THIS_MULTI(IDirectMusicSegment8Impl, SegmentVtbl, iface);
|
||||
FIXME("(%p, %s, %ld, %ld, %ld, %p, %p): stub\n", This, debugstr_dmguid(rguidType), dwGroupBits, dwIndex, mtTime, pmtNext, pParam);
|
||||
return S_OK;
|
||||
ICOM_THIS_MULTI(IDirectMusicSegment8Impl, SegmentVtbl, iface);
|
||||
|
||||
CLSID pIt_clsid;
|
||||
struct list* pEntry = NULL;
|
||||
IDirectMusicTrack* pTrack = NULL;
|
||||
IPersistStream* pCLSIDStream = NULL;
|
||||
LPDMUS_PRIVATE_SEGMENT_TRACK pIt = NULL;
|
||||
HRESULT hr = S_OK;
|
||||
|
||||
FIXME("(%p, %s, 0x%lx, %ld, %ld, %p, %p)\n", This, debugstr_dmguid(rguidType), dwGroupBits, dwIndex, mtTime, pmtNext, pParam);
|
||||
|
||||
if (DMUS_SEG_ANYTRACK == dwIndex) {
|
||||
|
||||
LIST_FOR_EACH (pEntry, &This->Tracks) {
|
||||
pIt = LIST_ENTRY(pEntry, DMUS_PRIVATE_SEGMENT_TRACK, entry);
|
||||
|
||||
TRACE(" - %p -> 0x%lx,%p\n", pIt, pIt->dwGroupBits, pIt->pTrack);
|
||||
|
||||
if (0xFFFFFFFF != dwGroupBits && 0 == (pIt->dwGroupBits & dwGroupBits)) continue ;
|
||||
hr = IPersistStream_GetClassID(pCLSIDStream, &pIt_clsid);
|
||||
IPersistStream_Release(pCLSIDStream); pCLSIDStream = NULL;
|
||||
if (FAILED(hr)) {
|
||||
ERR("(%p): non-implemented GetClassID for object %p\n", This, pIt->pTrack);
|
||||
continue ;
|
||||
}
|
||||
if (FALSE == IsEqualGUID(&pIt_clsid, rguidType)) continue ;
|
||||
if (FAILED(IDirectMusicTrack_IsParamSupported(pIt->pTrack, rguidType))) continue ;
|
||||
hr = IDirectMusicTrack_GetParam(pIt->pTrack, rguidType, mtTime, pmtNext, pParam);
|
||||
if (SUCCEEDED(hr)) return hr;
|
||||
}
|
||||
ERR("(%p): not found\n", This);
|
||||
return DMUS_E_TRACK_NOT_FOUND;
|
||||
}
|
||||
|
||||
hr = IDirectMusicSegment8Impl_IDirectMusicSegment8_GetTrack(iface, &GUID_NULL, dwGroupBits, dwIndex, &pTrack);
|
||||
if (FAILED(hr)) {
|
||||
ERR("(%p): not found\n", This);
|
||||
return DMUS_E_TRACK_NOT_FOUND;
|
||||
}
|
||||
|
||||
hr = IDirectMusicTrack_GetParam(pTrack, rguidType, mtTime, pmtNext, pParam);
|
||||
IDirectMusicTrack_Release(pTrack); pTrack = NULL;
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
HRESULT WINAPI IDirectMusicSegment8Impl_IDirectMusicSegment8_SetParam (LPDIRECTMUSICSEGMENT8 iface, REFGUID rguidType, DWORD dwGroupBits, DWORD dwIndex, MUSIC_TIME mtTime, void* pParam) {
|
||||
ICOM_THIS_MULTI(IDirectMusicSegment8Impl, SegmentVtbl, iface);
|
||||
FIXME("(%p, %s, %ld, %ld, %ld, %p): stub\n", This, debugstr_dmguid(rguidType), dwGroupBits, dwIndex, mtTime, pParam);
|
||||
return S_OK;
|
||||
ICOM_THIS_MULTI(IDirectMusicSegment8Impl, SegmentVtbl, iface);
|
||||
FIXME("(%p, %s, %ld, %ld, %ld, %p): stub\n", This, debugstr_dmguid(rguidType), dwGroupBits, dwIndex, mtTime, pParam);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT WINAPI IDirectMusicSegment8Impl_IDirectMusicSegment8_Clone (LPDIRECTMUSICSEGMENT8 iface, MUSIC_TIME mtStart, MUSIC_TIME mtEnd, IDirectMusicSegment** ppSegment) {
|
||||
ICOM_THIS_MULTI(IDirectMusicSegment8Impl, SegmentVtbl, iface);
|
||||
FIXME("(%p, %ld, %ld, %p): stub\n", This, mtStart, mtEnd, ppSegment);
|
||||
return S_OK;
|
||||
ICOM_THIS_MULTI(IDirectMusicSegment8Impl, SegmentVtbl, iface);
|
||||
FIXME("(%p, %ld, %ld, %p): stub\n", This, mtStart, mtEnd, ppSegment);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT WINAPI IDirectMusicSegment8Impl_IDirectMusicSegment8_SetStartPoint (LPDIRECTMUSICSEGMENT8 iface, MUSIC_TIME mtStart) {
|
||||
|
@ -638,13 +737,13 @@ HRESULT WINAPI IDirectMusicSegment8Impl_IDirectMusicObject_ParseDescriptor (LPDI
|
|||
}
|
||||
|
||||
ICOM_VTABLE(IDirectMusicObject) DirectMusicSegment8_Object_Vtbl = {
|
||||
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
||||
IDirectMusicSegment8Impl_IDirectMusicObject_QueryInterface,
|
||||
IDirectMusicSegment8Impl_IDirectMusicObject_AddRef,
|
||||
IDirectMusicSegment8Impl_IDirectMusicObject_Release,
|
||||
IDirectMusicSegment8Impl_IDirectMusicObject_GetDescriptor,
|
||||
IDirectMusicSegment8Impl_IDirectMusicObject_SetDescriptor,
|
||||
IDirectMusicSegment8Impl_IDirectMusicObject_ParseDescriptor
|
||||
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
||||
IDirectMusicSegment8Impl_IDirectMusicObject_QueryInterface,
|
||||
IDirectMusicSegment8Impl_IDirectMusicObject_AddRef,
|
||||
IDirectMusicSegment8Impl_IDirectMusicObject_Release,
|
||||
IDirectMusicSegment8Impl_IDirectMusicObject_GetDescriptor,
|
||||
IDirectMusicSegment8Impl_IDirectMusicObject_SetDescriptor,
|
||||
IDirectMusicSegment8Impl_IDirectMusicObject_ParseDescriptor
|
||||
};
|
||||
|
||||
/* IDirectMusicSegment8Impl IPersistStream part: */
|
||||
|
@ -666,7 +765,7 @@ ULONG WINAPI IDirectMusicSegment8Impl_IPersistStream_Release (LPPERSISTSTREAM if
|
|||
HRESULT WINAPI IDirectMusicSegment8Impl_IPersistStream_GetClassID (LPPERSISTSTREAM iface, CLSID* pClassID) {
|
||||
ICOM_THIS_MULTI(IDirectMusicSegment8Impl, PersistStreamVtbl, iface);
|
||||
TRACE("(%p, %p)\n", This, pClassID);
|
||||
memcpy(pClassID, &CLSID_DirectMusicContainer, sizeof(CLSID));
|
||||
memcpy(pClassID, &CLSID_DirectMusicSegment, sizeof(CLSID));
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
@ -1111,10 +1210,14 @@ HRESULT WINAPI IDirectMusicSegment8Impl_IPersistStream_Load (LPPERSISTSTREAM ifa
|
|||
}
|
||||
|
||||
HRESULT WINAPI IDirectMusicSegment8Impl_IPersistStream_Save (LPPERSISTSTREAM iface, IStream* pStm, BOOL fClearDirty) {
|
||||
ICOM_THIS_MULTI(IDirectMusicSegment8Impl, PersistStreamVtbl, iface);
|
||||
FIXME("(%p): Saving not implemented yet\n", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT WINAPI IDirectMusicSegment8Impl_IPersistStream_GetSizeMax (LPPERSISTSTREAM iface, ULARGE_INTEGER* pcbSize) {
|
||||
ICOM_THIS_MULTI(IDirectMusicSegment8Impl, PersistStreamVtbl, iface);
|
||||
FIXME("(%p, %p): stub\n", This, pcbSize);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
|
|
@ -66,60 +66,103 @@ ULONG WINAPI IDirectMusicTempoTrack_IUnknown_Release (LPUNKNOWN iface) {
|
|||
}
|
||||
|
||||
ICOM_VTABLE(IUnknown) DirectMusicTempoTrack_Unknown_Vtbl = {
|
||||
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
||||
IDirectMusicTempoTrack_IUnknown_QueryInterface,
|
||||
IDirectMusicTempoTrack_IUnknown_AddRef,
|
||||
IDirectMusicTempoTrack_IUnknown_Release
|
||||
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
||||
IDirectMusicTempoTrack_IUnknown_QueryInterface,
|
||||
IDirectMusicTempoTrack_IUnknown_AddRef,
|
||||
IDirectMusicTempoTrack_IUnknown_Release
|
||||
};
|
||||
|
||||
/* IDirectMusicTempoTrack IDirectMusicTrack8 part: */
|
||||
HRESULT WINAPI IDirectMusicTempoTrack_IDirectMusicTrack_QueryInterface (LPDIRECTMUSICTRACK8 iface, REFIID riid, LPVOID *ppobj) {
|
||||
ICOM_THIS_MULTI(IDirectMusicTempoTrack, TrackVtbl, iface);
|
||||
return IDirectMusicTempoTrack_IUnknown_QueryInterface ((LPUNKNOWN)&This->UnknownVtbl, riid, ppobj);
|
||||
ICOM_THIS_MULTI(IDirectMusicTempoTrack, TrackVtbl, iface);
|
||||
return IDirectMusicTempoTrack_IUnknown_QueryInterface ((LPUNKNOWN)&This->UnknownVtbl, riid, ppobj);
|
||||
}
|
||||
|
||||
ULONG WINAPI IDirectMusicTempoTrack_IDirectMusicTrack_AddRef (LPDIRECTMUSICTRACK8 iface) {
|
||||
ICOM_THIS_MULTI(IDirectMusicTempoTrack, TrackVtbl, iface);
|
||||
return IDirectMusicTempoTrack_IUnknown_AddRef ((LPUNKNOWN)&This->UnknownVtbl);
|
||||
ICOM_THIS_MULTI(IDirectMusicTempoTrack, TrackVtbl, iface);
|
||||
return IDirectMusicTempoTrack_IUnknown_AddRef ((LPUNKNOWN)&This->UnknownVtbl);
|
||||
}
|
||||
|
||||
ULONG WINAPI IDirectMusicTempoTrack_IDirectMusicTrack_Release (LPDIRECTMUSICTRACK8 iface) {
|
||||
ICOM_THIS_MULTI(IDirectMusicTempoTrack, TrackVtbl, iface);
|
||||
return IDirectMusicTempoTrack_IUnknown_Release ((LPUNKNOWN)&This->UnknownVtbl);
|
||||
ICOM_THIS_MULTI(IDirectMusicTempoTrack, TrackVtbl, iface);
|
||||
return IDirectMusicTempoTrack_IUnknown_Release ((LPUNKNOWN)&This->UnknownVtbl);
|
||||
}
|
||||
|
||||
HRESULT WINAPI IDirectMusicTempoTrack_IDirectMusicTrack_Init (LPDIRECTMUSICTRACK8 iface, IDirectMusicSegment* pSegment)
|
||||
{
|
||||
ICOM_THIS_MULTI(IDirectMusicTempoTrack, TrackVtbl, iface);
|
||||
FIXME("(%p, %p): stub\n", This, pSegment);
|
||||
return S_OK;
|
||||
ICOM_THIS_MULTI(IDirectMusicTempoTrack, TrackVtbl, iface);
|
||||
TRACE("(%p, %p): nothing to do here\n", This, pSegment);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT WINAPI IDirectMusicTempoTrack_IDirectMusicTrack_InitPlay (LPDIRECTMUSICTRACK8 iface, IDirectMusicSegmentState* pSegmentState, IDirectMusicPerformance* pPerformance, void** ppStateData, DWORD dwVirtualTrack8ID, DWORD dwFlags)
|
||||
{
|
||||
ICOM_THIS_MULTI(IDirectMusicTempoTrack, TrackVtbl, iface);
|
||||
FIXME("(%p, %p, %p, %p, %ld, %ld): stub\n", This, pSegmentState, pPerformance, ppStateData, dwVirtualTrack8ID, dwFlags);
|
||||
return S_OK;
|
||||
ICOM_THIS_MULTI(IDirectMusicTempoTrack, TrackVtbl, iface);
|
||||
FIXME("(%p, %p, %p, %p, %ld, %ld): stub\n", This, pSegmentState, pPerformance, ppStateData, dwVirtualTrack8ID, dwFlags);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT WINAPI IDirectMusicTempoTrack_IDirectMusicTrack_EndPlay (LPDIRECTMUSICTRACK8 iface, void* pStateData)
|
||||
{
|
||||
ICOM_THIS_MULTI(IDirectMusicTempoTrack, TrackVtbl, iface);
|
||||
FIXME("(%p, %p): stub\n", This, pStateData);
|
||||
return S_OK;
|
||||
ICOM_THIS_MULTI(IDirectMusicTempoTrack, TrackVtbl, iface);
|
||||
FIXME("(%p, %p): stub\n", This, pStateData);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT WINAPI IDirectMusicTempoTrack_IDirectMusicTrack_Play (LPDIRECTMUSICTRACK8 iface, void* pStateData, MUSIC_TIME mtStart, MUSIC_TIME mtEnd, MUSIC_TIME mtOffset, DWORD dwFlags, IDirectMusicPerformance* pPerf, IDirectMusicSegmentState* pSegSt, DWORD dwVirtualID)
|
||||
{
|
||||
ICOM_THIS_MULTI(IDirectMusicTempoTrack, TrackVtbl, iface);
|
||||
FIXME("(%p, %p, %ld, %ld, %ld, %ld, %p, %p, %ld): stub\n", This, pStateData, mtStart, mtEnd, mtOffset, dwFlags, pPerf, pSegSt, dwVirtualID);
|
||||
return S_OK;
|
||||
ICOM_THIS_MULTI(IDirectMusicTempoTrack, TrackVtbl, iface);
|
||||
FIXME("(%p, %p, %ld, %ld, %ld, %ld, %p, %p, %ld): stub\n", This, pStateData, mtStart, mtEnd, mtOffset, dwFlags, pPerf, pSegSt, dwVirtualID);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT WINAPI IDirectMusicTempoTrack_IDirectMusicTrack_GetParam (LPDIRECTMUSICTRACK8 iface, REFGUID rguidType, MUSIC_TIME mtTime, MUSIC_TIME* pmtNext, void* pParam) {
|
||||
ICOM_THIS_MULTI(IDirectMusicTempoTrack, TrackVtbl, iface);
|
||||
FIXME("(%p, %s, %ld, %p, %p): stub\n", This, debugstr_dmguid(rguidType), mtTime, pmtNext, pParam);
|
||||
return S_OK;
|
||||
ICOM_THIS_MULTI(IDirectMusicTempoTrack, TrackVtbl, iface);
|
||||
|
||||
HRESULT hr = S_OK;
|
||||
struct list* pEntry = NULL;
|
||||
LPDMUS_PRIVATE_TEMPO_ITEM pIt = NULL;
|
||||
DMUS_TEMPO_PARAM* prm = pParam;
|
||||
|
||||
FIXME("(%p, %s, %ld, %p, %p): almost stub\n", This, debugstr_dmguid(rguidType), mtTime, pmtNext, pParam);
|
||||
|
||||
if (NULL == pParam) {
|
||||
return E_POINTER;
|
||||
}
|
||||
|
||||
hr = IDirectMusicTempoTrack_IDirectMusicTrack_IsParamSupported (iface, rguidType);
|
||||
if (FAILED(hr)) {
|
||||
return hr;
|
||||
}
|
||||
if (FALSE == This->enabled) {
|
||||
return DMUS_E_TYPE_DISABLED;
|
||||
}
|
||||
|
||||
if (NULL != pmtNext) *pmtNext = 0;
|
||||
prm->mtTime = 0;
|
||||
prm->dblTempo = 0.123456;
|
||||
|
||||
LIST_FOR_EACH (pEntry, &This->Items) {
|
||||
pIt = LIST_ENTRY(pEntry, DMUS_PRIVATE_TEMPO_ITEM, entry);
|
||||
/*TRACE(" - %p -> 0x%lx,%p\n", pIt, pIt->item.lTime, pIt->item.dblTempo);*/
|
||||
if (pIt->item.lTime <= mtTime) {
|
||||
MUSIC_TIME ofs = pIt->item.lTime - mtTime;
|
||||
if (ofs > prm->mtTime) {
|
||||
prm->mtTime = ofs;
|
||||
prm->dblTempo = pIt->item.dblTempo;
|
||||
}
|
||||
if (NULL != pmtNext && pIt->item.lTime > mtTime) {
|
||||
if (pIt->item.lTime < *pmtNext) {
|
||||
*pmtNext = pIt->item.lTime;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (0.123456 == prm->dblTempo) {
|
||||
return DMUS_E_NOT_FOUND;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT WINAPI IDirectMusicTempoTrack_IDirectMusicTrack_SetParam (LPDIRECTMUSICTRACK8 iface, REFGUID rguidType, MUSIC_TIME mtTime, void* pParam) {
|
||||
|
@ -129,87 +172,90 @@ HRESULT WINAPI IDirectMusicTempoTrack_IDirectMusicTrack_SetParam (LPDIRECTMUSICT
|
|||
}
|
||||
|
||||
HRESULT WINAPI IDirectMusicTempoTrack_IDirectMusicTrack_IsParamSupported (LPDIRECTMUSICTRACK8 iface, REFGUID rguidType) {
|
||||
ICOM_THIS_MULTI(IDirectMusicTempoTrack, TrackVtbl, iface);
|
||||
ICOM_THIS_MULTI(IDirectMusicTempoTrack, TrackVtbl, iface);
|
||||
|
||||
TRACE("(%p, %s): ", This, debugstr_dmguid(rguidType));
|
||||
if (IsEqualGUID (rguidType, &GUID_DisableTempo)
|
||||
|| IsEqualGUID (rguidType, &GUID_EnableTempo)
|
||||
|| IsEqualGUID (rguidType, &GUID_TempoParam)) {
|
||||
TRACE("param supported\n");
|
||||
return S_OK;
|
||||
}
|
||||
TRACE("param unsupported\n");
|
||||
return DMUS_E_TYPE_UNSUPPORTED;
|
||||
TRACE("(%p, %s): ", This, debugstr_dmguid(rguidType));
|
||||
if (IsEqualGUID (rguidType, &GUID_DisableTempo)
|
||||
|| IsEqualGUID (rguidType, &GUID_EnableTempo)
|
||||
|| IsEqualGUID (rguidType, &GUID_TempoParam)) {
|
||||
TRACE("param supported\n");
|
||||
return S_OK;
|
||||
}
|
||||
if (FALSE == This->enabled) {
|
||||
return DMUS_E_TYPE_DISABLED;
|
||||
}
|
||||
TRACE("param unsupported\n");
|
||||
return DMUS_E_TYPE_UNSUPPORTED;
|
||||
}
|
||||
|
||||
HRESULT WINAPI IDirectMusicTempoTrack_IDirectMusicTrack_AddNotificationType (LPDIRECTMUSICTRACK8 iface, REFGUID rguidNotificationType) {
|
||||
ICOM_THIS_MULTI(IDirectMusicTempoTrack, TrackVtbl, iface);
|
||||
FIXME("(%p, %s): stub\n", This, debugstr_dmguid(rguidNotificationType));
|
||||
return S_OK;
|
||||
ICOM_THIS_MULTI(IDirectMusicTempoTrack, TrackVtbl, iface);
|
||||
FIXME("(%p, %s): stub\n", This, debugstr_dmguid(rguidNotificationType));
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT WINAPI IDirectMusicTempoTrack_IDirectMusicTrack_RemoveNotificationType (LPDIRECTMUSICTRACK8 iface, REFGUID rguidNotificationType) {
|
||||
ICOM_THIS_MULTI(IDirectMusicTempoTrack, TrackVtbl, iface);
|
||||
FIXME("(%p, %s): stub\n", This, debugstr_dmguid(rguidNotificationType));
|
||||
return S_OK;
|
||||
ICOM_THIS_MULTI(IDirectMusicTempoTrack, TrackVtbl, iface);
|
||||
FIXME("(%p, %s): stub\n", This, debugstr_dmguid(rguidNotificationType));
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT WINAPI IDirectMusicTempoTrack_IDirectMusicTrack_Clone (LPDIRECTMUSICTRACK8 iface, MUSIC_TIME mtStart, MUSIC_TIME mtEnd, IDirectMusicTrack** ppTrack) {
|
||||
ICOM_THIS_MULTI(IDirectMusicTempoTrack, TrackVtbl, iface);
|
||||
FIXME("(%p, %ld, %ld, %p): stub\n", This, mtStart, mtEnd, ppTrack);
|
||||
return S_OK;
|
||||
ICOM_THIS_MULTI(IDirectMusicTempoTrack, TrackVtbl, iface);
|
||||
FIXME("(%p, %ld, %ld, %p): stub\n", This, mtStart, mtEnd, ppTrack);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT WINAPI IDirectMusicTempoTrack_IDirectMusicTrack_PlayEx (LPDIRECTMUSICTRACK8 iface, void* pStateData, REFERENCE_TIME rtStart, REFERENCE_TIME rtEnd, REFERENCE_TIME rtOffset, DWORD dwFlags, IDirectMusicPerformance* pPerf, IDirectMusicSegmentState* pSegSt, DWORD dwVirtualID) {
|
||||
ICOM_THIS_MULTI(IDirectMusicTempoTrack, TrackVtbl, iface);
|
||||
FIXME("(%p, %p, %lli, %lli, %lli, %ld, %p, %p, %ld): stub\n", This, pStateData, rtStart, rtEnd, rtOffset, dwFlags, pPerf, pSegSt, dwVirtualID);
|
||||
return S_OK;
|
||||
ICOM_THIS_MULTI(IDirectMusicTempoTrack, TrackVtbl, iface);
|
||||
FIXME("(%p, %p, %lli, %lli, %lli, %ld, %p, %p, %ld): stub\n", This, pStateData, rtStart, rtEnd, rtOffset, dwFlags, pPerf, pSegSt, dwVirtualID);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT WINAPI IDirectMusicTempoTrack_IDirectMusicTrack_GetParamEx (LPDIRECTMUSICTRACK8 iface, REFGUID rguidType, REFERENCE_TIME rtTime, REFERENCE_TIME* prtNext, void* pParam, void* pStateData, DWORD dwFlags) {
|
||||
ICOM_THIS_MULTI(IDirectMusicTempoTrack, TrackVtbl, iface);
|
||||
FIXME("(%p, %s, %lli, %p, %p, %p, %ld): stub\n", This, debugstr_dmguid(rguidType), rtTime, prtNext, pParam, pStateData, dwFlags);
|
||||
return S_OK;
|
||||
ICOM_THIS_MULTI(IDirectMusicTempoTrack, TrackVtbl, iface);
|
||||
FIXME("(%p, %s, %lli, %p, %p, %p, %ld): stub\n", This, debugstr_dmguid(rguidType), rtTime, prtNext, pParam, pStateData, dwFlags);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT WINAPI IDirectMusicTempoTrack_IDirectMusicTrack_SetParamEx (LPDIRECTMUSICTRACK8 iface, REFGUID rguidType, REFERENCE_TIME rtTime, void* pParam, void* pStateData, DWORD dwFlags) {
|
||||
ICOM_THIS_MULTI(IDirectMusicTempoTrack, TrackVtbl, iface);
|
||||
FIXME("(%p, %s, %lli, %p, %p, %ld): stub\n", This, debugstr_dmguid(rguidType), rtTime, pParam, pStateData, dwFlags);
|
||||
return S_OK;
|
||||
ICOM_THIS_MULTI(IDirectMusicTempoTrack, TrackVtbl, iface);
|
||||
FIXME("(%p, %s, %lli, %p, %p, %ld): stub\n", This, debugstr_dmguid(rguidType), rtTime, pParam, pStateData, dwFlags);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT WINAPI IDirectMusicTempoTrack_IDirectMusicTrack_Compose (LPDIRECTMUSICTRACK8 iface, IUnknown* pContext, DWORD dwTrackGroup, IDirectMusicTrack** ppResultTrack) {
|
||||
ICOM_THIS_MULTI(IDirectMusicTempoTrack, TrackVtbl, iface);
|
||||
FIXME("(%p, %p, %ld, %p): stub\n", This, pContext, dwTrackGroup, ppResultTrack);
|
||||
return S_OK;
|
||||
ICOM_THIS_MULTI(IDirectMusicTempoTrack, TrackVtbl, iface);
|
||||
FIXME("(%p, %p, %ld, %p): stub\n", This, pContext, dwTrackGroup, ppResultTrack);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT WINAPI IDirectMusicTempoTrack_IDirectMusicTrack_Join (LPDIRECTMUSICTRACK8 iface, IDirectMusicTrack* pNewTrack, MUSIC_TIME mtJoin, IUnknown* pContext, DWORD dwTrackGroup, IDirectMusicTrack** ppResultTrack) {
|
||||
ICOM_THIS_MULTI(IDirectMusicTempoTrack, TrackVtbl, iface);
|
||||
FIXME("(%p, %p, %ld, %p, %ld, %p): stub\n", This, pNewTrack, mtJoin, pContext, dwTrackGroup, ppResultTrack);
|
||||
return S_OK;
|
||||
ICOM_THIS_MULTI(IDirectMusicTempoTrack, TrackVtbl, iface);
|
||||
FIXME("(%p, %p, %ld, %p, %ld, %p): stub\n", This, pNewTrack, mtJoin, pContext, dwTrackGroup, ppResultTrack);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
ICOM_VTABLE(IDirectMusicTrack8) DirectMusicTempoTrack_Track_Vtbl = {
|
||||
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
||||
IDirectMusicTempoTrack_IDirectMusicTrack_QueryInterface,
|
||||
IDirectMusicTempoTrack_IDirectMusicTrack_AddRef,
|
||||
IDirectMusicTempoTrack_IDirectMusicTrack_Release,
|
||||
IDirectMusicTempoTrack_IDirectMusicTrack_Init,
|
||||
IDirectMusicTempoTrack_IDirectMusicTrack_InitPlay,
|
||||
IDirectMusicTempoTrack_IDirectMusicTrack_EndPlay,
|
||||
IDirectMusicTempoTrack_IDirectMusicTrack_Play,
|
||||
IDirectMusicTempoTrack_IDirectMusicTrack_GetParam,
|
||||
IDirectMusicTempoTrack_IDirectMusicTrack_SetParam,
|
||||
IDirectMusicTempoTrack_IDirectMusicTrack_IsParamSupported,
|
||||
IDirectMusicTempoTrack_IDirectMusicTrack_AddNotificationType,
|
||||
IDirectMusicTempoTrack_IDirectMusicTrack_RemoveNotificationType,
|
||||
IDirectMusicTempoTrack_IDirectMusicTrack_Clone,
|
||||
IDirectMusicTempoTrack_IDirectMusicTrack_PlayEx,
|
||||
IDirectMusicTempoTrack_IDirectMusicTrack_GetParamEx,
|
||||
IDirectMusicTempoTrack_IDirectMusicTrack_SetParamEx,
|
||||
IDirectMusicTempoTrack_IDirectMusicTrack_Compose,
|
||||
IDirectMusicTempoTrack_IDirectMusicTrack_Join
|
||||
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
||||
IDirectMusicTempoTrack_IDirectMusicTrack_QueryInterface,
|
||||
IDirectMusicTempoTrack_IDirectMusicTrack_AddRef,
|
||||
IDirectMusicTempoTrack_IDirectMusicTrack_Release,
|
||||
IDirectMusicTempoTrack_IDirectMusicTrack_Init,
|
||||
IDirectMusicTempoTrack_IDirectMusicTrack_InitPlay,
|
||||
IDirectMusicTempoTrack_IDirectMusicTrack_EndPlay,
|
||||
IDirectMusicTempoTrack_IDirectMusicTrack_Play,
|
||||
IDirectMusicTempoTrack_IDirectMusicTrack_GetParam,
|
||||
IDirectMusicTempoTrack_IDirectMusicTrack_SetParam,
|
||||
IDirectMusicTempoTrack_IDirectMusicTrack_IsParamSupported,
|
||||
IDirectMusicTempoTrack_IDirectMusicTrack_AddNotificationType,
|
||||
IDirectMusicTempoTrack_IDirectMusicTrack_RemoveNotificationType,
|
||||
IDirectMusicTempoTrack_IDirectMusicTrack_Clone,
|
||||
IDirectMusicTempoTrack_IDirectMusicTrack_PlayEx,
|
||||
IDirectMusicTempoTrack_IDirectMusicTrack_GetParamEx,
|
||||
IDirectMusicTempoTrack_IDirectMusicTrack_SetParamEx,
|
||||
IDirectMusicTempoTrack_IDirectMusicTrack_Compose,
|
||||
IDirectMusicTempoTrack_IDirectMusicTrack_Join
|
||||
};
|
||||
|
||||
/* IDirectMusicTempoTrack IPersistStream part: */
|
||||
|
@ -230,7 +276,8 @@ ULONG WINAPI IDirectMusicTempoTrack_IPersistStream_Release (LPPERSISTSTREAM ifac
|
|||
|
||||
HRESULT WINAPI IDirectMusicTempoTrack_IPersistStream_GetClassID (LPPERSISTSTREAM iface, CLSID* pClassID) {
|
||||
ICOM_THIS_MULTI(IDirectMusicSegment8Impl, PersistStreamVtbl, iface);
|
||||
FIXME("(%p, %p): stub\n", This, pClassID);
|
||||
TRACE("(%p, %p)\n", This, pClassID);
|
||||
memcpy(pClassID, &CLSID_DirectMusicTempoTrack, sizeof(CLSID));
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
@ -246,6 +293,7 @@ HRESULT WINAPI IDirectMusicTempoTrack_IPersistStream_Load (LPPERSISTSTREAM iface
|
|||
DWORD StreamSize, StreamCount;
|
||||
LARGE_INTEGER liMove;
|
||||
DMUS_IO_TEMPO_ITEM item;
|
||||
LPDMUS_PRIVATE_TEMPO_ITEM pNewItem = NULL;
|
||||
DWORD nItem = 0;
|
||||
FIXME("(%p, %p): Loading not fully implemented yet\n", This, pStm);
|
||||
|
||||
|
@ -266,6 +314,14 @@ HRESULT WINAPI IDirectMusicTempoTrack_IPersistStream_Load (LPPERSISTSTREAM iface
|
|||
TRACE_(dmfile)("DMUS_IO_TEMPO_ITEM #%ld\n", nItem);
|
||||
TRACE_(dmfile)(" - lTime = %lu\n", item.lTime);
|
||||
TRACE_(dmfile)(" - dblTempo = %g\n", item.dblTempo);
|
||||
pNewItem = HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, sizeof(DMUS_PRIVATE_TEMPO_ITEM));
|
||||
if (NULL == pNewItem) {
|
||||
ERR(": no more memory\n");
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
memcpy(&pNewItem->item, &item, sizeof(DMUS_IO_TEMPO_ITEM));
|
||||
list_add_tail (&This->Items, &pNewItem->entry);
|
||||
pNewItem = NULL;
|
||||
StreamCount += sizeof(item);
|
||||
TRACE_(dmfile)(": StreamCount[0] = %ld < StreamSize[0] = %ld\n", StreamCount, StreamSize);
|
||||
} while (StreamCount < StreamSize);
|
||||
|
@ -288,42 +344,48 @@ HRESULT WINAPI IDirectMusicTempoTrack_IPersistStream_Load (LPPERSISTSTREAM iface
|
|||
}
|
||||
|
||||
HRESULT WINAPI IDirectMusicTempoTrack_IPersistStream_Save (LPPERSISTSTREAM iface, IStream* pStm, BOOL fClearDirty) {
|
||||
return E_NOTIMPL;
|
||||
ICOM_THIS_MULTI(IDirectMusicTempoTrack, PersistStreamVtbl, iface);
|
||||
FIXME("(%p): Saving not implemented yet\n", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT WINAPI IDirectMusicTempoTrack_IPersistStream_GetSizeMax (LPPERSISTSTREAM iface, ULARGE_INTEGER* pcbSize) {
|
||||
return E_NOTIMPL;
|
||||
ICOM_THIS_MULTI(IDirectMusicTempoTrack, PersistStreamVtbl, iface);
|
||||
FIXME("(%p, %p): stub\n", This, pcbSize);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
ICOM_VTABLE(IPersistStream) DirectMusicTempoTrack_PersistStream_Vtbl = {
|
||||
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
||||
IDirectMusicTempoTrack_IPersistStream_QueryInterface,
|
||||
IDirectMusicTempoTrack_IPersistStream_AddRef,
|
||||
IDirectMusicTempoTrack_IPersistStream_Release,
|
||||
IDirectMusicTempoTrack_IPersistStream_GetClassID,
|
||||
IDirectMusicTempoTrack_IPersistStream_IsDirty,
|
||||
IDirectMusicTempoTrack_IPersistStream_Load,
|
||||
IDirectMusicTempoTrack_IPersistStream_Save,
|
||||
IDirectMusicTempoTrack_IPersistStream_GetSizeMax
|
||||
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
||||
IDirectMusicTempoTrack_IPersistStream_QueryInterface,
|
||||
IDirectMusicTempoTrack_IPersistStream_AddRef,
|
||||
IDirectMusicTempoTrack_IPersistStream_Release,
|
||||
IDirectMusicTempoTrack_IPersistStream_GetClassID,
|
||||
IDirectMusicTempoTrack_IPersistStream_IsDirty,
|
||||
IDirectMusicTempoTrack_IPersistStream_Load,
|
||||
IDirectMusicTempoTrack_IPersistStream_Save,
|
||||
IDirectMusicTempoTrack_IPersistStream_GetSizeMax
|
||||
};
|
||||
|
||||
/* for ClassFactory */
|
||||
HRESULT WINAPI DMUSIC_CreateDirectMusicTempoTrack (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter) {
|
||||
IDirectMusicTempoTrack* track;
|
||||
IDirectMusicTempoTrack* track;
|
||||
|
||||
track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicTempoTrack));
|
||||
if (NULL == track) {
|
||||
*ppobj = (LPVOID) NULL;
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
track->UnknownVtbl = &DirectMusicTempoTrack_Unknown_Vtbl;
|
||||
track->TrackVtbl = &DirectMusicTempoTrack_Track_Vtbl;
|
||||
track->PersistStreamVtbl = &DirectMusicTempoTrack_PersistStream_Vtbl;
|
||||
track->pDesc = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(DMUS_OBJECTDESC));
|
||||
DM_STRUCT_INIT(track->pDesc);
|
||||
track->pDesc->dwValidData |= DMUS_OBJ_CLASS;
|
||||
memcpy (&track->pDesc->guidClass, &CLSID_DirectMusicTempoTrack, sizeof (CLSID));
|
||||
track->ref = 0; /* will be inited by QueryInterface */
|
||||
track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicTempoTrack));
|
||||
if (NULL == track) {
|
||||
*ppobj = (LPVOID) NULL;
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
track->UnknownVtbl = &DirectMusicTempoTrack_Unknown_Vtbl;
|
||||
track->TrackVtbl = &DirectMusicTempoTrack_Track_Vtbl;
|
||||
track->PersistStreamVtbl = &DirectMusicTempoTrack_PersistStream_Vtbl;
|
||||
track->pDesc = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(DMUS_OBJECTDESC));
|
||||
DM_STRUCT_INIT(track->pDesc);
|
||||
track->pDesc->dwValidData |= DMUS_OBJ_CLASS;
|
||||
memcpy (&track->pDesc->guidClass, &CLSID_DirectMusicTempoTrack, sizeof (CLSID));
|
||||
track->ref = 0; /* will be inited by QueryInterface */
|
||||
track->enabled = TRUE;
|
||||
list_init (&track->Items);
|
||||
|
||||
return IDirectMusicTempoTrack_IUnknown_QueryInterface ((LPUNKNOWN)&track->UnknownVtbl, lpcGUID, ppobj);
|
||||
return IDirectMusicTempoTrack_IUnknown_QueryInterface ((LPUNKNOWN)&track->UnknownVtbl, lpcGUID, ppobj);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue