dmime: COM cleanup for IDirectMusicTrack of DMTimeSigTrack.
This commit is contained in:
parent
5bf9d04581
commit
dd1dc8cc81
|
@ -26,7 +26,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(dmime);
|
||||||
*/
|
*/
|
||||||
typedef struct IDirectMusicTimeSigTrack {
|
typedef struct IDirectMusicTimeSigTrack {
|
||||||
const IUnknownVtbl *UnknownVtbl;
|
const IUnknownVtbl *UnknownVtbl;
|
||||||
const IDirectMusicTrackVtbl *TrackVtbl;
|
IDirectMusicTrack IDirectMusicTrack_iface;
|
||||||
const IPersistStreamVtbl *PersistStreamVtbl;
|
const IPersistStreamVtbl *PersistStreamVtbl;
|
||||||
LONG ref;
|
LONG ref;
|
||||||
DMUS_OBJECTDESC *pDesc;
|
DMUS_OBJECTDESC *pDesc;
|
||||||
|
@ -42,7 +42,7 @@ static HRESULT WINAPI IDirectMusicTimeSigTrack_IUnknown_QueryInterface (LPUNKNOW
|
||||||
IUnknown_AddRef (iface);
|
IUnknown_AddRef (iface);
|
||||||
return S_OK;
|
return S_OK;
|
||||||
} else if (IsEqualIID (riid, &IID_IDirectMusicTrack)) {
|
} else if (IsEqualIID (riid, &IID_IDirectMusicTrack)) {
|
||||||
*ppobj = &This->TrackVtbl;
|
*ppobj = &This->IDirectMusicTrack_iface;
|
||||||
IUnknown_AddRef (iface);
|
IUnknown_AddRef (iface);
|
||||||
return S_OK;
|
return S_OK;
|
||||||
} else if (IsEqualIID (riid, &IID_IPersistStream)) {
|
} else if (IsEqualIID (riid, &IID_IPersistStream)) {
|
||||||
|
@ -87,29 +87,34 @@ static const IUnknownVtbl DirectMusicTimeSigTrack_Unknown_Vtbl = {
|
||||||
};
|
};
|
||||||
|
|
||||||
/* IDirectMusicTimeSigTrack IDirectMusicTrack8 part: */
|
/* IDirectMusicTimeSigTrack IDirectMusicTrack8 part: */
|
||||||
|
static inline IDirectMusicTimeSigTrack *impl_from_IDirectMusicTrack(IDirectMusicTrack *iface)
|
||||||
|
{
|
||||||
|
return CONTAINING_RECORD(iface, IDirectMusicTimeSigTrack, IDirectMusicTrack_iface);
|
||||||
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI IDirectMusicTrackImpl_QueryInterface(IDirectMusicTrack *iface, REFIID riid,
|
static HRESULT WINAPI IDirectMusicTrackImpl_QueryInterface(IDirectMusicTrack *iface, REFIID riid,
|
||||||
void **ppobj)
|
void **ppobj)
|
||||||
{
|
{
|
||||||
ICOM_THIS_MULTI(IDirectMusicTimeSigTrack, TrackVtbl, iface);
|
IDirectMusicTimeSigTrack *This = impl_from_IDirectMusicTrack(iface);
|
||||||
return IUnknown_QueryInterface ((LPUNKNOWN)&This->UnknownVtbl, riid, ppobj);
|
return IUnknown_QueryInterface ((LPUNKNOWN)&This->UnknownVtbl, riid, ppobj);
|
||||||
}
|
}
|
||||||
|
|
||||||
static ULONG WINAPI IDirectMusicTrackImpl_AddRef(IDirectMusicTrack *iface)
|
static ULONG WINAPI IDirectMusicTrackImpl_AddRef(IDirectMusicTrack *iface)
|
||||||
{
|
{
|
||||||
ICOM_THIS_MULTI(IDirectMusicTimeSigTrack, TrackVtbl, iface);
|
IDirectMusicTimeSigTrack *This = impl_from_IDirectMusicTrack(iface);
|
||||||
return IUnknown_AddRef ((LPUNKNOWN)&This->UnknownVtbl);
|
return IUnknown_AddRef ((LPUNKNOWN)&This->UnknownVtbl);
|
||||||
}
|
}
|
||||||
|
|
||||||
static ULONG WINAPI IDirectMusicTrackImpl_Release(IDirectMusicTrack *iface)
|
static ULONG WINAPI IDirectMusicTrackImpl_Release(IDirectMusicTrack *iface)
|
||||||
{
|
{
|
||||||
ICOM_THIS_MULTI(IDirectMusicTimeSigTrack, TrackVtbl, iface);
|
IDirectMusicTimeSigTrack *This = impl_from_IDirectMusicTrack(iface);
|
||||||
return IUnknown_Release ((LPUNKNOWN)&This->UnknownVtbl);
|
return IUnknown_Release ((LPUNKNOWN)&This->UnknownVtbl);
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI IDirectMusicTrackImpl_Init(IDirectMusicTrack *iface,
|
static HRESULT WINAPI IDirectMusicTrackImpl_Init(IDirectMusicTrack *iface,
|
||||||
IDirectMusicSegment *pSegment)
|
IDirectMusicSegment *pSegment)
|
||||||
{
|
{
|
||||||
ICOM_THIS_MULTI(IDirectMusicTimeSigTrack, TrackVtbl, iface);
|
IDirectMusicTimeSigTrack *This = impl_from_IDirectMusicTrack(iface);
|
||||||
FIXME("(%p, %p): stub\n", This, pSegment);
|
FIXME("(%p, %p): stub\n", This, pSegment);
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
@ -118,14 +123,14 @@ static HRESULT WINAPI IDirectMusicTrackImpl_InitPlay(IDirectMusicTrack *iface,
|
||||||
IDirectMusicSegmentState *pSegmentState, IDirectMusicPerformance *pPerformance,
|
IDirectMusicSegmentState *pSegmentState, IDirectMusicPerformance *pPerformance,
|
||||||
void **ppStateData, DWORD dwVirtualTrack8ID, DWORD dwFlags)
|
void **ppStateData, DWORD dwVirtualTrack8ID, DWORD dwFlags)
|
||||||
{
|
{
|
||||||
ICOM_THIS_MULTI(IDirectMusicTimeSigTrack, TrackVtbl, iface);
|
IDirectMusicTimeSigTrack *This = impl_from_IDirectMusicTrack(iface);
|
||||||
FIXME("(%p, %p, %p, %p, %d, %d): stub\n", This, pSegmentState, pPerformance, ppStateData, dwVirtualTrack8ID, dwFlags);
|
FIXME("(%p, %p, %p, %p, %d, %d): stub\n", This, pSegmentState, pPerformance, ppStateData, dwVirtualTrack8ID, dwFlags);
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI IDirectMusicTrackImpl_EndPlay(IDirectMusicTrack *iface, void *pStateData)
|
static HRESULT WINAPI IDirectMusicTrackImpl_EndPlay(IDirectMusicTrack *iface, void *pStateData)
|
||||||
{
|
{
|
||||||
ICOM_THIS_MULTI(IDirectMusicTimeSigTrack, TrackVtbl, iface);
|
IDirectMusicTimeSigTrack *This = impl_from_IDirectMusicTrack(iface);
|
||||||
FIXME("(%p, %p): stub\n", This, pStateData);
|
FIXME("(%p, %p): stub\n", This, pStateData);
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
@ -134,7 +139,7 @@ static HRESULT WINAPI IDirectMusicTrackImpl_Play(IDirectMusicTrack *iface, void
|
||||||
MUSIC_TIME mtStart, MUSIC_TIME mtEnd, MUSIC_TIME mtOffset, DWORD dwFlags,
|
MUSIC_TIME mtStart, MUSIC_TIME mtEnd, MUSIC_TIME mtOffset, DWORD dwFlags,
|
||||||
IDirectMusicPerformance *pPerf, IDirectMusicSegmentState *pSegSt, DWORD dwVirtualID)
|
IDirectMusicPerformance *pPerf, IDirectMusicSegmentState *pSegSt, DWORD dwVirtualID)
|
||||||
{
|
{
|
||||||
ICOM_THIS_MULTI(IDirectMusicTimeSigTrack, TrackVtbl, iface);
|
IDirectMusicTimeSigTrack *This = impl_from_IDirectMusicTrack(iface);
|
||||||
FIXME("(%p, %p, %d, %d, %d, %d, %p, %p, %d): stub\n", This, pStateData, mtStart, mtEnd, mtOffset, dwFlags, pPerf, pSegSt, dwVirtualID);
|
FIXME("(%p, %p, %d, %d, %d, %d, %p, %p, %d): stub\n", This, pStateData, mtStart, mtEnd, mtOffset, dwFlags, pPerf, pSegSt, dwVirtualID);
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
@ -142,7 +147,7 @@ static HRESULT WINAPI IDirectMusicTrackImpl_Play(IDirectMusicTrack *iface, void
|
||||||
static HRESULT WINAPI IDirectMusicTrackImpl_GetParam(IDirectMusicTrack *iface, REFGUID rguidType,
|
static HRESULT WINAPI IDirectMusicTrackImpl_GetParam(IDirectMusicTrack *iface, REFGUID rguidType,
|
||||||
MUSIC_TIME mtTime, MUSIC_TIME *pmtNext, void *pParam)
|
MUSIC_TIME mtTime, MUSIC_TIME *pmtNext, void *pParam)
|
||||||
{
|
{
|
||||||
ICOM_THIS_MULTI(IDirectMusicTimeSigTrack, TrackVtbl, iface);
|
IDirectMusicTimeSigTrack *This = impl_from_IDirectMusicTrack(iface);
|
||||||
FIXME("(%p, %s, %d, %p, %p): stub\n", This, debugstr_dmguid(rguidType), mtTime, pmtNext, pParam);
|
FIXME("(%p, %s, %d, %p, %p): stub\n", This, debugstr_dmguid(rguidType), mtTime, pmtNext, pParam);
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
@ -150,7 +155,7 @@ static HRESULT WINAPI IDirectMusicTrackImpl_GetParam(IDirectMusicTrack *iface, R
|
||||||
static HRESULT WINAPI IDirectMusicTrackImpl_SetParam(IDirectMusicTrack *iface, REFGUID rguidType,
|
static HRESULT WINAPI IDirectMusicTrackImpl_SetParam(IDirectMusicTrack *iface, REFGUID rguidType,
|
||||||
MUSIC_TIME mtTime, void *pParam)
|
MUSIC_TIME mtTime, void *pParam)
|
||||||
{
|
{
|
||||||
ICOM_THIS_MULTI(IDirectMusicTimeSigTrack, TrackVtbl, iface);
|
IDirectMusicTimeSigTrack *This = impl_from_IDirectMusicTrack(iface);
|
||||||
FIXME("(%p, %s, %d, %p): stub\n", This, debugstr_dmguid(rguidType), mtTime, pParam);
|
FIXME("(%p, %s, %d, %p): stub\n", This, debugstr_dmguid(rguidType), mtTime, pParam);
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
@ -158,7 +163,7 @@ static HRESULT WINAPI IDirectMusicTrackImpl_SetParam(IDirectMusicTrack *iface, R
|
||||||
static HRESULT WINAPI IDirectMusicTrackImpl_IsParamSupported(IDirectMusicTrack *iface,
|
static HRESULT WINAPI IDirectMusicTrackImpl_IsParamSupported(IDirectMusicTrack *iface,
|
||||||
REFGUID rguidType)
|
REFGUID rguidType)
|
||||||
{
|
{
|
||||||
ICOM_THIS_MULTI(IDirectMusicTimeSigTrack, TrackVtbl, iface);
|
IDirectMusicTimeSigTrack *This = impl_from_IDirectMusicTrack(iface);
|
||||||
|
|
||||||
TRACE("(%p, %s)\n", This, debugstr_dmguid(rguidType));
|
TRACE("(%p, %s)\n", This, debugstr_dmguid(rguidType));
|
||||||
if (IsEqualGUID (rguidType, &GUID_DisableTimeSig)
|
if (IsEqualGUID (rguidType, &GUID_DisableTimeSig)
|
||||||
|
@ -174,7 +179,7 @@ static HRESULT WINAPI IDirectMusicTrackImpl_IsParamSupported(IDirectMusicTrack *
|
||||||
static HRESULT WINAPI IDirectMusicTrackImpl_AddNotificationType(IDirectMusicTrack *iface,
|
static HRESULT WINAPI IDirectMusicTrackImpl_AddNotificationType(IDirectMusicTrack *iface,
|
||||||
REFGUID rguidNotificationType)
|
REFGUID rguidNotificationType)
|
||||||
{
|
{
|
||||||
ICOM_THIS_MULTI(IDirectMusicTimeSigTrack, TrackVtbl, iface);
|
IDirectMusicTimeSigTrack *This = impl_from_IDirectMusicTrack(iface);
|
||||||
FIXME("(%p, %s): stub\n", This, debugstr_dmguid(rguidNotificationType));
|
FIXME("(%p, %s): stub\n", This, debugstr_dmguid(rguidNotificationType));
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
@ -182,7 +187,7 @@ static HRESULT WINAPI IDirectMusicTrackImpl_AddNotificationType(IDirectMusicTrac
|
||||||
static HRESULT WINAPI IDirectMusicTrackImpl_RemoveNotificationType(IDirectMusicTrack *iface,
|
static HRESULT WINAPI IDirectMusicTrackImpl_RemoveNotificationType(IDirectMusicTrack *iface,
|
||||||
REFGUID rguidNotificationType)
|
REFGUID rguidNotificationType)
|
||||||
{
|
{
|
||||||
ICOM_THIS_MULTI(IDirectMusicTimeSigTrack, TrackVtbl, iface);
|
IDirectMusicTimeSigTrack *This = impl_from_IDirectMusicTrack(iface);
|
||||||
FIXME("(%p, %s): stub\n", This, debugstr_dmguid(rguidNotificationType));
|
FIXME("(%p, %s): stub\n", This, debugstr_dmguid(rguidNotificationType));
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
@ -190,12 +195,12 @@ static HRESULT WINAPI IDirectMusicTrackImpl_RemoveNotificationType(IDirectMusicT
|
||||||
static HRESULT WINAPI IDirectMusicTrackImpl_Clone(IDirectMusicTrack *iface, MUSIC_TIME mtStart,
|
static HRESULT WINAPI IDirectMusicTrackImpl_Clone(IDirectMusicTrack *iface, MUSIC_TIME mtStart,
|
||||||
MUSIC_TIME mtEnd, IDirectMusicTrack **ppTrack)
|
MUSIC_TIME mtEnd, IDirectMusicTrack **ppTrack)
|
||||||
{
|
{
|
||||||
ICOM_THIS_MULTI(IDirectMusicTimeSigTrack, TrackVtbl, iface);
|
IDirectMusicTimeSigTrack *This = impl_from_IDirectMusicTrack(iface);
|
||||||
FIXME("(%p, %d, %d, %p): stub\n", This, mtStart, mtEnd, ppTrack);
|
FIXME("(%p, %d, %d, %p): stub\n", This, mtStart, mtEnd, ppTrack);
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const IDirectMusicTrackVtbl DirectMusicTimeSigTrack_Track_Vtbl = {
|
static const IDirectMusicTrackVtbl dmtack_vtbl = {
|
||||||
IDirectMusicTrackImpl_QueryInterface,
|
IDirectMusicTrackImpl_QueryInterface,
|
||||||
IDirectMusicTrackImpl_AddRef,
|
IDirectMusicTrackImpl_AddRef,
|
||||||
IDirectMusicTrackImpl_Release,
|
IDirectMusicTrackImpl_Release,
|
||||||
|
@ -270,7 +275,7 @@ HRESULT WINAPI create_dmtimesigtrack(REFIID lpcGUID, void **ppobj)
|
||||||
return E_OUTOFMEMORY;
|
return E_OUTOFMEMORY;
|
||||||
}
|
}
|
||||||
track->UnknownVtbl = &DirectMusicTimeSigTrack_Unknown_Vtbl;
|
track->UnknownVtbl = &DirectMusicTimeSigTrack_Unknown_Vtbl;
|
||||||
track->TrackVtbl = &DirectMusicTimeSigTrack_Track_Vtbl;
|
track->IDirectMusicTrack_iface.lpVtbl = &dmtack_vtbl;
|
||||||
track->PersistStreamVtbl = &DirectMusicTimeSigTrack_PersistStream_Vtbl;
|
track->PersistStreamVtbl = &DirectMusicTimeSigTrack_PersistStream_Vtbl;
|
||||||
track->pDesc = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(DMUS_OBJECTDESC));
|
track->pDesc = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(DMUS_OBJECTDESC));
|
||||||
DM_STRUCT_INIT(track->pDesc);
|
DM_STRUCT_INIT(track->pDesc);
|
||||||
|
|
Loading…
Reference in New Issue