2003-07-22 00:10:14 +02:00
|
|
|
/* IDirectMusicTrack8 Implementation
|
2003-04-08 23:42:00 +02:00
|
|
|
*
|
|
|
|
* Copyright (C) 2003 Rok Mandeljc
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "windef.h"
|
|
|
|
#include "winbase.h"
|
|
|
|
#include "winuser.h"
|
|
|
|
#include "wingdi.h"
|
|
|
|
#include "wine/debug.h"
|
|
|
|
|
2003-07-22 00:10:14 +02:00
|
|
|
#include "dmime_private.h"
|
2003-04-08 23:42:00 +02:00
|
|
|
|
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
|
|
|
|
|
2003-06-27 21:43:13 +02:00
|
|
|
/* IDirectMusicTrack8 IUnknown part follow: */
|
2003-04-08 23:42:00 +02:00
|
|
|
HRESULT WINAPI IDirectMusicTrack8Impl_QueryInterface (LPDIRECTMUSICTRACK8 iface, REFIID riid, LPVOID *ppobj)
|
|
|
|
{
|
|
|
|
ICOM_THIS(IDirectMusicTrack8Impl,iface);
|
|
|
|
|
2003-06-27 21:43:13 +02:00
|
|
|
if (IsEqualGUID(riid, &IID_IUnknown) ||
|
|
|
|
IsEqualGUID(riid, &IID_IDirectMusicTrack) ||
|
|
|
|
IsEqualGUID(riid, &IID_IDirectMusicTrack8))
|
2003-04-08 23:42:00 +02:00
|
|
|
{
|
|
|
|
IDirectMusicTrack8Impl_AddRef(iface);
|
|
|
|
*ppobj = This;
|
2003-06-07 02:39:18 +02:00
|
|
|
return S_OK;
|
2003-04-08 23:42:00 +02:00
|
|
|
}
|
2003-06-27 21:43:13 +02:00
|
|
|
WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
|
2003-04-08 23:42:00 +02:00
|
|
|
return E_NOINTERFACE;
|
|
|
|
}
|
|
|
|
|
|
|
|
ULONG WINAPI IDirectMusicTrack8Impl_AddRef (LPDIRECTMUSICTRACK8 iface)
|
|
|
|
{
|
|
|
|
ICOM_THIS(IDirectMusicTrack8Impl,iface);
|
|
|
|
TRACE("(%p) : AddRef from %ld\n", This, This->ref);
|
|
|
|
return ++(This->ref);
|
|
|
|
}
|
|
|
|
|
|
|
|
ULONG WINAPI IDirectMusicTrack8Impl_Release (LPDIRECTMUSICTRACK8 iface)
|
|
|
|
{
|
|
|
|
ICOM_THIS(IDirectMusicTrack8Impl,iface);
|
|
|
|
ULONG ref = --This->ref;
|
|
|
|
TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
|
|
|
|
if (ref == 0)
|
|
|
|
{
|
|
|
|
HeapFree(GetProcessHeap(), 0, This);
|
|
|
|
}
|
|
|
|
return ref;
|
|
|
|
}
|
2003-06-27 21:43:13 +02:00
|
|
|
|
2003-04-08 23:42:00 +02:00
|
|
|
/* IDirectMusicTrack Interface part follow: */
|
|
|
|
HRESULT WINAPI IDirectMusicTrack8Impl_Init (LPDIRECTMUSICTRACK8 iface, IDirectMusicSegment* pSegment)
|
|
|
|
{
|
2003-06-07 02:39:18 +02:00
|
|
|
ICOM_THIS(IDirectMusicTrack8Impl,iface);
|
|
|
|
|
|
|
|
FIXME("(%p, %p): stub\n", This, pSegment);
|
|
|
|
|
|
|
|
return S_OK;
|
2003-04-08 23:42:00 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
HRESULT WINAPI IDirectMusicTrack8Impl_InitPlay (LPDIRECTMUSICTRACK8 iface, IDirectMusicSegmentState* pSegmentState, IDirectMusicPerformance* pPerformance, void** ppStateData, DWORD dwVirtualTrack8ID, DWORD dwFlags)
|
|
|
|
{
|
2003-06-07 02:39:18 +02:00
|
|
|
ICOM_THIS(IDirectMusicTrack8Impl,iface);
|
|
|
|
|
|
|
|
FIXME("(%p, %p, %p, %p, %ld, %ld): stub\n", This, pSegmentState, pPerformance, ppStateData, dwVirtualTrack8ID, dwFlags);
|
|
|
|
|
|
|
|
return S_OK;
|
2003-04-08 23:42:00 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
HRESULT WINAPI IDirectMusicTrack8Impl_EndPlay (LPDIRECTMUSICTRACK8 iface, void* pStateData)
|
|
|
|
{
|
2003-06-07 02:39:18 +02:00
|
|
|
ICOM_THIS(IDirectMusicTrack8Impl,iface);
|
|
|
|
|
|
|
|
FIXME("(%p, %p): stub\n", This, pStateData);
|
|
|
|
|
|
|
|
return S_OK;
|
2003-04-08 23:42:00 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
HRESULT WINAPI IDirectMusicTrack8Impl_Play (LPDIRECTMUSICTRACK8 iface, void* pStateData, MUSIC_TIME mtStart, MUSIC_TIME mtEnd, MUSIC_TIME mtOffset, DWORD dwFlags, IDirectMusicPerformance* pPerf, IDirectMusicSegmentState* pSegSt, DWORD dwVirtualID)
|
|
|
|
{
|
2003-06-07 02:39:18 +02:00
|
|
|
ICOM_THIS(IDirectMusicTrack8Impl,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;
|
2003-04-08 23:42:00 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
HRESULT WINAPI IDirectMusicTrack8Impl_GetParam (LPDIRECTMUSICTRACK8 iface, REFGUID rguidType, MUSIC_TIME mtTime, MUSIC_TIME* pmtNext, void* pParam)
|
|
|
|
{
|
2003-06-07 02:39:18 +02:00
|
|
|
ICOM_THIS(IDirectMusicTrack8Impl,iface);
|
|
|
|
|
|
|
|
FIXME("(%p, %s, %ld, %p, %p): stub\n", This, debugstr_guid(rguidType), mtTime, pmtNext, pParam);
|
|
|
|
|
|
|
|
return S_OK;
|
2003-04-08 23:42:00 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
HRESULT WINAPI IDirectMusicTrack8Impl_SetParam (LPDIRECTMUSICTRACK8 iface, REFGUID rguidType, MUSIC_TIME mtTime, void* pParam)
|
|
|
|
{
|
2003-06-07 02:39:18 +02:00
|
|
|
ICOM_THIS(IDirectMusicTrack8Impl,iface);
|
|
|
|
|
|
|
|
FIXME("(%p, %s, %ld, %p): stub\n", This, debugstr_guid(rguidType), mtTime, pParam);
|
|
|
|
|
|
|
|
return S_OK;
|
2003-04-08 23:42:00 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
HRESULT WINAPI IDirectMusicTrack8Impl_IsParamSupported (LPDIRECTMUSICTRACK8 iface, REFGUID rguidType)
|
|
|
|
{
|
2003-06-07 02:39:18 +02:00
|
|
|
ICOM_THIS(IDirectMusicTrack8Impl,iface);
|
|
|
|
|
|
|
|
FIXME("(%p, %s): stub\n", This, debugstr_guid(rguidType));
|
|
|
|
|
|
|
|
return S_OK;
|
2003-04-08 23:42:00 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
HRESULT WINAPI IDirectMusicTrack8Impl_AddNotificationType (LPDIRECTMUSICTRACK8 iface, REFGUID rguidNotificationType)
|
|
|
|
{
|
2003-06-07 02:39:18 +02:00
|
|
|
ICOM_THIS(IDirectMusicTrack8Impl,iface);
|
|
|
|
|
|
|
|
FIXME("(%p, %s): stub\n", This, debugstr_guid(rguidNotificationType));
|
|
|
|
|
|
|
|
return S_OK;
|
2003-04-08 23:42:00 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
HRESULT WINAPI IDirectMusicTrack8Impl_RemoveNotificationType (LPDIRECTMUSICTRACK8 iface, REFGUID rguidNotificationType)
|
|
|
|
{
|
2003-06-07 02:39:18 +02:00
|
|
|
ICOM_THIS(IDirectMusicTrack8Impl,iface);
|
|
|
|
|
|
|
|
FIXME("(%p, %s): stub\n", This, debugstr_guid(rguidNotificationType));
|
|
|
|
|
|
|
|
return S_OK;
|
2003-04-08 23:42:00 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
HRESULT WINAPI IDirectMusicTrack8Impl_Clone (LPDIRECTMUSICTRACK8 iface, MUSIC_TIME mtStart, MUSIC_TIME mtEnd, IDirectMusicTrack** ppTrack)
|
|
|
|
{
|
2003-06-07 02:39:18 +02:00
|
|
|
ICOM_THIS(IDirectMusicTrack8Impl,iface);
|
|
|
|
|
|
|
|
FIXME("(%p, %ld, %ld, %p): stub\n", This, mtStart, mtEnd, ppTrack);
|
|
|
|
|
|
|
|
return S_OK;
|
2003-04-08 23:42:00 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/* IDirectMusicTrack8 Interface part follow: */
|
|
|
|
HRESULT WINAPI IDirectMusicTrack8Impl_PlayEx (LPDIRECTMUSICTRACK8 iface, void* pStateData, REFERENCE_TIME rtStart, REFERENCE_TIME rtEnd, REFERENCE_TIME rtOffset, DWORD dwFlags, IDirectMusicPerformance* pPerf, IDirectMusicSegmentState* pSegSt, DWORD dwVirtualID)
|
|
|
|
{
|
2003-06-07 02:39:18 +02:00
|
|
|
ICOM_THIS(IDirectMusicTrack8Impl,iface);
|
|
|
|
|
2003-07-22 00:10:14 +02:00
|
|
|
FIXME("(%p, %p, %lli, %lli, %lli, %ld, %p, %p, %ld): stub\n", This, pStateData, rtStart, rtEnd, rtOffset, dwFlags, pPerf, pSegSt, dwVirtualID);
|
2003-06-07 02:39:18 +02:00
|
|
|
|
|
|
|
return S_OK;
|
2003-04-08 23:42:00 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
HRESULT WINAPI IDirectMusicTrack8Impl_GetParamEx (LPDIRECTMUSICTRACK8 iface, REFGUID rguidType, REFERENCE_TIME rtTime, REFERENCE_TIME* prtNext, void* pParam, void* pStateData, DWORD dwFlags)
|
|
|
|
{
|
2003-06-07 02:39:18 +02:00
|
|
|
ICOM_THIS(IDirectMusicTrack8Impl,iface);
|
|
|
|
|
2003-07-22 00:10:14 +02:00
|
|
|
FIXME("(%p, %s, %lli, %p, %p, %p, %ld): stub\n", This, debugstr_guid(rguidType), rtTime, prtNext, pParam, pStateData, dwFlags);
|
2003-06-07 02:39:18 +02:00
|
|
|
|
|
|
|
return S_OK;
|
2003-04-08 23:42:00 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
HRESULT WINAPI IDirectMusicTrack8Impl_SetParamEx (LPDIRECTMUSICTRACK8 iface, REFGUID rguidType, REFERENCE_TIME rtTime, void* pParam, void* pStateData, DWORD dwFlags)
|
|
|
|
{
|
2003-06-07 02:39:18 +02:00
|
|
|
ICOM_THIS(IDirectMusicTrack8Impl,iface);
|
|
|
|
|
2003-07-22 00:10:14 +02:00
|
|
|
FIXME("(%p, %s, %lli, %p, %p, %ld): stub\n", This, debugstr_guid(rguidType), rtTime, pParam, pStateData, dwFlags);
|
2003-06-07 02:39:18 +02:00
|
|
|
|
|
|
|
return S_OK;
|
2003-04-08 23:42:00 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
HRESULT WINAPI IDirectMusicTrack8Impl_Compose (LPDIRECTMUSICTRACK8 iface, IUnknown* pContext, DWORD dwTrackGroup, IDirectMusicTrack** ppResultTrack)
|
|
|
|
{
|
2003-06-07 02:39:18 +02:00
|
|
|
ICOM_THIS(IDirectMusicTrack8Impl,iface);
|
|
|
|
|
|
|
|
FIXME("(%p, %p, %ld, %p): stub\n", This, pContext, dwTrackGroup, ppResultTrack);
|
|
|
|
|
|
|
|
return S_OK;
|
2003-04-08 23:42:00 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
HRESULT WINAPI IDirectMusicTrack8Impl_Join (LPDIRECTMUSICTRACK8 iface, IDirectMusicTrack* pNewTrack, MUSIC_TIME mtJoin, IUnknown* pContext, DWORD dwTrackGroup, IDirectMusicTrack** ppResultTrack)
|
|
|
|
{
|
2003-06-07 02:39:18 +02:00
|
|
|
ICOM_THIS(IDirectMusicTrack8Impl,iface);
|
|
|
|
|
|
|
|
FIXME("(%p, %p, %ld, %p, %ld, %p): stub\n", This, pNewTrack, mtJoin, pContext, dwTrackGroup, ppResultTrack);
|
|
|
|
|
|
|
|
return S_OK;
|
2003-04-08 23:42:00 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
ICOM_VTABLE(IDirectMusicTrack8) DirectMusicTrack8_Vtbl =
|
|
|
|
{
|
|
|
|
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
|
|
|
IDirectMusicTrack8Impl_QueryInterface,
|
|
|
|
IDirectMusicTrack8Impl_AddRef,
|
|
|
|
IDirectMusicTrack8Impl_Release,
|
|
|
|
IDirectMusicTrack8Impl_Init,
|
|
|
|
IDirectMusicTrack8Impl_InitPlay,
|
|
|
|
IDirectMusicTrack8Impl_EndPlay,
|
|
|
|
IDirectMusicTrack8Impl_Play,
|
|
|
|
IDirectMusicTrack8Impl_GetParam,
|
|
|
|
IDirectMusicTrack8Impl_SetParam,
|
|
|
|
IDirectMusicTrack8Impl_IsParamSupported,
|
|
|
|
IDirectMusicTrack8Impl_AddNotificationType,
|
|
|
|
IDirectMusicTrack8Impl_RemoveNotificationType,
|
|
|
|
IDirectMusicTrack8Impl_Clone,
|
|
|
|
IDirectMusicTrack8Impl_PlayEx,
|
|
|
|
IDirectMusicTrack8Impl_GetParamEx,
|
|
|
|
IDirectMusicTrack8Impl_SetParamEx,
|
|
|
|
IDirectMusicTrack8Impl_Compose,
|
|
|
|
IDirectMusicTrack8Impl_Join
|
|
|
|
};
|
2003-07-22 00:10:14 +02:00
|
|
|
|
|
|
|
/* for ClassFactory */
|
|
|
|
HRESULT WINAPI DMUSIC_CreateDirectMusicTrack (LPCGUID lpcGUID, LPDIRECTMUSICTRACK8 *ppDMTrack, LPUNKNOWN pUnkOuter)
|
|
|
|
{
|
|
|
|
if (IsEqualGUID (lpcGUID, &IID_IDirectMusicComposer))
|
|
|
|
{
|
|
|
|
FIXME("Not yet\n");
|
|
|
|
return E_NOINTERFACE;
|
|
|
|
}
|
|
|
|
WARN("No interface found\n");
|
|
|
|
|
|
|
|
return E_NOINTERFACE;
|
|
|
|
}
|