2003-07-22 00:10:14 +02:00
|
|
|
/* IDirectMusicSynth8 Implementation
|
2003-04-08 23:42:00 +02:00
|
|
|
*
|
2004-01-20 01:21:40 +01:00
|
|
|
* Copyright (C) 2003-2004 Rok Mandeljc
|
2003-04-08 23:42:00 +02:00
|
|
|
*
|
2007-05-30 12:54:07 +02:00
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
2003-04-08 23:42:00 +02:00
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2007-05-30 12:54:07 +02:00
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
2003-04-08 23:42:00 +02:00
|
|
|
*
|
2007-05-30 12:54:07 +02:00
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
2003-04-08 23:42:00 +02:00
|
|
|
*/
|
|
|
|
|
2003-07-22 00:10:14 +02:00
|
|
|
#include "dmsynth_private.h"
|
2003-04-08 23:42:00 +02:00
|
|
|
|
2003-08-23 01:53:27 +02:00
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(dmsynth);
|
2003-04-08 23:42:00 +02:00
|
|
|
|
2004-01-20 01:21:40 +01:00
|
|
|
/* IDirectMusicSynth8Impl IUnknown part: */
|
2006-06-10 11:57:03 +02:00
|
|
|
static HRESULT WINAPI IDirectMusicSynth8Impl_QueryInterface (LPDIRECTMUSICSYNTH8 iface, REFIID riid, LPVOID *ppobj) {
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectMusicSynth8Impl *This = (IDirectMusicSynth8Impl *)iface;
|
2004-02-25 02:30:03 +01:00
|
|
|
TRACE("(%p, %s, %p)\n", This, debugstr_dmguid(riid), ppobj);
|
2003-04-08 23:42:00 +02:00
|
|
|
|
2003-08-23 01:53:27 +02:00
|
|
|
if (IsEqualIID (riid, &IID_IUnknown) ||
|
|
|
|
IsEqualIID (riid, &IID_IDirectMusicSynth) ||
|
|
|
|
IsEqualIID (riid, &IID_IDirectMusicSynth8)) {
|
2006-06-10 11:57:03 +02:00
|
|
|
IUnknown_AddRef(iface);
|
2003-04-08 23:42:00 +02:00
|
|
|
*ppobj = This;
|
2003-06-07 02:39:18 +02:00
|
|
|
return S_OK;
|
2003-04-08 23:42:00 +02:00
|
|
|
}
|
2004-02-25 02:30:03 +01:00
|
|
|
WARN("(%p, %s, %p): not found\n", This, debugstr_dmguid(riid), ppobj);
|
2003-04-08 23:42:00 +02:00
|
|
|
return E_NOINTERFACE;
|
|
|
|
}
|
|
|
|
|
2006-06-10 11:57:03 +02:00
|
|
|
static ULONG WINAPI IDirectMusicSynth8Impl_AddRef (LPDIRECTMUSICSYNTH8 iface) {
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectMusicSynth8Impl *This = (IDirectMusicSynth8Impl *)iface;
|
2005-01-14 17:02:20 +01:00
|
|
|
ULONG refCount = InterlockedIncrement(&This->ref);
|
|
|
|
|
2006-10-08 18:59:31 +02:00
|
|
|
TRACE("(%p)->(ref before=%u)\n", This, refCount - 1);
|
2005-01-14 17:02:20 +01:00
|
|
|
|
2005-01-31 21:40:26 +01:00
|
|
|
DMSYNTH_LockModule();
|
|
|
|
|
2005-01-14 17:02:20 +01:00
|
|
|
return refCount;
|
2003-04-08 23:42:00 +02:00
|
|
|
}
|
|
|
|
|
2006-06-10 11:57:03 +02:00
|
|
|
static ULONG WINAPI IDirectMusicSynth8Impl_Release (LPDIRECTMUSICSYNTH8 iface) {
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectMusicSynth8Impl *This = (IDirectMusicSynth8Impl *)iface;
|
2005-01-14 17:02:20 +01:00
|
|
|
ULONG refCount = InterlockedDecrement(&This->ref);
|
|
|
|
|
2006-10-08 18:59:31 +02:00
|
|
|
TRACE("(%p)->(ref before=%u)\n", This, refCount + 1);
|
2005-01-14 17:02:20 +01:00
|
|
|
|
|
|
|
if (!refCount) {
|
2003-04-08 23:42:00 +02:00
|
|
|
HeapFree(GetProcessHeap(), 0, This);
|
|
|
|
}
|
2005-01-31 21:40:26 +01:00
|
|
|
|
|
|
|
DMSYNTH_UnlockModule();
|
|
|
|
|
2005-01-14 17:02:20 +01:00
|
|
|
return refCount;
|
2003-04-08 23:42:00 +02:00
|
|
|
}
|
|
|
|
|
2004-01-20 01:21:40 +01:00
|
|
|
/* IDirectMusicSynth8Impl IDirectMusicSynth part: */
|
2006-06-10 11:57:03 +02:00
|
|
|
static HRESULT WINAPI IDirectMusicSynth8Impl_Open (LPDIRECTMUSICSYNTH8 iface, LPDMUS_PORTPARAMS pPortParams) {
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectMusicSynth8Impl *This = (IDirectMusicSynth8Impl *)iface;
|
2003-06-07 02:39:18 +02:00
|
|
|
FIXME("(%p, %p): stub\n", This, pPortParams);
|
|
|
|
return S_OK;
|
2003-04-08 23:42:00 +02:00
|
|
|
}
|
|
|
|
|
2006-06-10 11:57:03 +02:00
|
|
|
static HRESULT WINAPI IDirectMusicSynth8Impl_Close (LPDIRECTMUSICSYNTH8 iface) {
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectMusicSynth8Impl *This = (IDirectMusicSynth8Impl *)iface;
|
2003-06-07 02:39:18 +02:00
|
|
|
FIXME("(%p): stub\n", This);
|
|
|
|
return S_OK;
|
2003-04-08 23:42:00 +02:00
|
|
|
}
|
|
|
|
|
2006-06-10 11:57:03 +02:00
|
|
|
static HRESULT WINAPI IDirectMusicSynth8Impl_SetNumChannelGroups (LPDIRECTMUSICSYNTH8 iface, DWORD dwGroups) {
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectMusicSynth8Impl *This = (IDirectMusicSynth8Impl *)iface;
|
2006-10-08 18:59:31 +02:00
|
|
|
FIXME("(%p, %d): stub\n", This, dwGroups);
|
2003-06-07 02:39:18 +02:00
|
|
|
return S_OK;
|
2003-04-08 23:42:00 +02:00
|
|
|
}
|
|
|
|
|
2006-06-10 11:57:03 +02:00
|
|
|
static HRESULT WINAPI IDirectMusicSynth8Impl_Download (LPDIRECTMUSICSYNTH8 iface, LPHANDLE phDownload, LPVOID pvData, LPBOOL pbFree) {
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectMusicSynth8Impl *This = (IDirectMusicSynth8Impl *)iface;
|
2003-06-07 02:39:18 +02:00
|
|
|
FIXME("(%p, %p, %p, %p): stub\n", This, phDownload, pvData, pbFree);
|
|
|
|
return S_OK;
|
2003-04-08 23:42:00 +02:00
|
|
|
}
|
|
|
|
|
2006-06-10 11:57:03 +02:00
|
|
|
static HRESULT WINAPI IDirectMusicSynth8Impl_Unload (LPDIRECTMUSICSYNTH8 iface, HANDLE hDownload, HRESULT (CALLBACK* lpFreeHandle)(HANDLE,HANDLE), HANDLE hUserData) {
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectMusicSynth8Impl *This = (IDirectMusicSynth8Impl *)iface;
|
2003-06-07 02:39:18 +02:00
|
|
|
FIXME("(%p, %p, %p): stub\n", This, hDownload, hUserData);
|
|
|
|
return S_OK;
|
2003-04-08 23:42:00 +02:00
|
|
|
}
|
|
|
|
|
2006-06-10 11:57:03 +02:00
|
|
|
static HRESULT WINAPI IDirectMusicSynth8Impl_PlayBuffer (LPDIRECTMUSICSYNTH8 iface, REFERENCE_TIME rt, LPBYTE pbBuffer, DWORD cbBuffer) {
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectMusicSynth8Impl *This = (IDirectMusicSynth8Impl *)iface;
|
2006-10-08 18:59:31 +02:00
|
|
|
FIXME("(%p, 0x%s, %p, %d): stub\n", This, wine_dbgstr_longlong(rt), pbBuffer, cbBuffer);
|
2003-06-07 02:39:18 +02:00
|
|
|
return S_OK;
|
2003-04-08 23:42:00 +02:00
|
|
|
}
|
|
|
|
|
2006-06-10 11:57:03 +02:00
|
|
|
static HRESULT WINAPI IDirectMusicSynth8Impl_GetRunningStats (LPDIRECTMUSICSYNTH8 iface, LPDMUS_SYNTHSTATS pStats) {
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectMusicSynth8Impl *This = (IDirectMusicSynth8Impl *)iface;
|
2003-06-07 02:39:18 +02:00
|
|
|
FIXME("(%p, %p): stub\n", This, pStats);
|
|
|
|
return S_OK;
|
2003-04-08 23:42:00 +02:00
|
|
|
}
|
|
|
|
|
2006-06-10 11:57:03 +02:00
|
|
|
static HRESULT WINAPI IDirectMusicSynth8Impl_GetPortCaps (LPDIRECTMUSICSYNTH8 iface, LPDMUS_PORTCAPS pCaps) {
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectMusicSynth8Impl *This = (IDirectMusicSynth8Impl *)iface;
|
2003-07-22 00:10:14 +02:00
|
|
|
TRACE("(%p, %p)\n", This, pCaps);
|
|
|
|
*pCaps = This->pCaps;
|
2003-06-07 02:39:18 +02:00
|
|
|
return S_OK;
|
2003-04-08 23:42:00 +02:00
|
|
|
}
|
|
|
|
|
2006-06-10 11:57:03 +02:00
|
|
|
static HRESULT WINAPI IDirectMusicSynth8Impl_SetMasterClock (LPDIRECTMUSICSYNTH8 iface, IReferenceClock* pClock) {
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectMusicSynth8Impl *This = (IDirectMusicSynth8Impl *)iface;
|
2003-06-07 02:39:18 +02:00
|
|
|
FIXME("(%p, %p): stub\n", This, pClock);
|
|
|
|
return S_OK;
|
2003-04-08 23:42:00 +02:00
|
|
|
}
|
|
|
|
|
2006-06-10 11:57:03 +02:00
|
|
|
static HRESULT WINAPI IDirectMusicSynth8Impl_GetLatencyClock (LPDIRECTMUSICSYNTH8 iface, IReferenceClock** ppClock) {
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectMusicSynth8Impl *This = (IDirectMusicSynth8Impl *)iface;
|
2003-07-22 00:10:14 +02:00
|
|
|
TRACE("(%p, %p)\n", This, ppClock);
|
|
|
|
*ppClock = This->pLatencyClock;
|
2003-06-07 02:39:18 +02:00
|
|
|
return S_OK;
|
2003-04-08 23:42:00 +02:00
|
|
|
}
|
|
|
|
|
2006-06-10 11:57:03 +02:00
|
|
|
static HRESULT WINAPI IDirectMusicSynth8Impl_Activate (LPDIRECTMUSICSYNTH8 iface, BOOL fEnable) {
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectMusicSynth8Impl *This = (IDirectMusicSynth8Impl *)iface;
|
2003-07-22 00:10:14 +02:00
|
|
|
TRACE("(%p, %d)\n", This, fEnable);
|
|
|
|
This->fActive = fEnable;
|
2003-06-07 02:39:18 +02:00
|
|
|
return S_OK;
|
2003-04-08 23:42:00 +02:00
|
|
|
}
|
|
|
|
|
2006-06-10 11:57:03 +02:00
|
|
|
static HRESULT WINAPI IDirectMusicSynth8Impl_SetSynthSink (LPDIRECTMUSICSYNTH8 iface, IDirectMusicSynthSink* pSynthSink) {
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectMusicSynth8Impl *This = (IDirectMusicSynth8Impl *)iface;
|
2003-07-22 00:10:14 +02:00
|
|
|
TRACE("(%p, %p)\n", This, pSynthSink);
|
|
|
|
This->pSynthSink = (IDirectMusicSynthSinkImpl*)pSynthSink;
|
2003-06-07 02:39:18 +02:00
|
|
|
return S_OK;
|
2003-04-08 23:42:00 +02:00
|
|
|
}
|
|
|
|
|
2006-06-10 11:57:03 +02:00
|
|
|
static HRESULT WINAPI IDirectMusicSynth8Impl_Render (LPDIRECTMUSICSYNTH8 iface, short* pBuffer, DWORD dwLength, LONGLONG llPosition) {
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectMusicSynth8Impl *This = (IDirectMusicSynth8Impl *)iface;
|
2006-10-08 18:59:31 +02:00
|
|
|
FIXME("(%p, %p, %d, 0x%s): stub\n", This, pBuffer, dwLength, wine_dbgstr_longlong(llPosition));
|
2003-06-07 02:39:18 +02:00
|
|
|
return S_OK;
|
2003-04-08 23:42:00 +02:00
|
|
|
}
|
|
|
|
|
2006-06-10 11:57:03 +02:00
|
|
|
static HRESULT WINAPI IDirectMusicSynth8Impl_SetChannelPriority (LPDIRECTMUSICSYNTH8 iface, DWORD dwChannelGroup, DWORD dwChannel, DWORD dwPriority) {
|
2004-09-06 22:34:29 +02:00
|
|
|
/*IDirectMusicSynth8Impl *This = (IDirectMusicSynth8Impl *)iface; */
|
2003-07-22 00:10:14 +02:00
|
|
|
/* silenced because of too many messages - 1000 groups * 16 channels ;=) */
|
|
|
|
/*FIXME("(%p, %ld, %ld, %ld): stub\n", This, dwChannelGroup, dwChannel, dwPriority); */
|
2003-06-07 02:39:18 +02:00
|
|
|
return S_OK;
|
2003-04-08 23:42:00 +02:00
|
|
|
}
|
|
|
|
|
2006-06-10 11:57:03 +02:00
|
|
|
static HRESULT WINAPI IDirectMusicSynth8Impl_GetChannelPriority (LPDIRECTMUSICSYNTH8 iface, DWORD dwChannelGroup, DWORD dwChannel, LPDWORD pdwPriority) {
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectMusicSynth8Impl *This = (IDirectMusicSynth8Impl *)iface;
|
2006-10-08 18:59:31 +02:00
|
|
|
FIXME("(%p, %d, %d, %p): stub\n", This, dwChannelGroup, dwChannel, pdwPriority);
|
2003-06-07 02:39:18 +02:00
|
|
|
return S_OK;
|
2003-04-08 23:42:00 +02:00
|
|
|
}
|
|
|
|
|
2006-06-10 11:57:03 +02:00
|
|
|
static HRESULT WINAPI IDirectMusicSynth8Impl_GetFormat (LPDIRECTMUSICSYNTH8 iface, LPWAVEFORMATEX pWaveFormatEx, LPDWORD pdwWaveFormatExSiz) {
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectMusicSynth8Impl *This = (IDirectMusicSynth8Impl *)iface;
|
2003-06-07 02:39:18 +02:00
|
|
|
FIXME("(%p, %p, %p): stub\n", This, pWaveFormatEx, pdwWaveFormatExSiz);
|
|
|
|
return S_OK;
|
2003-04-08 23:42:00 +02:00
|
|
|
}
|
|
|
|
|
2006-06-10 11:57:03 +02:00
|
|
|
static HRESULT WINAPI IDirectMusicSynth8Impl_GetAppend (LPDIRECTMUSICSYNTH8 iface, DWORD* pdwAppend) {
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectMusicSynth8Impl *This = (IDirectMusicSynth8Impl *)iface;
|
2003-06-07 02:39:18 +02:00
|
|
|
FIXME("(%p, %p): stub\n", This, pdwAppend);
|
|
|
|
return S_OK;
|
2003-04-08 23:42:00 +02:00
|
|
|
}
|
|
|
|
|
2004-01-20 01:21:40 +01:00
|
|
|
/* IDirectMusicSynth8Impl IDirectMusicSynth8 part: */
|
2006-06-10 11:57:03 +02:00
|
|
|
static HRESULT WINAPI IDirectMusicSynth8Impl_PlayVoice (LPDIRECTMUSICSYNTH8 iface, REFERENCE_TIME rt, DWORD dwVoiceId, DWORD dwChannelGroup, DWORD dwChannel, DWORD dwDLId, long prPitch, long vrVolume, SAMPLE_TIME stVoiceStart, SAMPLE_TIME stLoopStart, SAMPLE_TIME stLoopEnd) {
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectMusicSynth8Impl *This = (IDirectMusicSynth8Impl *)iface;
|
2006-10-08 18:59:31 +02:00
|
|
|
FIXME("(%p, 0x%s, %d, %d, %d, %d, %li, %li,0x%s, 0x%s, 0x%s): stub\n",
|
2006-09-11 22:51:14 +02:00
|
|
|
This, wine_dbgstr_longlong(rt), dwVoiceId, dwChannelGroup, dwChannel, dwDLId, prPitch, vrVolume,
|
|
|
|
wine_dbgstr_longlong(stVoiceStart), wine_dbgstr_longlong(stLoopStart), wine_dbgstr_longlong(stLoopEnd));
|
2003-06-07 02:39:18 +02:00
|
|
|
return S_OK;
|
2003-04-08 23:42:00 +02:00
|
|
|
}
|
|
|
|
|
2006-06-10 11:57:03 +02:00
|
|
|
static HRESULT WINAPI IDirectMusicSynth8Impl_StopVoice (LPDIRECTMUSICSYNTH8 iface, REFERENCE_TIME rt, DWORD dwVoiceId) {
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectMusicSynth8Impl *This = (IDirectMusicSynth8Impl *)iface;
|
2006-10-08 18:59:31 +02:00
|
|
|
FIXME("(%p, 0x%s, %d): stub\n", This, wine_dbgstr_longlong(rt), dwVoiceId);
|
2003-06-07 02:39:18 +02:00
|
|
|
return S_OK;
|
2003-04-08 23:42:00 +02:00
|
|
|
}
|
|
|
|
|
2006-06-10 11:57:03 +02:00
|
|
|
static HRESULT WINAPI IDirectMusicSynth8Impl_GetVoiceState (LPDIRECTMUSICSYNTH8 iface, DWORD dwVoice[], DWORD cbVoice, DMUS_VOICE_STATE dwVoiceState[]) {
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectMusicSynth8Impl *This = (IDirectMusicSynth8Impl *)iface;
|
2006-10-08 18:59:31 +02:00
|
|
|
FIXME("(%p, %p, %d, %p): stub\n", This, dwVoice, cbVoice, dwVoiceState);
|
2003-06-07 02:39:18 +02:00
|
|
|
return S_OK;
|
2003-04-08 23:42:00 +02:00
|
|
|
}
|
|
|
|
|
2006-06-10 11:57:03 +02:00
|
|
|
static HRESULT WINAPI IDirectMusicSynth8Impl_Refresh (LPDIRECTMUSICSYNTH8 iface, DWORD dwDownloadID, DWORD dwFlags) {
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectMusicSynth8Impl *This = (IDirectMusicSynth8Impl *)iface;
|
2006-10-08 18:59:31 +02:00
|
|
|
FIXME("(%p, %d, %d): stub\n", This, dwDownloadID, dwFlags);
|
2003-06-07 02:39:18 +02:00
|
|
|
return S_OK;
|
2003-04-08 23:42:00 +02:00
|
|
|
}
|
|
|
|
|
2006-06-10 11:57:03 +02:00
|
|
|
static HRESULT WINAPI IDirectMusicSynth8Impl_AssignChannelToBuses (LPDIRECTMUSICSYNTH8 iface, DWORD dwChannelGroup, DWORD dwChannel, LPDWORD pdwBuses, DWORD cBuses) {
|
2004-09-06 22:34:29 +02:00
|
|
|
IDirectMusicSynth8Impl *This = (IDirectMusicSynth8Impl *)iface;
|
2006-10-08 18:59:31 +02:00
|
|
|
FIXME("(%p, %d, %d, %p, %d): stub\n", This, dwChannelGroup, dwChannel, pdwBuses, cBuses);
|
2003-06-07 02:39:18 +02:00
|
|
|
return S_OK;
|
2003-04-08 23:42:00 +02:00
|
|
|
}
|
|
|
|
|
2005-06-01 21:57:42 +02:00
|
|
|
static const IDirectMusicSynth8Vtbl DirectMusicSynth8_Vtbl = {
|
2003-04-08 23:42:00 +02:00
|
|
|
IDirectMusicSynth8Impl_QueryInterface,
|
|
|
|
IDirectMusicSynth8Impl_AddRef,
|
|
|
|
IDirectMusicSynth8Impl_Release,
|
|
|
|
IDirectMusicSynth8Impl_Open,
|
|
|
|
IDirectMusicSynth8Impl_Close,
|
|
|
|
IDirectMusicSynth8Impl_SetNumChannelGroups,
|
|
|
|
IDirectMusicSynth8Impl_Download,
|
|
|
|
IDirectMusicSynth8Impl_Unload,
|
|
|
|
IDirectMusicSynth8Impl_PlayBuffer,
|
|
|
|
IDirectMusicSynth8Impl_GetRunningStats,
|
|
|
|
IDirectMusicSynth8Impl_GetPortCaps,
|
|
|
|
IDirectMusicSynth8Impl_SetMasterClock,
|
|
|
|
IDirectMusicSynth8Impl_GetLatencyClock,
|
|
|
|
IDirectMusicSynth8Impl_Activate,
|
|
|
|
IDirectMusicSynth8Impl_SetSynthSink,
|
|
|
|
IDirectMusicSynth8Impl_Render,
|
|
|
|
IDirectMusicSynth8Impl_SetChannelPriority,
|
|
|
|
IDirectMusicSynth8Impl_GetChannelPriority,
|
|
|
|
IDirectMusicSynth8Impl_GetFormat,
|
|
|
|
IDirectMusicSynth8Impl_GetAppend,
|
|
|
|
IDirectMusicSynth8Impl_PlayVoice,
|
|
|
|
IDirectMusicSynth8Impl_StopVoice,
|
|
|
|
IDirectMusicSynth8Impl_GetVoiceState,
|
|
|
|
IDirectMusicSynth8Impl_Refresh,
|
|
|
|
IDirectMusicSynth8Impl_AssignChannelToBuses
|
|
|
|
};
|
|
|
|
|
2003-07-22 00:10:14 +02:00
|
|
|
/* for ClassFactory */
|
2004-01-20 01:21:40 +01:00
|
|
|
HRESULT WINAPI DMUSIC_CreateDirectMusicSynthImpl (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) {
|
|
|
|
IDirectMusicSynth8Impl *obj;
|
2003-07-22 00:10:14 +02:00
|
|
|
|
2004-01-20 01:21:40 +01:00
|
|
|
TRACE("(%p,%p,%p)\n", lpcGUID, ppobj, pUnkOuter);
|
|
|
|
obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicSynth8Impl));
|
|
|
|
if (NULL == obj) {
|
2008-11-02 00:24:07 +01:00
|
|
|
*ppobj = NULL;
|
2004-01-20 01:21:40 +01:00
|
|
|
return E_OUTOFMEMORY;
|
2003-04-08 23:42:00 +02:00
|
|
|
}
|
2004-01-20 01:21:40 +01:00
|
|
|
obj->lpVtbl = &DirectMusicSynth8_Vtbl;
|
|
|
|
obj->ref = 0;
|
|
|
|
/* fill in caps */
|
|
|
|
obj->pCaps.dwSize = sizeof(DMUS_PORTCAPS);
|
|
|
|
obj->pCaps.dwFlags = DMUS_PC_DLS | DMUS_PC_SOFTWARESYNTH | DMUS_PC_DIRECTSOUND | DMUS_PC_DLS2 | DMUS_PC_AUDIOPATH | DMUS_PC_WAVE;
|
|
|
|
obj->pCaps.guidPort = CLSID_DirectMusicSynth;
|
|
|
|
obj->pCaps.dwClass = DMUS_PC_OUTPUTCLASS;
|
|
|
|
obj->pCaps.dwType = DMUS_PORT_WINMM_DRIVER;
|
|
|
|
obj->pCaps.dwMemorySize = DMUS_PC_SYSTEMMEMORY;
|
|
|
|
obj->pCaps.dwMaxChannelGroups = 1000;
|
|
|
|
obj->pCaps.dwMaxVoices = 1000;
|
|
|
|
obj->pCaps.dwMaxAudioChannels = -1;
|
|
|
|
obj->pCaps.dwEffectFlags = DMUS_EFFECT_REVERB | DMUS_EFFECT_CHORUS | DMUS_EFFECT_DELAY;
|
|
|
|
MultiByteToWideChar (CP_ACP, 0, "Microsotf Synthesizer", -1, obj->pCaps.wszDescription, sizeof(obj->pCaps.wszDescription)/sizeof(WCHAR));
|
|
|
|
/* assign latency clock */
|
|
|
|
/*DMUSIC_CreateReferenceClockImpl (&IID_IReferenceClock, (LPVOID*)&This->pLatencyClock, NULL); */
|
|
|
|
|
|
|
|
return IDirectMusicSynth8Impl_QueryInterface ((LPDIRECTMUSICSYNTH8)obj, lpcGUID, ppobj);
|
2003-04-08 23:42:00 +02:00
|
|
|
}
|