1 /* IDirectMusicPerformance Implementation
2 * IDirectMusicPerformance8 Implementation
4 * Copyright (C) 2003 Rok Mandeljc
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Library General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25 #include "wine/debug.h"
27 #include "dmusic_private.h"
29 WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
31 /* IDirectMusicPerformance IUnknown parts follow: */
32 HRESULT WINAPI IDirectMusicPerformanceImpl_QueryInterface (LPDIRECTMUSICPERFORMANCE iface, REFIID riid, LPVOID *ppobj)
34 ICOM_THIS(IDirectMusicPerformanceImpl,iface);
36 if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicPerformance))
38 IDirectMusicPerformanceImpl_AddRef(iface);
42 WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
46 ULONG WINAPI IDirectMusicPerformanceImpl_AddRef (LPDIRECTMUSICPERFORMANCE iface)
48 ICOM_THIS(IDirectMusicPerformanceImpl,iface);
49 TRACE("(%p) : AddRef from %ld\n", This, This->ref);
53 ULONG WINAPI IDirectMusicPerformanceImpl_Release (LPDIRECTMUSICPERFORMANCE iface)
55 ICOM_THIS(IDirectMusicPerformanceImpl,iface);
56 ULONG ref = --This->ref;
57 TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
60 HeapFree(GetProcessHeap(), 0, This);
65 /* IDirectMusicPerformance Interface follow: */
66 HRESULT WINAPI IDirectMusicPerformanceImpl_Init (LPDIRECTMUSICPERFORMANCE iface, IDirectMusic** ppDirectMusic, LPDIRECTSOUND pDirectSound, HWND hWnd)
68 ICOM_THIS(IDirectMusicPerformanceImpl,iface);
69 FIXME("(iface = %p, dmusic = %p (*dmusic = %p), dsound = %p, hwnd = %p): semi-stub\n", This, ppDirectMusic, *ppDirectMusic, pDirectSound, hWnd);
71 /* app creates it's own dmusic object and gives it to performance */
74 TRACE("App provides DirectMusic\n");
75 /* FIXME: is this correct? */
76 memcpy((LPDIRECTMUSIC)This->dmusic, *ppDirectMusic, sizeof(*ppDirectMusic));
77 IDirectMusicImpl_AddRef((LPDIRECTMUSIC)This->dmusic);
78 /* app is supposed to be in charge of everything else */
81 /* app allows the performance to initialise itfself and needs a pointer to object*/
84 TRACE("DirectMusic to be created; needed\n");
86 DMUSIC_CreateDirectMusic(&IID_IDirectMusic, (LPDIRECTMUSIC*)&This->dmusic, NULL);
87 *ppDirectMusic = (LPDIRECTMUSIC)This->dmusic;
89 IDirectMusicImpl_AddRef(*ppDirectMusic);
91 /* app allows the performance to initialise itself and does not need a pointer to object*/
94 TRACE("DirectMusic to be created; not needed\n");
100 HRESULT WINAPI IDirectMusicPerformanceImpl_PlaySegment (LPDIRECTMUSICPERFORMANCE iface, IDirectMusicSegment* pSegment, DWORD dwFlags, __int64 i64StartTime, IDirectMusicSegmentState** ppSegmentState)
106 HRESULT WINAPI IDirectMusicPerformanceImpl_Stop (LPDIRECTMUSICPERFORMANCE iface, IDirectMusicSegment* pSegment, IDirectMusicSegmentState* pSegmentState, MUSIC_TIME mtTime, DWORD dwFlags)
112 HRESULT WINAPI IDirectMusicPerformanceImpl_GetSegmentState (LPDIRECTMUSICPERFORMANCE iface, IDirectMusicSegmentState** ppSegmentState, MUSIC_TIME mtTime)
118 HRESULT WINAPI IDirectMusicPerformanceImpl_SetPrepareTime (LPDIRECTMUSICPERFORMANCE iface, DWORD dwMilliSeconds)
124 HRESULT WINAPI IDirectMusicPerformanceImpl_GetPrepareTime (LPDIRECTMUSICPERFORMANCE iface, DWORD* pdwMilliSeconds)
130 HRESULT WINAPI IDirectMusicPerformanceImpl_SetBumperLength (LPDIRECTMUSICPERFORMANCE iface, DWORD dwMilliSeconds)
136 HRESULT WINAPI IDirectMusicPerformanceImpl_GetBumperLength (LPDIRECTMUSICPERFORMANCE iface, DWORD* pdwMilliSeconds)
142 HRESULT WINAPI IDirectMusicPerformanceImpl_SendPMsg (LPDIRECTMUSICPERFORMANCE iface, DMUS_PMSG* pPMSG)
148 HRESULT WINAPI IDirectMusicPerformanceImpl_MusicToReferenceTime (LPDIRECTMUSICPERFORMANCE iface, MUSIC_TIME mtTime, REFERENCE_TIME* prtTime)
154 HRESULT WINAPI IDirectMusicPerformanceImpl_ReferenceToMusicTime (LPDIRECTMUSICPERFORMANCE iface, REFERENCE_TIME rtTime, MUSIC_TIME* pmtTime)
160 HRESULT WINAPI IDirectMusicPerformanceImpl_IsPlaying (LPDIRECTMUSICPERFORMANCE iface, IDirectMusicSegment* pSegment, IDirectMusicSegmentState* pSegState)
166 HRESULT WINAPI IDirectMusicPerformanceImpl_GetTime (LPDIRECTMUSICPERFORMANCE iface, REFERENCE_TIME* prtNow, MUSIC_TIME* pmtNow)
172 HRESULT WINAPI IDirectMusicPerformanceImpl_AllocPMsg (LPDIRECTMUSICPERFORMANCE iface, ULONG cb, DMUS_PMSG** ppPMSG)
178 HRESULT WINAPI IDirectMusicPerformanceImpl_FreePMsg (LPDIRECTMUSICPERFORMANCE iface, DMUS_PMSG* pPMSG)
184 HRESULT WINAPI IDirectMusicPerformanceImpl_GetGraph (LPDIRECTMUSICPERFORMANCE iface, IDirectMusicGraph** ppGraph)
190 HRESULT WINAPI IDirectMusicPerformanceImpl_SetGraph (LPDIRECTMUSICPERFORMANCE iface, IDirectMusicGraph* pGraph)
196 HRESULT WINAPI IDirectMusicPerformanceImpl_SetNotificationHandle (LPDIRECTMUSICPERFORMANCE iface, HANDLE hNotification, REFERENCE_TIME rtMinimum)
202 HRESULT WINAPI IDirectMusicPerformanceImpl_GetNotificationPMsg (LPDIRECTMUSICPERFORMANCE iface, DMUS_NOTIFICATION_PMSG** ppNotificationPMsg)
208 HRESULT WINAPI IDirectMusicPerformanceImpl_AddNotificationType (LPDIRECTMUSICPERFORMANCE iface, REFGUID rguidNotificationType)
214 HRESULT WINAPI IDirectMusicPerformanceImpl_RemoveNotificationType (LPDIRECTMUSICPERFORMANCE iface, REFGUID rguidNotificationType)
220 HRESULT WINAPI IDirectMusicPerformanceImpl_AddPort (LPDIRECTMUSICPERFORMANCE iface, IDirectMusicPort* pPort)
222 ICOM_THIS(IDirectMusicPerformanceImpl,iface);
224 FIXME("(%p, %p): stub\n", This, pPort);
226 return DMUS_E_CANNOT_OPEN_PORT;
229 HRESULT WINAPI IDirectMusicPerformanceImpl_RemovePort (LPDIRECTMUSICPERFORMANCE iface, IDirectMusicPort* pPort)
235 HRESULT WINAPI IDirectMusicPerformanceImpl_AssignPChannelBlock (LPDIRECTMUSICPERFORMANCE iface, DWORD dwBlockNum, IDirectMusicPort* pPort, DWORD dwGroup)
237 ICOM_THIS(IDirectMusicPerformanceImpl,iface);
239 FIXME("(%p, %ld, %p, %ld): stub\n", This, dwBlockNum, pPort, dwGroup);
244 HRESULT WINAPI IDirectMusicPerformanceImpl_AssignPChannel (LPDIRECTMUSICPERFORMANCE iface, DWORD dwPChannel, IDirectMusicPort* pPort, DWORD dwGroup, DWORD dwMChannel)
250 HRESULT WINAPI IDirectMusicPerformanceImpl_PChannelInfo (LPDIRECTMUSICPERFORMANCE iface, DWORD dwPChannel, IDirectMusicPort** ppPort, DWORD* pdwGroup, DWORD* pdwMChannel)
256 HRESULT WINAPI IDirectMusicPerformanceImpl_DownloadInstrument (LPDIRECTMUSICPERFORMANCE iface, IDirectMusicInstrument* pInst, DWORD dwPChannel, IDirectMusicDownloadedInstrument** ppDownInst, DMUS_NOTERANGE* pNoteRanges, DWORD dwNumNoteRanges, IDirectMusicPort** ppPort, DWORD* pdwGroup, DWORD* pdwMChannel)
262 HRESULT WINAPI IDirectMusicPerformanceImpl_Invalidate (LPDIRECTMUSICPERFORMANCE iface, MUSIC_TIME mtTime, DWORD dwFlags)
268 HRESULT WINAPI IDirectMusicPerformanceImpl_GetParam (LPDIRECTMUSICPERFORMANCE iface, REFGUID rguidType, DWORD dwGroupBits, DWORD dwIndex, MUSIC_TIME mtTime, MUSIC_TIME* pmtNext, void* pParam)
274 HRESULT WINAPI IDirectMusicPerformanceImpl_SetParam (LPDIRECTMUSICPERFORMANCE iface, REFGUID rguidType, DWORD dwGroupBits, DWORD dwIndex, MUSIC_TIME mtTime, void* pParam)
280 HRESULT WINAPI IDirectMusicPerformanceImpl_GetGlobalParam (LPDIRECTMUSICPERFORMANCE iface, REFGUID rguidType, void* pParam, DWORD dwSize)
286 HRESULT WINAPI IDirectMusicPerformanceImpl_SetGlobalParam (LPDIRECTMUSICPERFORMANCE iface, REFGUID rguidType, void* pParam, DWORD dwSize)
292 HRESULT WINAPI IDirectMusicPerformanceImpl_GetLatencyTime (LPDIRECTMUSICPERFORMANCE iface, REFERENCE_TIME* prtTime)
298 HRESULT WINAPI IDirectMusicPerformanceImpl_GetQueueTime (LPDIRECTMUSICPERFORMANCE iface, REFERENCE_TIME* prtTime)
304 HRESULT WINAPI IDirectMusicPerformanceImpl_AdjustTime (LPDIRECTMUSICPERFORMANCE iface, REFERENCE_TIME rtAmount)
310 HRESULT WINAPI IDirectMusicPerformanceImpl_CloseDown (LPDIRECTMUSICPERFORMANCE iface)
312 ICOM_THIS(IDirectMusicPerformanceImpl,iface);
313 FIXME("(%p): semi-stub\n", This);
317 HRESULT WINAPI IDirectMusicPerformanceImpl_GetResolvedTime (LPDIRECTMUSICPERFORMANCE iface, REFERENCE_TIME rtTime, REFERENCE_TIME* prtResolved, DWORD dwTimeResolveFlags)
323 HRESULT WINAPI IDirectMusicPerformanceImpl_MIDIToMusic (LPDIRECTMUSICPERFORMANCE iface, BYTE bMIDIValue, DMUS_CHORD_KEY* pChord, BYTE bPlayMode, BYTE bChordLevel, WORD* pwMusicValue)
329 HRESULT WINAPI IDirectMusicPerformanceImpl_MusicToMIDI (LPDIRECTMUSICPERFORMANCE iface, WORD wMusicValue, DMUS_CHORD_KEY* pChord, BYTE bPlayMode, BYTE bChordLevel, BYTE* pbMIDIValue)
335 HRESULT WINAPI IDirectMusicPerformanceImpl_TimeToRhythm (LPDIRECTMUSICPERFORMANCE iface, MUSIC_TIME mtTime, DMUS_TIMESIGNATURE* pTimeSig, WORD* pwMeasure, BYTE* pbBeat, BYTE* pbGrid, short* pnOffset)
341 HRESULT WINAPI IDirectMusicPerformanceImpl_RhythmToTime (LPDIRECTMUSICPERFORMANCE iface, WORD wMeasure, BYTE bBeat, BYTE bGrid, short nOffset, DMUS_TIMESIGNATURE* pTimeSig, MUSIC_TIME* pmtTime)
347 ICOM_VTABLE(IDirectMusicPerformance) DirectMusicPerformance_Vtbl =
349 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
350 IDirectMusicPerformanceImpl_QueryInterface,
351 IDirectMusicPerformanceImpl_AddRef,
352 IDirectMusicPerformanceImpl_Release,
353 IDirectMusicPerformanceImpl_Init,
354 IDirectMusicPerformanceImpl_PlaySegment,
355 IDirectMusicPerformanceImpl_Stop,
356 IDirectMusicPerformanceImpl_GetSegmentState,
357 IDirectMusicPerformanceImpl_SetPrepareTime,
358 IDirectMusicPerformanceImpl_GetPrepareTime,
359 IDirectMusicPerformanceImpl_SetBumperLength,
360 IDirectMusicPerformanceImpl_GetBumperLength,
361 IDirectMusicPerformanceImpl_SendPMsg,
362 IDirectMusicPerformanceImpl_MusicToReferenceTime,
363 IDirectMusicPerformanceImpl_ReferenceToMusicTime,
364 IDirectMusicPerformanceImpl_IsPlaying,
365 IDirectMusicPerformanceImpl_GetTime,
366 IDirectMusicPerformanceImpl_AllocPMsg,
367 IDirectMusicPerformanceImpl_FreePMsg,
368 IDirectMusicPerformanceImpl_GetGraph,
369 IDirectMusicPerformanceImpl_SetGraph,
370 IDirectMusicPerformanceImpl_SetNotificationHandle,
371 IDirectMusicPerformanceImpl_GetNotificationPMsg,
372 IDirectMusicPerformanceImpl_AddNotificationType,
373 IDirectMusicPerformanceImpl_RemoveNotificationType,
374 IDirectMusicPerformanceImpl_AddPort,
375 IDirectMusicPerformanceImpl_RemovePort,
376 IDirectMusicPerformanceImpl_AssignPChannelBlock,
377 IDirectMusicPerformanceImpl_AssignPChannel,
378 IDirectMusicPerformanceImpl_PChannelInfo,
379 IDirectMusicPerformanceImpl_DownloadInstrument,
380 IDirectMusicPerformanceImpl_Invalidate,
381 IDirectMusicPerformanceImpl_GetParam,
382 IDirectMusicPerformanceImpl_SetParam,
383 IDirectMusicPerformanceImpl_GetGlobalParam,
384 IDirectMusicPerformanceImpl_SetGlobalParam,
385 IDirectMusicPerformanceImpl_GetLatencyTime,
386 IDirectMusicPerformanceImpl_GetQueueTime,
387 IDirectMusicPerformanceImpl_AdjustTime,
388 IDirectMusicPerformanceImpl_CloseDown,
389 IDirectMusicPerformanceImpl_GetResolvedTime,
390 IDirectMusicPerformanceImpl_MIDIToMusic,
391 IDirectMusicPerformanceImpl_MusicToMIDI,
392 IDirectMusicPerformanceImpl_TimeToRhythm,
393 IDirectMusicPerformanceImpl_RhythmToTime
396 /* for ClassFactory */
397 HRESULT WINAPI DMUSIC_CreateDirectMusicPerformance (LPCGUID lpcGUID, LPDIRECTMUSICPERFORMANCE *ppDMPerf, LPUNKNOWN pUnkOuter)
399 IDirectMusicPerformanceImpl *pPerf;
401 TRACE("(%p,%p,%p)\n",lpcGUID, ppDMPerf, pUnkOuter);
402 if (IsEqualGUID(lpcGUID, &IID_IDirectMusicPerformance))
404 pPerf = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicPerformanceImpl));
407 *ppDMPerf = (LPDIRECTMUSICPERFORMANCE)NULL;
408 return E_OUTOFMEMORY;
410 pPerf->lpVtbl = &DirectMusicPerformance_Vtbl;
412 *ppDMPerf = (LPDIRECTMUSICPERFORMANCE)pPerf;
415 WARN("No interface found\n");
417 return E_NOINTERFACE;
421 /* IDirectMusicPerformance8 IUnknown parts follow: */
422 HRESULT WINAPI IDirectMusicPerformance8Impl_QueryInterface (LPDIRECTMUSICPERFORMANCE8 iface, REFIID riid, LPVOID *ppobj)
424 ICOM_THIS(IDirectMusicPerformance8Impl,iface);
426 if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicPerformance8))
428 IDirectMusicPerformance8Impl_AddRef(iface);
432 WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
433 return E_NOINTERFACE;
436 ULONG WINAPI IDirectMusicPerformance8Impl_AddRef (LPDIRECTMUSICPERFORMANCE8 iface)
438 ICOM_THIS(IDirectMusicPerformance8Impl,iface);
439 TRACE("(%p) : AddRef from %ld\n", This, This->ref);
440 return ++(This->ref);
443 ULONG WINAPI IDirectMusicPerformance8Impl_Release (LPDIRECTMUSICPERFORMANCE8 iface)
445 ICOM_THIS(IDirectMusicPerformance8Impl,iface);
446 ULONG ref = --This->ref;
447 TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
450 HeapFree(GetProcessHeap(), 0, This);
455 /* IDirectMusicPerformance Interface part follow: */
456 HRESULT WINAPI IDirectMusicPerformance8Impl_Init (LPDIRECTMUSICPERFORMANCE8 iface, IDirectMusic** ppDirectMusic, LPDIRECTSOUND pDirectSound, HWND hWnd)
462 HRESULT WINAPI IDirectMusicPerformance8Impl_PlaySegment (LPDIRECTMUSICPERFORMANCE8 iface, IDirectMusicSegment* pSegment, DWORD dwFlags, __int64 i64StartTime, IDirectMusicSegmentState** ppSegmentState)
468 HRESULT WINAPI IDirectMusicPerformance8Impl_Stop (LPDIRECTMUSICPERFORMANCE8 iface, IDirectMusicSegment* pSegment, IDirectMusicSegmentState* pSegmentState, MUSIC_TIME mtTime, DWORD dwFlags)
474 HRESULT WINAPI IDirectMusicPerformance8Impl_GetSegmentState (LPDIRECTMUSICPERFORMANCE8 iface, IDirectMusicSegmentState** ppSegmentState, MUSIC_TIME mtTime)
480 HRESULT WINAPI IDirectMusicPerformance8Impl_SetPrepareTime (LPDIRECTMUSICPERFORMANCE8 iface, DWORD dwMilliSeconds)
486 HRESULT WINAPI IDirectMusicPerformance8Impl_GetPrepareTime (LPDIRECTMUSICPERFORMANCE8 iface, DWORD* pdwMilliSeconds)
492 HRESULT WINAPI IDirectMusicPerformance8Impl_SetBumperLength (LPDIRECTMUSICPERFORMANCE8 iface, DWORD dwMilliSeconds)
498 HRESULT WINAPI IDirectMusicPerformance8Impl_GetBumperLength (LPDIRECTMUSICPERFORMANCE8 iface, DWORD* pdwMilliSeconds)
504 HRESULT WINAPI IDirectMusicPerformance8Impl_SendPMsg (LPDIRECTMUSICPERFORMANCE8 iface, DMUS_PMSG* pPMSG)
510 HRESULT WINAPI IDirectMusicPerformance8Impl_MusicToReferenceTime (LPDIRECTMUSICPERFORMANCE8 iface, MUSIC_TIME mtTime, REFERENCE_TIME* prtTime)
516 HRESULT WINAPI IDirectMusicPerformance8Impl_ReferenceToMusicTime (LPDIRECTMUSICPERFORMANCE8 iface, REFERENCE_TIME rtTime, MUSIC_TIME* pmtTime)
522 HRESULT WINAPI IDirectMusicPerformance8Impl_IsPlaying (LPDIRECTMUSICPERFORMANCE8 iface, IDirectMusicSegment* pSegment, IDirectMusicSegmentState* pSegState)
528 HRESULT WINAPI IDirectMusicPerformance8Impl_GetTime (LPDIRECTMUSICPERFORMANCE8 iface, REFERENCE_TIME* prtNow, MUSIC_TIME* pmtNow)
534 HRESULT WINAPI IDirectMusicPerformance8Impl_AllocPMsg (LPDIRECTMUSICPERFORMANCE8 iface, ULONG cb, DMUS_PMSG** ppPMSG)
540 HRESULT WINAPI IDirectMusicPerformance8Impl_FreePMsg (LPDIRECTMUSICPERFORMANCE8 iface, DMUS_PMSG* pPMSG)
546 HRESULT WINAPI IDirectMusicPerformance8Impl_GetGraph (LPDIRECTMUSICPERFORMANCE8 iface, IDirectMusicGraph** ppGraph)
552 HRESULT WINAPI IDirectMusicPerformance8Impl_SetGraph (LPDIRECTMUSICPERFORMANCE8 iface, IDirectMusicGraph* pGraph)
558 HRESULT WINAPI IDirectMusicPerformance8Impl_SetNotificationHandle (LPDIRECTMUSICPERFORMANCE8 iface, HANDLE hNotification, REFERENCE_TIME rtMinimum)
564 HRESULT WINAPI IDirectMusicPerformance8Impl_GetNotificationPMsg (LPDIRECTMUSICPERFORMANCE8 iface, DMUS_NOTIFICATION_PMSG** ppNotificationPMsg)
570 HRESULT WINAPI IDirectMusicPerformance8Impl_AddNotificationType (LPDIRECTMUSICPERFORMANCE8 iface, REFGUID rguidNotificationType)
576 HRESULT WINAPI IDirectMusicPerformance8Impl_RemoveNotificationType (LPDIRECTMUSICPERFORMANCE8 iface, REFGUID rguidNotificationType)
582 HRESULT WINAPI IDirectMusicPerformance8Impl_AddPort (LPDIRECTMUSICPERFORMANCE8 iface, IDirectMusicPort* pPort)
588 HRESULT WINAPI IDirectMusicPerformance8Impl_RemovePort (LPDIRECTMUSICPERFORMANCE8 iface, IDirectMusicPort* pPort)
594 HRESULT WINAPI IDirectMusicPerformance8Impl_AssignPChannelBlock (LPDIRECTMUSICPERFORMANCE8 iface, DWORD dwBlockNum, IDirectMusicPort* pPort, DWORD dwGroup)
600 HRESULT WINAPI IDirectMusicPerformance8Impl_AssignPChannel (LPDIRECTMUSICPERFORMANCE8 iface, DWORD dwPChannel, IDirectMusicPort* pPort, DWORD dwGroup, DWORD dwMChannel)
606 HRESULT WINAPI IDirectMusicPerformance8Impl_PChannelInfo (LPDIRECTMUSICPERFORMANCE8 iface, DWORD dwPChannel, IDirectMusicPort** ppPort, DWORD* pdwGroup, DWORD* pdwMChannel)
612 HRESULT WINAPI IDirectMusicPerformance8Impl_DownloadInstrument (LPDIRECTMUSICPERFORMANCE8 iface, IDirectMusicInstrument* pInst, DWORD dwPChannel, IDirectMusicDownloadedInstrument** ppDownInst, DMUS_NOTERANGE* pNoteRanges, DWORD dwNumNoteRanges, IDirectMusicPort** ppPort, DWORD* pdwGroup, DWORD* pdwMChannel)
618 HRESULT WINAPI IDirectMusicPerformance8Impl_Invalidate (LPDIRECTMUSICPERFORMANCE8 iface, MUSIC_TIME mtTime, DWORD dwFlags)
624 HRESULT WINAPI IDirectMusicPerformance8Impl_GetParam (LPDIRECTMUSICPERFORMANCE8 iface, REFGUID rguidType, DWORD dwGroupBits, DWORD dwIndex, MUSIC_TIME mtTime, MUSIC_TIME* pmtNext, void* pParam)
630 HRESULT WINAPI IDirectMusicPerformance8Impl_SetParam (LPDIRECTMUSICPERFORMANCE8 iface, REFGUID rguidType, DWORD dwGroupBits, DWORD dwIndex, MUSIC_TIME mtTime, void* pParam)
636 HRESULT WINAPI IDirectMusicPerformance8Impl_GetGlobalParam (LPDIRECTMUSICPERFORMANCE8 iface, REFGUID rguidType, void* pParam, DWORD dwSize)
642 HRESULT WINAPI IDirectMusicPerformance8Impl_SetGlobalParam (LPDIRECTMUSICPERFORMANCE8 iface, REFGUID rguidType, void* pParam, DWORD dwSize)
648 HRESULT WINAPI IDirectMusicPerformance8Impl_GetLatencyTime (LPDIRECTMUSICPERFORMANCE8 iface, REFERENCE_TIME* prtTime)
654 HRESULT WINAPI IDirectMusicPerformance8Impl_GetQueueTime (LPDIRECTMUSICPERFORMANCE8 iface, REFERENCE_TIME* prtTime)
660 HRESULT WINAPI IDirectMusicPerformance8Impl_AdjustTime (LPDIRECTMUSICPERFORMANCE8 iface, REFERENCE_TIME rtAmount)
666 HRESULT WINAPI IDirectMusicPerformance8Impl_CloseDown (LPDIRECTMUSICPERFORMANCE8 iface)
672 HRESULT WINAPI IDirectMusicPerformance8Impl_GetResolvedTime (LPDIRECTMUSICPERFORMANCE8 iface, REFERENCE_TIME rtTime, REFERENCE_TIME* prtResolved, DWORD dwTimeResolveFlags)
678 HRESULT WINAPI IDirectMusicPerformance8Impl_MIDIToMusic (LPDIRECTMUSICPERFORMANCE8 iface, BYTE bMIDIValue, DMUS_CHORD_KEY* pChord, BYTE bPlayMode, BYTE bChordLevel, WORD* pwMusicValue)
684 HRESULT WINAPI IDirectMusicPerformance8Impl_MusicToMIDI (LPDIRECTMUSICPERFORMANCE8 iface, WORD wMusicValue, DMUS_CHORD_KEY* pChord, BYTE bPlayMode, BYTE bChordLevel, BYTE* pbMIDIValue)
690 HRESULT WINAPI IDirectMusicPerformance8Impl_TimeToRhythm (LPDIRECTMUSICPERFORMANCE8 iface, MUSIC_TIME mtTime, DMUS_TIMESIGNATURE* pTimeSig, WORD* pwMeasure, BYTE* pbBeat, BYTE* pbGrid, short* pnOffset)
696 HRESULT WINAPI IDirectMusicPerformance8Impl_RhythmToTime (LPDIRECTMUSICPERFORMANCE8 iface, WORD wMeasure, BYTE bBeat, BYTE bGrid, short nOffset, DMUS_TIMESIGNATURE* pTimeSig, MUSIC_TIME* pmtTime)
702 /* IDirectMusicPerformance8 Interface part follow: */
703 HRESULT WINAPI IDirectMusicPerformance8ImplInitAudio (LPDIRECTMUSICPERFORMANCE8 iface, IDirectMusic** ppDirectMusic, IDirectSound** ppDirectSound, HWND hWnd, DWORD dwDefaultPathType, DWORD dwPChannelCount, DWORD dwFlags, DMUS_AUDIOPARAMS* pParams)
709 HRESULT WINAPI IDirectMusicPerformance8ImplPlaySegmentEx (LPDIRECTMUSICPERFORMANCE8 iface, IUnknown* pSource, WCHAR* pwzSegmentName, IUnknown* pTransition, DWORD dwFlags, __int64 i64StartTime, IDirectMusicSegmentState** ppSegmentState, IUnknown* pFrom, IUnknown* pAudioPath)
715 HRESULT WINAPI IDirectMusicPerformance8ImplStopEx (LPDIRECTMUSICPERFORMANCE8 iface, IUnknown* pObjectToStop, __int64 i64StopTime, DWORD dwFlags)
721 HRESULT WINAPI IDirectMusicPerformance8ImplClonePMsg (LPDIRECTMUSICPERFORMANCE8 iface, DMUS_PMSG* pSourcePMSG, DMUS_PMSG** ppCopyPMSG)
727 HRESULT WINAPI IDirectMusicPerformance8ImplCreateAudioPath (LPDIRECTMUSICPERFORMANCE8 iface, IUnknown* pSourceConfig, BOOL fActivate, IDirectMusicAudioPath** ppNewPath)
733 HRESULT WINAPI IDirectMusicPerformance8ImplCreateStandardAudioPath (LPDIRECTMUSICPERFORMANCE8 iface, DWORD dwType, DWORD dwPChannelCount, BOOL fActivate, IDirectMusicAudioPath** ppNewPath)
739 HRESULT WINAPI IDirectMusicPerformance8ImplSetDefaultAudioPath (LPDIRECTMUSICPERFORMANCE8 iface, IDirectMusicAudioPath* pAudioPath)
745 HRESULT WINAPI IDirectMusicPerformance8ImplGetDefaultAudioPath (LPDIRECTMUSICPERFORMANCE8 iface, IDirectMusicAudioPath** ppAudioPath)
751 HRESULT WINAPI IDirectMusicPerformance8ImplGetParamEx (LPDIRECTMUSICPERFORMANCE8 iface, REFGUID rguidType, DWORD dwTrackID, DWORD dwGroupBits, DWORD dwIndex, MUSIC_TIME mtTime, MUSIC_TIME* pmtNext, void* pParam)
757 ICOM_VTABLE(IDirectMusicPerformance8) DirectMusicPerformance8_Vtbl =
759 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
760 IDirectMusicPerformance8Impl_QueryInterface,
761 IDirectMusicPerformance8Impl_AddRef,
762 IDirectMusicPerformance8Impl_Release,
763 IDirectMusicPerformance8Impl_Init,
764 IDirectMusicPerformance8Impl_PlaySegment,
765 IDirectMusicPerformance8Impl_Stop,
766 IDirectMusicPerformance8Impl_GetSegmentState,
767 IDirectMusicPerformance8Impl_SetPrepareTime,
768 IDirectMusicPerformance8Impl_GetPrepareTime,
769 IDirectMusicPerformance8Impl_SetBumperLength,
770 IDirectMusicPerformance8Impl_GetBumperLength,
771 IDirectMusicPerformance8Impl_SendPMsg,
772 IDirectMusicPerformance8Impl_MusicToReferenceTime,
773 IDirectMusicPerformance8Impl_ReferenceToMusicTime,
774 IDirectMusicPerformance8Impl_IsPlaying,
775 IDirectMusicPerformance8Impl_GetTime,
776 IDirectMusicPerformance8Impl_AllocPMsg,
777 IDirectMusicPerformance8Impl_FreePMsg,
778 IDirectMusicPerformance8Impl_GetGraph,
779 IDirectMusicPerformance8Impl_SetGraph,
780 IDirectMusicPerformance8Impl_SetNotificationHandle,
781 IDirectMusicPerformance8Impl_GetNotificationPMsg,
782 IDirectMusicPerformance8Impl_AddNotificationType,
783 IDirectMusicPerformance8Impl_RemoveNotificationType,
784 IDirectMusicPerformance8Impl_AddPort,
785 IDirectMusicPerformance8Impl_RemovePort,
786 IDirectMusicPerformance8Impl_AssignPChannelBlock,
787 IDirectMusicPerformance8Impl_AssignPChannel,
788 IDirectMusicPerformance8Impl_PChannelInfo,
789 IDirectMusicPerformance8Impl_DownloadInstrument,
790 IDirectMusicPerformance8Impl_Invalidate,
791 IDirectMusicPerformance8Impl_GetParam,
792 IDirectMusicPerformance8Impl_SetParam,
793 IDirectMusicPerformance8Impl_GetGlobalParam,
794 IDirectMusicPerformance8Impl_SetGlobalParam,
795 IDirectMusicPerformance8Impl_GetLatencyTime,
796 IDirectMusicPerformance8Impl_GetQueueTime,
797 IDirectMusicPerformance8Impl_AdjustTime,
798 IDirectMusicPerformance8Impl_CloseDown,
799 IDirectMusicPerformance8Impl_GetResolvedTime,
800 IDirectMusicPerformance8Impl_MIDIToMusic,
801 IDirectMusicPerformance8Impl_MusicToMIDI,
802 IDirectMusicPerformance8Impl_TimeToRhythm,
803 IDirectMusicPerformance8Impl_RhythmToTime,
804 IDirectMusicPerformance8ImplInitAudio,
805 IDirectMusicPerformance8ImplPlaySegmentEx,
806 IDirectMusicPerformance8ImplStopEx,
807 IDirectMusicPerformance8ImplClonePMsg,
808 IDirectMusicPerformance8ImplCreateAudioPath,
809 IDirectMusicPerformance8ImplCreateStandardAudioPath,
810 IDirectMusicPerformance8ImplSetDefaultAudioPath,
811 IDirectMusicPerformance8ImplGetDefaultAudioPath,
812 IDirectMusicPerformance8ImplGetParamEx
815 /* for ClassFactory */
816 HRESULT WINAPI DMUSIC_CreateDirectMusicPerformance8 (LPCGUID lpcGUID, LPDIRECTMUSICPERFORMANCE8 *ppDMPerf8, LPUNKNOWN pUnkOuter)
818 IDirectMusicPerformance8Impl *pPerf8;
820 TRACE("(%p,%p,%p)\n",lpcGUID, ppDMPerf8, pUnkOuter);
821 if (IsEqualGUID(lpcGUID, &IID_IDirectMusicPerformance8))
823 pPerf8 = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicPerformance8Impl));
826 *ppDMPerf8 = (LPDIRECTMUSICPERFORMANCE8)NULL;
827 return E_OUTOFMEMORY;
829 pPerf8->lpVtbl = &DirectMusicPerformance8_Vtbl;
831 *ppDMPerf8 = (LPDIRECTMUSICPERFORMANCE8)pPerf8;
834 WARN("No interface found\n");
836 return E_NOINTERFACE;