Re: [DMUSIC10] resend of 'dmusic file: some improvements'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This time with patch :)
-- 
Rok Mandeljc <rok.mandeljc@gimb.org>

"All that is gold does not glitter,
Not all those who wander are lost;
The old that is strong does not wither,
Deep roots are not reached by the frost. 
From the ashes a fire shall be woken,
A light from the shadows shall spring;
Renewed shall be blade that was broken,
The crownless again shall be king."
	        -- J.R.R. Tolkien
Index: dmusic.c
===================================================================
RCS file: /home/wine/wine/dlls/dmusic/dmusic.c,v
retrieving revision 1.8
diff -u -r1.8 dmusic.c
--- dmusic.c	7 Jun 2003 00:39:18 -0000	1.8
+++ dmusic.c	25 Jun 2003 20:12:09 -0000
@@ -42,282 +42,24 @@
 
 WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
 
-/* IDirectMusic IUnknown parts follow: */
-HRESULT WINAPI IDirectMusicImpl_QueryInterface (LPDIRECTMUSIC iface, REFIID riid, LPVOID *ppobj)
-{
-	ICOM_THIS(IDirectMusicImpl,iface);
-
-	if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusic))
-	{
-		IDirectMusicImpl_AddRef(iface);
-		*ppobj = This;
-		return S_OK;
-	}
-	
-	if (IsEqualGUID(riid, &IID_IDirectMusic8))
-	{
-		IDirectMusic8Impl *dmusic8 = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusic8Impl));
-		if (NULL == dmusic8)
-		{
-			*ppobj = (LPDIRECTMUSIC8)NULL;
-			return E_OUTOFMEMORY;
-		}
-		dmusic8->lpVtbl = &DirectMusic8_Vtbl;
-		dmusic8->ref = 1;
-		*ppobj = (LPDIRECTMUSIC8)dmusic8;
-		return S_OK;
-	}
-	
-	WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
-	return E_NOINTERFACE;
-}
-
-ULONG WINAPI IDirectMusicImpl_AddRef (LPDIRECTMUSIC iface)
-{
-	ICOM_THIS(IDirectMusicImpl,iface);
-	TRACE("(%p) : AddRef from %ld\n", This, This->ref);
-	return ++(This->ref);
-}
-
-ULONG WINAPI   IDirectMusicImpl_Release (LPDIRECTMUSIC iface)
-{
-	ICOM_THIS(IDirectMusicImpl,iface);
-	ULONG ref = --This->ref;
-	TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
-	if (ref == 0)
-	{
-		HeapFree(GetProcessHeap(), 0, This);
-	}
-	return ref;
-}
-
-/* IDirectMusic Interface follow: */
-HRESULT WINAPI IDirectMusicImpl_EnumPort (LPDIRECTMUSIC iface, DWORD dwIndex, LPDMUS_PORTCAPS pPortCaps)
-{
-	ICOM_THIS(IDirectMusicImpl,iface);
-	int numMIDI = midiOutGetNumDevs();
-	int numWAVE = waveOutGetNumDevs();
-	int i;
-	
-	TRACE("(%p, %ld, %p)\n", This, dwIndex, pPortCaps);
-	TRACE("1 software synth. + %i WAVE + %i MIDI available\n", numWAVE, numMIDI);
-	/* i guess the first port shown is always software synthesizer */
-	if (dwIndex == 0)
-	{
-		TRACE("enumerating 'Microsoft Software Synthesizer' port\n");
-		pPortCaps->dwSize = sizeof(DMUS_PORTCAPS);
-		pPortCaps->dwFlags = DMUS_PC_DLS | DMUS_PC_SOFTWARESYNTH | DMUS_PC_DIRECTSOUND | DMUS_PC_DLS2 | DMUS_PC_AUDIOPATH | DMUS_PC_WAVE;
-		pPortCaps->guidPort = CLSID_DirectMusicSynth;
-		pPortCaps->dwClass = DMUS_PC_OUTPUTCLASS;
-		pPortCaps->dwType = DMUS_PORT_WINMM_DRIVER;
-		pPortCaps->dwMemorySize = DMUS_PC_SYSTEMMEMORY;
-		pPortCaps->dwMaxChannelGroups = 1; /* FIXME: dxdiag on windows seems to return 1000, but that kills my allocating engine; guess we'll live with 1 group */
-		pPortCaps->dwMaxVoices = 1000;
-		pPortCaps->dwMaxAudioChannels = -1;
-		pPortCaps->dwEffectFlags = DMUS_EFFECT_REVERB | DMUS_EFFECT_CHORUS | DMUS_EFFECT_DELAY;
-		MultiByteToWideChar (CP_ACP, 0, "Microsotf Synthesizer", -1, pPortCaps->wszDescription, sizeof(pPortCaps->wszDescription)/sizeof(WCHAR));
-		return S_OK;
-	}
-	/* then return digital sound ports */
-	for (i = 1; i <= numWAVE; i++)
-	{
-		TRACE("enumerating 'digital sound' ports\n");	
-		if (i == dwIndex)
-		{
-			DirectSoundEnumerateA((LPDSENUMCALLBACKA)register_waveport, (VOID*)pPortCaps);
-			return S_OK;	
-		}
-	}
-	/* finally, list all *real* MIDI ports*/
-	for (i = numWAVE+1; i <= numWAVE + numMIDI; i++) 
-	{
-		TRACE("enumerating 'real MIDI' ports\n");		
-		if (i == dwIndex)
-			FIXME("Found MIDI port, but *real* MIDI ports not supported yet\n");
-	}
-	
-	return S_FALSE;
-}
-
-HRESULT WINAPI IDirectMusicImpl_CreateMusicBuffer (LPDIRECTMUSIC iface, LPDMUS_BUFFERDESC pBufferDesc, LPDIRECTMUSICBUFFER** ppBuffer, LPUNKNOWN pUnkOuter)
-{	
-	ICOM_THIS(IDirectMusicImpl,iface);
-
-	FIXME("(%p, %p, %p, %p): stub\n", This, pBufferDesc, ppBuffer, pUnkOuter);
-	
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicImpl_CreatePort (LPDIRECTMUSIC iface, REFCLSID rclsidPort, LPDMUS_PORTPARAMS pPortParams, LPDIRECTMUSICPORT* ppPort, LPUNKNOWN pUnkOuter)
-{
-	ICOM_THIS(IDirectMusicImpl,iface);
-	int i, j;
-	DMUS_PORTCAPS PortCaps;
-	
-	TRACE("(%p, %s, %p, %p, %p)\n", This, debugstr_guid(rclsidPort), pPortParams, ppPort, pUnkOuter);
-	for (i = 0; IDirectMusicImpl_EnumPort (iface, i, &PortCaps) != S_FALSE; i++)
-	{				
-		if (IsEqualGUID(rclsidPort, &PortCaps.guidPort))
-		{		
-			This->ports = HeapReAlloc(GetProcessHeap(),0,This->ports,sizeof(LPDIRECTMUSICPORT)*(This->nrofports+1));
-			if (NULL == This->ports[This->nrofports])
-			{
-				*ppPort = (LPDIRECTMUSICPORT)NULL;
-				return E_OUTOFMEMORY;
-			}
-			This->ports[This->nrofports]->lpVtbl = &DirectMusicPort_Vtbl;
-			This->ports[This->nrofports]->ref = 0;
-			This->ports[This->nrofports]->active = FALSE;
-			This->ports[This->nrofports]->caps = &PortCaps;
-			This->ports[This->nrofports]->params = pPortParams; /* this one is here just because there's a funct. which retrieves it back */
-			
-			if (pPortParams->dwValidParams & DMUS_PORTPARAMS_CHANNELGROUPS)
-			{
-				This->ports[This->nrofports]->nrofgroups = pPortParams->dwChannelGroups;
-				/* setting default priorities */			
-				for (j = 0; j < This->ports[This->nrofports]->nrofgroups; j++)
-				{
-					TRACE ("Setting default channel priorities on channel group %i\n", j+1);
-					This->ports[This->nrofports]->group[j].channel[0].priority = DAUD_CHAN1_DEF_VOICE_PRIORITY;
-					This->ports[This->nrofports]->group[j].channel[1].priority = DAUD_CHAN2_DEF_VOICE_PRIORITY;
-					This->ports[This->nrofports]->group[j].channel[2].priority = DAUD_CHAN3_DEF_VOICE_PRIORITY;
-					This->ports[This->nrofports]->group[j].channel[3].priority = DAUD_CHAN4_DEF_VOICE_PRIORITY;
-					This->ports[This->nrofports]->group[j].channel[4].priority = DAUD_CHAN5_DEF_VOICE_PRIORITY;
-					This->ports[This->nrofports]->group[j].channel[5].priority = DAUD_CHAN6_DEF_VOICE_PRIORITY;
-					This->ports[This->nrofports]->group[j].channel[6].priority = DAUD_CHAN7_DEF_VOICE_PRIORITY;
-					This->ports[This->nrofports]->group[j].channel[7].priority = DAUD_CHAN8_DEF_VOICE_PRIORITY;
-					This->ports[This->nrofports]->group[j].channel[8].priority = DAUD_CHAN9_DEF_VOICE_PRIORITY;
-					This->ports[This->nrofports]->group[j].channel[9].priority = DAUD_CHAN10_DEF_VOICE_PRIORITY;
-					This->ports[This->nrofports]->group[j].channel[10].priority = DAUD_CHAN11_DEF_VOICE_PRIORITY;
-					This->ports[This->nrofports]->group[j].channel[11].priority = DAUD_CHAN12_DEF_VOICE_PRIORITY;
-					This->ports[This->nrofports]->group[j].channel[12].priority = DAUD_CHAN13_DEF_VOICE_PRIORITY;
-					This->ports[This->nrofports]->group[j].channel[13].priority = DAUD_CHAN14_DEF_VOICE_PRIORITY;
-					This->ports[This->nrofports]->group[j].channel[14].priority = DAUD_CHAN15_DEF_VOICE_PRIORITY;
-					This->ports[This->nrofports]->group[j].channel[15].priority = DAUD_CHAN16_DEF_VOICE_PRIORITY;
-				}
-			}
-		
-
-
-			*ppPort = (LPDIRECTMUSICPORT)This->ports[This->nrofports];
-			IDirectMusicPortImpl_AddRef ((LPDIRECTMUSICPORT)This->ports[This->nrofports]);
-			This->nrofports ++;
-			return S_OK;			
-		}
-	}
-	/* FIXME: place correct error here */
-	return E_NOINTERFACE;
-}
-
-HRESULT WINAPI IDirectMusicImpl_EnumMasterClock (LPDIRECTMUSIC iface, DWORD dwIndex, LPDMUS_CLOCKINFO lpClockInfo)
-{
-	ICOM_THIS(IDirectMusicImpl,iface);
-
-	FIXME("(%p, %ld, %p): stub\n", This, dwIndex, lpClockInfo);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicImpl_GetMasterClock (LPDIRECTMUSIC iface, LPGUID pguidClock, IReferenceClock** ppReferenceClock)
-{
-	ICOM_THIS(IDirectMusicImpl,iface);
-	
-	FIXME("(%p, %p, %p): stub\n", This, pguidClock, ppReferenceClock);
-	
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicImpl_SetMasterClock (LPDIRECTMUSIC iface, REFGUID rguidClock)
-{
-	ICOM_THIS(IDirectMusicImpl,iface);
-	
-	FIXME("(%p, %s): stub\n", This, debugstr_guid(rguidClock));
-	
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicImpl_Activate (LPDIRECTMUSIC iface, BOOL fEnable)
-{
-	ICOM_THIS(IDirectMusicImpl,iface);
-	int i;
-	
-	TRACE("(%p, %i)", This,  fEnable);	
-	for (i = 0; i < This->nrofports; i++)	
-	{
-		This->ports[i]->active = fEnable;
-	}
-	
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicImpl_GetDefaultPort (LPDIRECTMUSIC iface, LPGUID pguidPort)
-{
-	ICOM_THIS(IDirectMusicImpl,iface);
-	HKEY hkGUID;
-	DWORD returnTypeGUID, sizeOfReturnBuffer = 50;
-	char returnBuffer[51];
-	GUID defaultPortGUID;
-	WCHAR    buff[51];
-
-	TRACE("(%p, %p)\n", This, pguidPort);
-	if ((RegOpenKeyExA (HKEY_LOCAL_MACHINE, "Software\\Microsoft\\DirectMusic\\Defaults" , 0, KEY_READ, &hkGUID) != ERROR_SUCCESS) || (RegQueryValueExA (hkGUID, "DefaultOutputPort", NULL, &returnTypeGUID, returnBuffer, &sizeOfReturnBuffer) != ERROR_SUCCESS))
-	{
-		WARN(": registry entry missing\n" );
-		*pguidPort = CLSID_DirectMusicSynth;
-		return S_OK;
-	}
-	/* FIXME: Check return types to ensure we're interpreting data right */
-	MultiByteToWideChar (CP_ACP, 0, returnBuffer, -1, buff, sizeof(buff)/sizeof(WCHAR));
-	CLSIDFromString ((LPCOLESTR)buff, &defaultPortGUID);
-	*pguidPort = defaultPortGUID;
-	
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicImpl_SetDirectSound (LPDIRECTMUSIC iface, LPDIRECTSOUND pDirectSound, HWND hWnd)
-{
-	ICOM_THIS(IDirectMusicImpl,iface);
-
-	FIXME("(%p, %p, %p): stub\n", This, pDirectSound, hWnd);
-
-	return S_OK;
-}
-
-ICOM_VTABLE(IDirectMusic) DirectMusic_Vtbl =
-{
-    ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
-	IDirectMusicImpl_QueryInterface,
-	IDirectMusicImpl_AddRef,
-	IDirectMusicImpl_Release,
-	IDirectMusicImpl_EnumPort,
-	IDirectMusicImpl_CreateMusicBuffer,
-	IDirectMusicImpl_CreatePort,
-	IDirectMusicImpl_EnumMasterClock,
-	IDirectMusicImpl_GetMasterClock,
-	IDirectMusicImpl_SetMasterClock,
-	IDirectMusicImpl_Activate,
-	IDirectMusicImpl_GetDefaultPort,
-	IDirectMusicImpl_SetDirectSound
-};
-
 /* for ClassFactory */
 HRESULT WINAPI DMUSIC_CreateDirectMusic (LPCGUID lpcGUID, LPDIRECTMUSIC *ppDM, LPUNKNOWN pUnkOuter)
 {
-	IDirectMusicImpl *dmusic;
+	IDirectMusic8Impl *dmusic;
 
 	TRACE("(%p,%p,%p)\n",lpcGUID, ppDM, pUnkOuter);
-	if (IsEqualGUID(lpcGUID, &IID_IDirectMusic))
-	{
-		dmusic = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicImpl));
-		if (NULL == dmusic)
-		{
-			*ppDM = (LPDIRECTMUSIC)NULL;
-			return E_OUTOFMEMORY;
-		}
-		dmusic->lpVtbl = &DirectMusic_Vtbl;
-		dmusic->ref = 1;
-		*ppDM = (LPDIRECTMUSIC)dmusic;
-		return S_OK;
+	if (IsEqualGUID(lpcGUID, &IID_IDirectMusic) ||
+	    IsEqualGUID(lpcGUID, &IID_IDirectMusic2) ||
+	    IsEqualGUID(lpcGUID, &IID_IDirectMusic8)) {
+	  dmusic = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusic8Impl));
+	  if (NULL == dmusic) {
+	    *ppDM = (LPDIRECTMUSIC) NULL;
+	    return E_OUTOFMEMORY;
+	  }
+	  dmusic->lpVtbl = &DirectMusic8_Vtbl;
+	  dmusic->ref = 1;
+	  *ppDM = (LPDIRECTMUSIC) dmusic;
+	  return S_OK;
 	}
 	WARN("No interface found\n");
 	
@@ -330,7 +72,9 @@
 {
 	ICOM_THIS(IDirectMusic8Impl,iface);
 
-	if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusic8))
+	if (IsEqualGUID(riid, &IID_IUnknown) || 
+	    IsEqualGUID(riid, &IID_IDirectMusic2) ||
+	    IsEqualGUID(riid, &IID_IDirectMusic8))
 	{
 		IDirectMusic8Impl_AddRef(iface);
 		*ppobj = This;
@@ -360,7 +104,7 @@
 }
 
 /* IDirectMusic8 Interface follow: */
-HRESULT WINAPI IDirectMusic8Impl_EnumPort (LPDIRECTMUSIC8 iface, DWORD dwIndex, LPDMUS_PORTCAPS pPortCaps)
+HRESULT WINAPI IDirectMusic8Impl_EnumPort(LPDIRECTMUSIC8 iface, DWORD dwIndex, LPDMUS_PORTCAPS pPortCaps)
 {
 	ICOM_THIS(IDirectMusic8Impl,iface);
 	int numMIDI = midiOutGetNumDevs();
@@ -370,7 +114,7 @@
 	TRACE("(%p, %ld, %p)\n", This, dwIndex, pPortCaps);
 	TRACE("1 software synth. + %i WAVE + %i MIDI available\n", numWAVE, numMIDI);
 	/* i guess the first port shown is always software synthesizer */
-	if (dwIndex == 0)
+	if (dwIndex == 0) 
 	{
 		TRACE("enumerating 'Microsoft Software Synthesizer' port\n");
 		pPortCaps->dwSize = sizeof(DMUS_PORTCAPS);
@@ -383,7 +127,7 @@
 		pPortCaps->dwMaxVoices = 1000;
 		pPortCaps->dwMaxAudioChannels = -1;
 		pPortCaps->dwEffectFlags = DMUS_EFFECT_REVERB | DMUS_EFFECT_CHORUS | DMUS_EFFECT_DELAY;
-		MultiByteToWideChar (CP_ACP, 0, "Microsotf Synthesizer", -1, pPortCaps->wszDescription, sizeof(pPortCaps->wszDescription)/sizeof(WCHAR));
+		MultiByteToWideChar(CP_ACP, 0, "Microsotf Synthesizer", -1, pPortCaps->wszDescription, sizeof(pPortCaps->wszDescription)/sizeof(WCHAR));
 		return S_OK;
 	}
 	/* then return digital sound ports */
@@ -392,12 +136,12 @@
 		TRACE("enumerating 'digital sound' ports\n");	
 		if (i == dwIndex)
 		{
-			DirectSoundEnumerateA((LPDSENUMCALLBACKA)register_waveport, (VOID*)pPortCaps);
+			DirectSoundEnumerateA((LPDSENUMCALLBACKA) register_waveport, (VOID*) pPortCaps);
 			return S_OK;	
 		}
 	}
 	/* finally, list all *real* MIDI ports*/
-	for (i = numWAVE+1; i <= numWAVE + numMIDI; i++) 
+	for (i = numWAVE + 1; i <= numWAVE + numMIDI; i++) 
 	{
 		TRACE("enumerating 'real MIDI' ports\n");		
 		if (i == dwIndex)
@@ -419,17 +163,14 @@
 HRESULT WINAPI IDirectMusic8Impl_CreatePort (LPDIRECTMUSIC8 iface, REFCLSID rclsidPort, LPDMUS_PORTPARAMS pPortParams, LPDIRECTMUSICPORT* ppPort, LPUNKNOWN pUnkOuter)
 {
 	ICOM_THIS(IDirectMusic8Impl,iface);
-	int i;
+	int i, j;
 	DMUS_PORTCAPS PortCaps;
 	
 	TRACE("(%p, %s, %p, %p, %p)\n", This, debugstr_guid(rclsidPort), pPortParams, ppPort, pUnkOuter);
-	for (i = 0; IDirectMusic8Impl_EnumPort (iface, i, &PortCaps) != S_FALSE; i++)
-	{				
-		if (IsEqualGUID(rclsidPort, &PortCaps.guidPort))
-		{		
-			This->ports = HeapReAlloc(GetProcessHeap(),0,This->ports,sizeof(LPDIRECTMUSICPORT)*This->nrofports);
-			if (NULL == This->ports[This->nrofports])
-			{
+	for (i = 0; S_FALSE != IDirectMusic8Impl_EnumPort(iface, i, &PortCaps); i++) {				
+		if (IsEqualGUID(rclsidPort, &PortCaps.guidPort)) {		
+			This->ports = HeapReAlloc(GetProcessHeap(), 0, This->ports, sizeof(LPDIRECTMUSICPORT) * This->nrofports);
+			if (NULL == This->ports[This->nrofports]) {
 				*ppPort = (LPDIRECTMUSICPORT)NULL;
 				return E_OUTOFMEMORY;
 			}
@@ -437,10 +178,35 @@
 			This->ports[This->nrofports]->ref = 0;
 			This->ports[This->nrofports]->active = FALSE;
 			This->ports[This->nrofports]->caps = &PortCaps;
-			This->ports[This->nrofports]->params = pPortParams;
-			*ppPort = (LPDIRECTMUSICPORT)This->ports[This->nrofports];
-			IDirectMusicPortImpl_AddRef ((LPDIRECTMUSICPORT)This->ports[This->nrofports]);
-			This->nrofports ++;
+			This->ports[This->nrofports]->params = pPortParams; /* this one is here just because there's a funct. which retrieves it back */
+			
+			if (pPortParams->dwValidParams & DMUS_PORTPARAMS_CHANNELGROUPS) {
+				This->ports[This->nrofports]->nrofgroups = pPortParams->dwChannelGroups;
+				/* setting default priorities */			
+				for (j = 0; j < This->ports[This->nrofports]->nrofgroups; j++) {
+					TRACE ("Setting default channel priorities on channel group %i\n", j + 1);
+					This->ports[This->nrofports]->group[j].channel[0].priority = DAUD_CHAN1_DEF_VOICE_PRIORITY;
+					This->ports[This->nrofports]->group[j].channel[1].priority = DAUD_CHAN2_DEF_VOICE_PRIORITY;
+					This->ports[This->nrofports]->group[j].channel[2].priority = DAUD_CHAN3_DEF_VOICE_PRIORITY;
+					This->ports[This->nrofports]->group[j].channel[3].priority = DAUD_CHAN4_DEF_VOICE_PRIORITY;
+					This->ports[This->nrofports]->group[j].channel[4].priority = DAUD_CHAN5_DEF_VOICE_PRIORITY;
+					This->ports[This->nrofports]->group[j].channel[5].priority = DAUD_CHAN6_DEF_VOICE_PRIORITY;
+					This->ports[This->nrofports]->group[j].channel[6].priority = DAUD_CHAN7_DEF_VOICE_PRIORITY;
+					This->ports[This->nrofports]->group[j].channel[7].priority = DAUD_CHAN8_DEF_VOICE_PRIORITY;
+					This->ports[This->nrofports]->group[j].channel[8].priority = DAUD_CHAN9_DEF_VOICE_PRIORITY;
+					This->ports[This->nrofports]->group[j].channel[9].priority = DAUD_CHAN10_DEF_VOICE_PRIORITY;
+					This->ports[This->nrofports]->group[j].channel[10].priority = DAUD_CHAN11_DEF_VOICE_PRIORITY;
+					This->ports[This->nrofports]->group[j].channel[11].priority = DAUD_CHAN12_DEF_VOICE_PRIORITY;
+					This->ports[This->nrofports]->group[j].channel[12].priority = DAUD_CHAN13_DEF_VOICE_PRIORITY;
+					This->ports[This->nrofports]->group[j].channel[13].priority = DAUD_CHAN14_DEF_VOICE_PRIORITY;
+					This->ports[This->nrofports]->group[j].channel[14].priority = DAUD_CHAN15_DEF_VOICE_PRIORITY;
+					This->ports[This->nrofports]->group[j].channel[15].priority = DAUD_CHAN16_DEF_VOICE_PRIORITY;
+				}
+			}
+
+			*ppPort = (LPDIRECTMUSICPORT) This->ports[This->nrofports];
+			IDirectMusicPortImpl_AddRef((LPDIRECTMUSICPORT) This->ports[This->nrofports]);
+			This->nrofports++;
 			return S_OK;			
 		}
 	}
@@ -496,18 +262,19 @@
 	DWORD returnTypeGUID, sizeOfReturnBuffer = 50;
 	char returnBuffer[51];
 	GUID defaultPortGUID;
-	WCHAR    buff[51];
+	WCHAR buff[51];
 
 	TRACE("(%p, %p)\n", This, pguidPort);
-	if ((RegOpenKeyExA (HKEY_LOCAL_MACHINE, "Software\\Microsoft\\DirectMusic\\Defaults" , 0, KEY_READ, &hkGUID) != ERROR_SUCCESS) || (RegQueryValueExA (hkGUID, "DefaultOutputPort", NULL, &returnTypeGUID, returnBuffer, &sizeOfReturnBuffer) != ERROR_SUCCESS))
+	if ((RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\DirectMusic\\Defaults" , 0, KEY_READ, &hkGUID) != ERROR_SUCCESS) || 
+	    (RegQueryValueExA(hkGUID, "DefaultOutputPort", NULL, &returnTypeGUID, returnBuffer, &sizeOfReturnBuffer) != ERROR_SUCCESS))
 	{
 		WARN(": registry entry missing\n" );
 		*pguidPort = CLSID_DirectMusicSynth;
 		return S_OK;
 	}
 	/* FIXME: Check return types to ensure we're interpreting data right */
-	MultiByteToWideChar (CP_ACP, 0, returnBuffer, -1, buff, sizeof(buff)/sizeof(WCHAR));
-	CLSIDFromString ((LPCOLESTR)buff, &defaultPortGUID);
+	MultiByteToWideChar(CP_ACP, 0, returnBuffer, -1, buff, sizeof(buff) / sizeof(WCHAR));
+	CLSIDFromString((LPCOLESTR) buff, &defaultPortGUID);
 	*pguidPort = defaultPortGUID;
 	
 	return S_OK;
Index: dmusic_loader.c
===================================================================
RCS file: /home/wine/wine/dlls/dmusic/dmusic_loader.c,v
retrieving revision 1.7
diff -u -r1.7 dmusic_loader.c
--- dmusic_loader.c	24 Jun 2003 02:26:07 -0000	1.7
+++ dmusic_loader.c	25 Jun 2003 20:12:09 -0000
@@ -30,151 +30,14 @@
 
 WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
 
-/* IDirectMusicLoader IUnknown parts follow: */
-HRESULT WINAPI IDirectMusicLoaderImpl_QueryInterface (LPDIRECTMUSICLOADER iface, REFIID riid, LPVOID *ppobj)
-{
-	ICOM_THIS(IDirectMusicLoaderImpl,iface);
-
-	if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicLoader))
-	{
-		IDirectMusicLoaderImpl_AddRef(iface);
-		*ppobj = This;
-		return S_OK;
-	}
-	WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
-	return E_NOINTERFACE;
-}
-
-ULONG WINAPI IDirectMusicLoaderImpl_AddRef (LPDIRECTMUSICLOADER iface)
-{
-	ICOM_THIS(IDirectMusicLoaderImpl,iface);
-	TRACE("(%p) : AddRef from %ld\n", This, This->ref);
-	return ++(This->ref);
-}
-
-ULONG WINAPI IDirectMusicLoaderImpl_Release (LPDIRECTMUSICLOADER iface)
-{
-	ICOM_THIS(IDirectMusicLoaderImpl,iface);
-	ULONG ref = --This->ref;
-	TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
-	if (ref == 0)
-	{
-		HeapFree(GetProcessHeap(), 0, This);
-	}
-	return ref;
-}
-
-/* IDirectMusicLoader Interface follow: */
-HRESULT WINAPI IDirectMusicLoaderImpl_GetObject (LPDIRECTMUSICLOADER iface, LPDMUS_OBJECTDESC pDesc, REFIID riid, LPVOID* ppv)
-{
-	ICOM_THIS(IDirectMusicLoaderImpl,iface);
-
-	FIXME("(%p, %p, %s, %p): stub\n", This, pDesc, debugstr_guid(riid), ppv);
-
-	*ppv = NULL;
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicLoaderImpl_SetObject (LPDIRECTMUSICLOADER iface, LPDMUS_OBJECTDESC pDesc)
-{
-	ICOM_THIS(IDirectMusicLoaderImpl,iface);
-
-	FIXME("(%p, %p): stub\n", This, pDesc);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicLoaderImpl_SetSearchDirectory (LPDIRECTMUSICLOADER iface, REFGUID rguidClass, WCHAR* pwzPath, BOOL fClear)
-{
-       ICOM_THIS(IDirectMusicLoaderImpl,iface);
-       
-	FIXME("(%p, %s, %p, %d): to check\n", This, debugstr_guid(rguidClass), pwzPath, fClear);
-
-        if (0 == strncmpW(This->searchPath, pwzPath, MAX_PATH)) {
-         return S_FALSE;
-       } 
-       strncpyW(This->searchPath, pwzPath, MAX_PATH);
-       return DS_OK;
-}
-
-HRESULT WINAPI IDirectMusicLoaderImpl_ScanDirectory (LPDIRECTMUSICLOADER iface, REFGUID rguidClass, WCHAR* pwzFileExtension, WCHAR* pwzScanFileName)
-{
-	ICOM_THIS(IDirectMusicLoaderImpl,iface);
-
-	FIXME("(%p, %s, %p, %p): stub\n", This, debugstr_guid(rguidClass), pwzFileExtension, pwzScanFileName);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicLoaderImpl_CacheObject (LPDIRECTMUSICLOADER iface, IDirectMusicObject* pObject)
-{
-	ICOM_THIS(IDirectMusicLoaderImpl,iface);
-
-	FIXME("(%p, %p): stub\n", This, pObject);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicLoaderImpl_ReleaseObject (LPDIRECTMUSICLOADER iface, IDirectMusicObject* pObject)
-{
-	ICOM_THIS(IDirectMusicLoaderImpl,iface);
-
-	FIXME("(%p, %p): stub\n", This, pObject);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicLoaderImpl_ClearCache (LPDIRECTMUSICLOADER iface, REFGUID rguidClass)
-{
-	ICOM_THIS(IDirectMusicLoaderImpl,iface);
-
-	FIXME("(%p,%s): stub\n", This, debugstr_guid(rguidClass));
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicLoaderImpl_EnableCache (LPDIRECTMUSICLOADER iface, REFGUID rguidClass, BOOL fEnable)
-{
-	ICOM_THIS(IDirectMusicLoaderImpl,iface);
-
-	FIXME("(%p, %s, %d): stub\n", This, debugstr_guid(rguidClass), fEnable);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicLoaderImpl_EnumObject (LPDIRECTMUSICLOADER iface, REFGUID rguidClass, DWORD dwIndex, LPDMUS_OBJECTDESC pDesc)
-{
-	ICOM_THIS(IDirectMusicLoaderImpl,iface);
-
-	FIXME("(%p, %s, %ld, %p): stub\n", This, debugstr_guid(rguidClass), dwIndex, pDesc);
-
-	return S_OK;
-}
-
-ICOM_VTABLE(IDirectMusicLoader) DirectMusicLoader_Vtbl =
-{
-    ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
-	IDirectMusicLoaderImpl_QueryInterface,
-	IDirectMusicLoaderImpl_AddRef,
-	IDirectMusicLoaderImpl_Release,
-	IDirectMusicLoaderImpl_GetObject,
-	IDirectMusicLoaderImpl_SetObject,
-	IDirectMusicLoaderImpl_SetSearchDirectory,
-	IDirectMusicLoaderImpl_ScanDirectory,
-	IDirectMusicLoaderImpl_CacheObject,
-	IDirectMusicLoaderImpl_ReleaseObject,
-	IDirectMusicLoaderImpl_ClearCache,
-	IDirectMusicLoaderImpl_EnableCache,
-	IDirectMusicLoaderImpl_EnumObject
-};
-
-
-/* IDirectMusicLoader8 IUnknown parts follow: */
+/* IDirectMusicLoader8 IUnknown part follow: */
 HRESULT WINAPI IDirectMusicLoader8Impl_QueryInterface (LPDIRECTMUSICLOADER8 iface, REFIID riid, LPVOID *ppobj)
 {
 	ICOM_THIS(IDirectMusicLoader8Impl,iface);
 
-	if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicLoader8))
+	if (IsEqualGUID(riid, &IID_IUnknown) || 
+	    IsEqualGUID(riid, &IID_IDirectMusicLoader) ||
+	    IsEqualGUID(riid, &IID_IDirectMusicLoader8))
 	{
 		IDirectMusicLoader8Impl_AddRef(iface);
 		*ppobj = This;
@@ -204,13 +67,20 @@
 }
 
 /* IDirectMusicLoader Interface part follow: */
-HRESULT WINAPI IDirectMusicLoader8Impl_GetObject (LPDIRECTMUSICLOADER8 iface, LPDMUS_OBJECTDESC pDesc, REFIID riid, LPVOID*ppv)
+HRESULT WINAPI IDirectMusicLoader8Impl_GetObject (LPDIRECTMUSICLOADER8 iface, LPDMUS_OBJECTDESC pDesc, REFIID riid, LPVOID* ppv)
 {
 	ICOM_THIS(IDirectMusicLoader8Impl,iface);
 	
 	FIXME("(%p, %p, %s, %p): stub\n", This, pDesc, debugstr_guid(riid), ppv);
 
-	*ppv = NULL;
+	if (IsEqualGUID(riid, &IID_IDirectMusicScript)) {
+	  IDirectMusicScriptImpl* script;
+	  script = (IDirectMusicScriptImpl*) HeapAlloc(GetProcessHeap(), 0, sizeof(IDirectMusicScriptImpl));
+	  script->lpVtbl = &DirectMusicScript_Vtbl;
+	  script->ref = 1;
+	  *ppv = script;
+	}
+
 	return DS_OK;
 }
 
@@ -227,9 +97,13 @@
 {
 	ICOM_THIS(IDirectMusicLoader8Impl,iface);
 
-	FIXME("(%p, %s, %p, %d): forward to IDirectMusicLoaderImpl::SetSearchDirectory\n", This, debugstr_guid(rguidClass), pwzPath, fClear);
+	FIXME("(%p, %s, %p, %d): to check\n", This, debugstr_guid(rguidClass), pwzPath, fClear);
 
-        return IDirectMusicLoaderImpl_SetSearchDirectory((LPDIRECTMUSICLOADER) iface, rguidClass, pwzPath, fClear);
+        if (0 == strncmpW(This->searchPath, pwzPath, MAX_PATH)) {
+	  return S_FALSE;
+	} 
+	strncpyW(This->searchPath, pwzPath, MAX_PATH);
+	return DS_OK;
 }
 
 HRESULT WINAPI IDirectMusicLoader8Impl_ScanDirectory (LPDIRECTMUSICLOADER8 iface, REFGUID rguidClass, WCHAR* pwzFileExtension, WCHAR* pwzScanFileName)
@@ -303,9 +177,6 @@
 	return S_OK;
 }
 
-extern ICOM_VTABLE(IDirectMusicSegment) DirectMusicSegment_Vtbl;
-extern ICOM_VTABLE(IDirectMusicSegment8) DirectMusicSegment8_Vtbl;
-
 HRESULT WINAPI IDirectMusicLoader8Impl_LoadObjectFromFile (LPDIRECTMUSICLOADER8 iface, 
 							   REFGUID rguidClassID, 
 							   REFIID iidInterfaceID, 
@@ -402,12 +273,11 @@
 	IDirectMusicLoader8Impl *dmloader8;
 
 	TRACE("(%p,%p,%p)\n",lpcGUID, ppDMLoad8, pUnkOuter);
-	if (IsEqualGUID(lpcGUID, &IID_IDirectMusicLoader)
-	  || IsEqualGUID(lpcGUID, &IID_IDirectMusicLoader8))
+	if (IsEqualGUID(lpcGUID, &IID_IDirectMusicLoader) || 
+	    IsEqualGUID(lpcGUID, &IID_IDirectMusicLoader8))
 	{
-		dmloader8 = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicImpl));
-		if (NULL == dmloader8)
-		{
+		dmloader8 = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicLoader8Impl));
+		if (NULL == dmloader8) {
 			*ppDMLoad8 = (LPDIRECTMUSICLOADER8)NULL;
 			return E_OUTOFMEMORY;
 		}
@@ -427,7 +297,8 @@
 {
 	ICOM_THIS(IDirectMusicGetLoaderImpl,iface);
 
-	if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicGetLoader))
+	if (IsEqualGUID(riid, &IID_IUnknown) || 
+	    IsEqualGUID(riid, &IID_IDirectMusicGetLoader))
 	{
 		IDirectMusicGetLoaderImpl_AddRef(iface);
 		*ppobj = This;
Index: dmusic_main.c
===================================================================
RCS file: /home/wine/wine/dlls/dmusic/dmusic_main.c,v
retrieving revision 1.5
diff -u -r1.5 dmusic_main.c
--- dmusic_main.c	13 Jun 2003 18:59:51 -0000	1.5
+++ dmusic_main.c	25 Jun 2003 20:12:10 -0000
@@ -61,13 +61,13 @@
 	ICOM_THIS(IClassFactoryImpl,iface);
 
 	TRACE ("(%p)->(%p,%s,%p)\n", This, pOuter, debugstr_guid(riid), ppobj);
-	if (IsEqualGUID (&IID_IDirectMusic, riid)) {
-	  return DMUSIC_CreateDirectMusic (riid, (LPDIRECTMUSIC*) ppobj, pOuter);
+	if (IsEqualGUID (&IID_IDirectMusic, riid) ||
+	    IsEqualGUID (&IID_IDirectMusic2, riid) ||
+	    IsEqualGUID (&IID_IDirectMusic8, riid)) {
+	  return DMUSIC_CreateDirectMusic(riid, (LPDIRECTMUSIC*) ppobj, pOuter);
 	}
 	if (IsEqualGUID (&IID_IDirectMusicPerformance, riid) ||
-	    IsEqualGUID (&IID_IDirectMusicPerformance8, riid))
-	{
-	  /*return DMUSIC_CreateDirectMusicPerformance (riid, (LPDIRECTMUSICPERFORMANCE*) ppobj, pOuter);*/
+	    IsEqualGUID (&IID_IDirectMusicPerformance8, riid)) {
 	  return DMUSIC_CreateDirectMusicPerformance8(riid, (LPDIRECTMUSICPERFORMANCE8*) ppobj, pOuter);
 
 	}
Index: dmusic_misc.c
===================================================================
RCS file: /home/wine/wine/dlls/dmusic/dmusic_misc.c,v
retrieving revision 1.4
diff -u -r1.4 dmusic_misc.c
--- dmusic_misc.c	16 Jun 2003 20:26:50 -0000	1.4
+++ dmusic_misc.c	25 Jun 2003 20:12:11 -0000
@@ -41,13 +41,14 @@
 {
 	ICOM_THIS(IReferenceClockImpl,iface);
 
-	if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IReferenceClock))
+	if (IsEqualGUID(riid, &IID_IUnknown) || 
+	    IsEqualGUID(riid, &IID_IReferenceClock))
 	{
 		IReferenceClockImpl_AddRef(iface);
 		*ppobj = This;
 		return S_OK;
 	}
-	WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
+	WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
 	return E_NOINTERFACE;
 }
 
@@ -125,13 +126,14 @@
 {
 	ICOM_THIS(IDirectMusicThruImpl,iface);
 
-	if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicThru))
+	if (IsEqualGUID(riid, &IID_IUnknown) || 
+	    IsEqualGUID(riid, &IID_IDirectMusicThru))
 	{
 		IDirectMusicThruImpl_AddRef(iface);
 		*ppobj = This;
 		return S_OK;
 	}
-	WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
+	WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
 	return E_NOINTERFACE;
 }
 
@@ -179,13 +181,14 @@
 {
 	ICOM_THIS(IDirectMusicAudioPathImpl,iface);
 
-	if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicAudioPath))
+	if (IsEqualGUID(riid, &IID_IUnknown) || 
+	    IsEqualGUID(riid, &IID_IDirectMusicAudioPath))
 	{
 		IDirectMusicAudioPathImpl_AddRef(iface);
 		*ppobj = This;
 		return S_OK;
 	}
-	WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
+	WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
 	return E_NOINTERFACE;
 }
 
@@ -268,8 +271,8 @@
 	case DMUS_PATH_PERFORMANCE:
 	  {
 	    /* TODO check wanted GUID */
-	    *ppObject = (LPDIRECTMUSICPERFORMANCE) This->perfo; 
-	    IDirectMusicPerformanceImpl_AddRef((LPDIRECTMUSICPERFORMANCE) *ppObject);
+	    *ppObject = (LPDIRECTMUSICPERFORMANCE8) This->perfo; 
+	    IDirectMusicPerformance8Impl_AddRef((LPDIRECTMUSICPERFORMANCE8) *ppObject);
 	    return S_OK;
 	  }
 	  break;
@@ -277,13 +280,13 @@
 	case DMUS_PATH_PERFORMANCE_GRAPH:
 	  {
 	    IDirectMusicGraph* pPerfoGraph = NULL; 
-	    IDirectMusicPerformanceImpl_GetGraph((LPDIRECTMUSICPERFORMANCE) This->perfo, &pPerfoGraph);
+	    IDirectMusicPerformance8Impl_GetGraph((LPDIRECTMUSICPERFORMANCE8) This->perfo, &pPerfoGraph);
 	    if (NULL == pPerfoGraph) {
 	      IDirectMusicGraphImpl* pGraph = NULL; 
 	      pGraph = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicGraphImpl));		
 	      pGraph->lpVtbl = &DirectMusicGraph_Vtbl;
 	      pGraph->ref = 1;
-	      IDirectMusicPerformanceImpl_SetGraph((LPDIRECTMUSICPERFORMANCE) This->perfo, (IDirectMusicGraph*) pGraph);
+	      IDirectMusicPerformance8Impl_SetGraph((LPDIRECTMUSICPERFORMANCE8) This->perfo, (IDirectMusicGraph*) pGraph);
 	      /* we need release as SetGraph do an AddRef */
 	      IDirectMusicGraphImpl_Release((LPDIRECTMUSICGRAPH) pGraph);
 	      pPerfoGraph = (LPDIRECTMUSICGRAPH) pGraph;
@@ -347,13 +350,14 @@
 {
 	ICOM_THIS(IDirectMusicBandImpl,iface);
 
-	if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicBand))
+	if (IsEqualGUID(riid, &IID_IUnknown) || 
+	    IsEqualGUID(riid, &IID_IDirectMusicBand))
 	{
 		IDirectMusicBandImpl_AddRef(iface);
 		*ppobj = This;
 		return S_OK;
 	}
-	WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
+	WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
 	return E_NOINTERFACE;
 }
 
@@ -421,13 +425,14 @@
 {
 	ICOM_THIS(IDirectMusicSongImpl,iface);
 
-	if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicSong))
+	if (IsEqualGUID(riid, &IID_IUnknown) || 
+	    IsEqualGUID(riid, &IID_IDirectMusicSong))
 	{
 		IDirectMusicSongImpl_AddRef(iface);
 		*ppobj = This;
 		return S_OK;
 	}
-	WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
+	WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
 	return E_NOINTERFACE;
 }
 
@@ -535,13 +540,14 @@
 {
 	ICOM_THIS(IDirectMusicChordMapImpl,iface);
 
-	if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicChordMap))
+	if (IsEqualGUID(riid, &IID_IUnknown) || 
+	    IsEqualGUID(riid, &IID_IDirectMusicChordMap))
 	{
 		IDirectMusicChordMapImpl_AddRef(iface);
 		*ppobj = This;
 		return S_OK;
 	}
-	WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
+	WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
 	return E_NOINTERFACE;
 }
 
@@ -589,13 +595,14 @@
 {
 	ICOM_THIS(IDirectMusicComposerImpl,iface);
 
-	if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicComposer))
+	if (IsEqualGUID(riid, &IID_IUnknown) || 
+	    IsEqualGUID(riid, &IID_IDirectMusicComposer))
 	{
 		IDirectMusicComposerImpl_AddRef(iface);
 		*ppobj = This;
 		return S_OK;
 	}
-	WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
+	WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
 	return E_NOINTERFACE;
 }
 
@@ -693,13 +700,14 @@
 {
 	ICOM_THIS(IDirectMusicContainerImpl,iface);
 
-	if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicContainer))
+	if (IsEqualGUID(riid, &IID_IUnknown) || 
+	    IsEqualGUID(riid, &IID_IDirectMusicContainer))
 	{
 		IDirectMusicContainerImpl_AddRef(iface);
 		*ppobj = This;
 		return S_OK;
 	}
-	WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
+	WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
 	return E_NOINTERFACE;
 }
 
@@ -747,7 +755,8 @@
 {
 	ICOM_THIS(IDirectMusicGraphImpl,iface);
 
-	if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicGraph))
+	if (IsEqualGUID(riid, &IID_IUnknown) || 
+	    IsEqualGUID(riid, &IID_IDirectMusicGraph))
 	{
 		IDirectMusicGraphImpl_AddRef(iface);
 		*ppobj = This;
@@ -789,8 +798,8 @@
 HRESULT WINAPI IDirectMusicGraphImpl_InsertTool (LPDIRECTMUSICGRAPH iface, IDirectMusicTool* pTool, DWORD* pdwPChannels, DWORD cPChannels, LONG lIndex)
 {
         int i;
-	IDirectMusicToolImpl* p;
-	IDirectMusicToolImpl* toAdd = (IDirectMusicToolImpl*) pTool;
+	IDirectMusicTool8Impl* p;
+	IDirectMusicTool8Impl* toAdd = (IDirectMusicTool8Impl*) pTool;
         ICOM_THIS(IDirectMusicGraphImpl,iface);
 
 	FIXME("(%p, %p, %p, %ld, %li): use of pdwPChannels\n", This, pTool, pdwPChannels, cPChannels, lIndex);
@@ -834,7 +843,7 @@
 HRESULT WINAPI IDirectMusicGraphImpl_GetTool (LPDIRECTMUSICGRAPH iface, DWORD dwIndex, IDirectMusicTool** ppTool)
 {
         int i;
-        IDirectMusicToolImpl* p = NULL;
+        IDirectMusicTool8Impl* p = NULL;
         ICOM_THIS(IDirectMusicGraphImpl,iface);
 	
 	FIXME("(%p, %ld, %p): stub\n", This, dwIndex, ppTool);
@@ -845,7 +854,7 @@
 	}
 	*ppTool = (IDirectMusicTool*) p;
 	if (NULL != *ppTool) {
-	  IDirectMusicToolImpl_AddRef(*ppTool);
+	  IDirectMusicTool8Impl_AddRef((LPDIRECTMUSICTOOL8) *ppTool);
 	}
 	return DS_OK;
 }
@@ -877,13 +886,14 @@
 {
 	ICOM_THIS(IDirectMusicScriptImpl,iface);
 
-	if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicScript))
+	if (IsEqualGUID(riid, &IID_IUnknown) || 
+	    IsEqualGUID(riid, &IID_IDirectMusicScript))
 	{
 		IDirectMusicScriptImpl_AddRef(iface);
 		*ppobj = This;
 		return S_OK;
 	}
-	WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
+	WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
 	return E_NOINTERFACE;
 }
 
@@ -920,7 +930,7 @@
 {
 	ICOM_THIS(IDirectMusicScriptImpl,iface);
 
-	FIXME("(%p, %p, %p): stub\n", This, pwszRoutineName, pErrorInfo);
+	FIXME("(%p, %s, %p): stub\n", This, debugstr_w(pwszRoutineName), pErrorInfo);
 
 	return S_OK;
 }
Index: dmusic_performance.c
===================================================================
RCS file: /home/wine/wine/dlls/dmusic/dmusic_performance.c,v
retrieving revision 1.9
diff -u -r1.9 dmusic_performance.c
--- dmusic_performance.c	24 Jun 2003 02:26:07 -0000	1.9
+++ dmusic_performance.c	25 Jun 2003 20:12:13 -0000
@@ -28,493 +28,14 @@
 
 WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
 
-/* IDirectMusicPerformance IUnknown parts follow: */
-HRESULT WINAPI IDirectMusicPerformanceImpl_QueryInterface (LPDIRECTMUSICPERFORMANCE iface, REFIID riid, LPVOID *ppobj)
-{
-	ICOM_THIS(IDirectMusicPerformanceImpl,iface);
-
-	if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicPerformance))
-	{
-		IDirectMusicPerformanceImpl_AddRef(iface);
-		*ppobj = This;
-		return S_OK;
-	}
-	if (IsEqualGUID(riid, &IID_IDirectMusicPerformance8))
-	{
-		return DMUSIC_CreateDirectMusicPerformance8 (riid, (LPDIRECTMUSICPERFORMANCE8 *)ppobj, NULL);
-	}
-	WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
-	return E_NOINTERFACE;
-}
-
-ULONG WINAPI IDirectMusicPerformanceImpl_AddRef (LPDIRECTMUSICPERFORMANCE iface)
-{
-	ICOM_THIS(IDirectMusicPerformanceImpl,iface);
-	TRACE("(%p) : AddRef from %ld\n", This, This->ref);
-	return ++(This->ref);
-}
-
-ULONG WINAPI IDirectMusicPerformanceImpl_Release (LPDIRECTMUSICPERFORMANCE iface)
-{
-	ICOM_THIS(IDirectMusicPerformanceImpl,iface);
-	ULONG ref = --This->ref;
-	TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
-	if (ref == 0)
-	{
-		HeapFree(GetProcessHeap(), 0, This);
-	}
-	return ref;
-}
-
-/* IDirectMusicPerformance Interface follow: */
-HRESULT WINAPI IDirectMusicPerformanceImpl_Init (LPDIRECTMUSICPERFORMANCE iface, IDirectMusic** ppDirectMusic, LPDIRECTSOUND pDirectSound, HWND hWnd)
-{
-	ICOM_THIS(IDirectMusicPerformanceImpl,iface);
-	
-	FIXME("(iface = %p, dmusic = %p (*dmusic = %p), dsound = %p, hwnd = %p): forward to IDirectMusicPerformance8Impl::Init\n", This, ppDirectMusic, *ppDirectMusic, pDirectSound, hWnd);
-
-        return IDirectMusicPerformanceImpl_Init((LPDIRECTMUSICPERFORMANCE) iface, ppDirectMusic, pDirectSound, hWnd);
-}
-
-HRESULT WINAPI IDirectMusicPerformanceImpl_PlaySegment (LPDIRECTMUSICPERFORMANCE iface, IDirectMusicSegment* pSegment, DWORD dwFlags, __int64 i64StartTime, IDirectMusicSegmentState** ppSegmentState)
-{
-	ICOM_THIS(IDirectMusicPerformanceImpl,iface);
-
-	FIXME("(%p, %p, %ld, FIXME, %p): stub\n", This, pSegment, dwFlags/*, i64StartTime*/, ppSegmentState);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicPerformanceImpl_Stop (LPDIRECTMUSICPERFORMANCE iface, IDirectMusicSegment* pSegment, IDirectMusicSegmentState* pSegmentState, MUSIC_TIME mtTime, DWORD dwFlags)
-{
-	ICOM_THIS(IDirectMusicPerformanceImpl,iface);
-
-	FIXME("(%p, %p, %p, %ld, %ld): stub\n", This, pSegment, pSegmentState, mtTime, dwFlags);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicPerformanceImpl_GetSegmentState (LPDIRECTMUSICPERFORMANCE iface, IDirectMusicSegmentState** ppSegmentState, MUSIC_TIME mtTime)
-{
-	ICOM_THIS(IDirectMusicPerformanceImpl,iface);
-
-	FIXME("(%p,%p, %ld): stub\n", This, ppSegmentState, mtTime);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicPerformanceImpl_SetPrepareTime (LPDIRECTMUSICPERFORMANCE iface, DWORD dwMilliSeconds)
-{
-	ICOM_THIS(IDirectMusicPerformanceImpl,iface);
-
-	FIXME("(%p, %ld): stub\n", This, dwMilliSeconds);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicPerformanceImpl_GetPrepareTime (LPDIRECTMUSICPERFORMANCE iface, DWORD* pdwMilliSeconds)
-{
-	ICOM_THIS(IDirectMusicPerformanceImpl,iface);
-
-	FIXME("(%p, %p): stub\n", This, pdwMilliSeconds);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicPerformanceImpl_SetBumperLength (LPDIRECTMUSICPERFORMANCE iface, DWORD dwMilliSeconds)
-{
-	ICOM_THIS(IDirectMusicPerformanceImpl,iface);
-
-	FIXME("(%p, %ld): stub\n", This, dwMilliSeconds);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicPerformanceImpl_GetBumperLength (LPDIRECTMUSICPERFORMANCE iface, DWORD* pdwMilliSeconds)
-{
-	ICOM_THIS(IDirectMusicPerformanceImpl,iface);
-
-	FIXME("(%p, %p): stub\n", This, pdwMilliSeconds);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicPerformanceImpl_SendPMsg (LPDIRECTMUSICPERFORMANCE iface, DMUS_PMSG* pPMSG)
-{
-	ICOM_THIS(IDirectMusicPerformanceImpl,iface);
-
-	FIXME("(%p, %p): stub\n", This, pPMSG);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicPerformanceImpl_MusicToReferenceTime (LPDIRECTMUSICPERFORMANCE iface, MUSIC_TIME mtTime, REFERENCE_TIME* prtTime)
-{
-	ICOM_THIS(IDirectMusicPerformanceImpl,iface);
-
-	FIXME("(%p, %ld, FIXME): stub\n", This, mtTime/*,prtTime*/);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicPerformanceImpl_ReferenceToMusicTime (LPDIRECTMUSICPERFORMANCE iface, REFERENCE_TIME rtTime, MUSIC_TIME* pmtTime)
-{
-	ICOM_THIS(IDirectMusicPerformanceImpl,iface);
-
-	FIXME("(%p, FIXME, %p): stub\n", This/*, rtTime*/, pmtTime);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicPerformanceImpl_IsPlaying (LPDIRECTMUSICPERFORMANCE iface, IDirectMusicSegment* pSegment, IDirectMusicSegmentState* pSegState)
-{
-	ICOM_THIS(IDirectMusicPerformanceImpl,iface);
-
-	FIXME("(%p, %p, %p): stub\n", This, pSegment, pSegState);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicPerformanceImpl_GetTime (LPDIRECTMUSICPERFORMANCE iface, REFERENCE_TIME* prtNow, MUSIC_TIME* pmtNow)
-{
-	ICOM_THIS(IDirectMusicPerformanceImpl,iface);
-
-	FIXME("(%p, FIXME, %p): stub\n", This/*, prtNow*/, pmtNow);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicPerformanceImpl_AllocPMsg (LPDIRECTMUSICPERFORMANCE iface, ULONG cb, DMUS_PMSG** ppPMSG)
-{
-	ICOM_THIS(IDirectMusicPerformanceImpl,iface);
-
-	FIXME("(%p, %ld, %p): stub\n", This, cb, ppPMSG);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicPerformanceImpl_FreePMsg (LPDIRECTMUSICPERFORMANCE iface, DMUS_PMSG* pPMSG)
-{
-	ICOM_THIS(IDirectMusicPerformanceImpl,iface);
-
-	FIXME("(%p, %p): stub\n", This, pPMSG);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicPerformanceImpl_GetGraph (LPDIRECTMUSICPERFORMANCE iface, IDirectMusicGraph** ppGraph)
-{
-	ICOM_THIS(IDirectMusicPerformanceImpl,iface);
-
-	FIXME("(%p, %p): stub\n", This, ppGraph);
-
-	return IDirectMusicPerformance8Impl_GetGraph((LPDIRECTMUSICPERFORMANCE8) iface, ppGraph);
-}
-
-HRESULT WINAPI IDirectMusicPerformanceImpl_SetGraph (LPDIRECTMUSICPERFORMANCE iface, IDirectMusicGraph* pGraph)
-{
-	ICOM_THIS(IDirectMusicPerformanceImpl,iface);
-
-	FIXME("(%p, %p): stub\n", This, pGraph);
-
-	return IDirectMusicPerformance8Impl_SetGraph((LPDIRECTMUSICPERFORMANCE8) iface, pGraph);
-}
-
-HRESULT WINAPI IDirectMusicPerformanceImpl_SetNotificationHandle (LPDIRECTMUSICPERFORMANCE iface, HANDLE hNotification, REFERENCE_TIME rtMinimum)
-{
-	ICOM_THIS(IDirectMusicPerformanceImpl,iface);
-
-	FIXME("(%p, %p, FIXME): stub\n", This, hNotification/*, rtMinimum*/);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicPerformanceImpl_GetNotificationPMsg (LPDIRECTMUSICPERFORMANCE iface, DMUS_NOTIFICATION_PMSG** ppNotificationPMsg)
-{
-	ICOM_THIS(IDirectMusicPerformanceImpl,iface);
-
-	FIXME("(%p, %p): stub\n", This, ppNotificationPMsg);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicPerformanceImpl_AddNotificationType (LPDIRECTMUSICPERFORMANCE iface, REFGUID rguidNotificationType)
-{
-	ICOM_THIS(IDirectMusicPerformanceImpl,iface);
-
-	FIXME("(%p, %s): stub\n", This, debugstr_guid(rguidNotificationType));
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicPerformanceImpl_RemoveNotificationType (LPDIRECTMUSICPERFORMANCE iface, REFGUID rguidNotificationType)
-{
-	ICOM_THIS(IDirectMusicPerformanceImpl,iface);
-
-	FIXME("(%p, %s): stub\n", This, debugstr_guid(rguidNotificationType));
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicPerformanceImpl_AddPort (LPDIRECTMUSICPERFORMANCE iface, IDirectMusicPort* pPort)
-{
-	ICOM_THIS(IDirectMusicPerformanceImpl,iface);
-	
-	FIXME("(%p, %p): semi-stub\n", This, pPort);
-	/* just pretend that the port has been added */
-	
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicPerformanceImpl_RemovePort (LPDIRECTMUSICPERFORMANCE iface, IDirectMusicPort* pPort)
-{
-	ICOM_THIS(IDirectMusicPerformanceImpl,iface);
-
-	FIXME("(%p, %p): stub\n", This, pPort);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicPerformanceImpl_AssignPChannelBlock (LPDIRECTMUSICPERFORMANCE iface, DWORD dwBlockNum, IDirectMusicPort* pPort, DWORD dwGroup)
-{
-	ICOM_THIS(IDirectMusicPerformanceImpl,iface);	
-
-	FIXME("(%p, %ld, %p, %ld): forward to IDirectMusicPerformance8Impl::AssignPChannelBlock\n", This, dwBlockNum, pPort, dwGroup-1);
-
-        return IDirectMusicPerformance8Impl_AssignPChannelBlock((LPDIRECTMUSICPERFORMANCE8) iface, dwBlockNum, pPort, dwGroup);
-}
-
-HRESULT WINAPI IDirectMusicPerformanceImpl_AssignPChannel (LPDIRECTMUSICPERFORMANCE iface, DWORD dwPChannel, 
-							   IDirectMusicPort* pPort, DWORD dwGroup, DWORD dwMChannel)
-{
-	ICOM_THIS(IDirectMusicPerformanceImpl,iface);
-
-	TRACE("(%p, %ld, %p, %ld, %ld): forward to IDirectMusicPerformance8Impl::AssignPChannel\n", This, dwPChannel, pPort, dwGroup, dwMChannel);
-
-	return IDirectMusicPerformance8Impl_AssignPChannel((LPDIRECTMUSICPERFORMANCE8) iface, dwPChannel, pPort, dwGroup, dwMChannel);
-}
-
-HRESULT WINAPI IDirectMusicPerformanceImpl_PChannelInfo (LPDIRECTMUSICPERFORMANCE iface, DWORD dwPChannel, IDirectMusicPort** ppPort, DWORD* pdwGroup, DWORD* pdwMChannel)
-{
-	ICOM_THIS(IDirectMusicPerformanceImpl,iface);
-
-	FIXME("(%p, %ld, %p, %p, %p): stub\n", This, dwPChannel, ppPort, pdwGroup, pdwMChannel);
-	
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicPerformanceImpl_DownloadInstrument (LPDIRECTMUSICPERFORMANCE iface, IDirectMusicInstrument* pInst, DWORD dwPChannel, IDirectMusicDownloadedInstrument** ppDownInst, DMUS_NOTERANGE* pNoteRanges, DWORD dwNumNoteRanges, IDirectMusicPort** ppPort, DWORD* pdwGroup, DWORD* pdwMChannel)
-{
-	ICOM_THIS(IDirectMusicPerformanceImpl,iface);
-
-	FIXME("(%p, %p, %ld, %p, %p, %ld, %p, %p, %p): stub\n", This, pInst, dwPChannel, ppDownInst, pNoteRanges, dwNumNoteRanges, ppPort, pdwGroup, pdwMChannel);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicPerformanceImpl_Invalidate (LPDIRECTMUSICPERFORMANCE iface, MUSIC_TIME mtTime, DWORD dwFlags)
-{
-	ICOM_THIS(IDirectMusicPerformanceImpl,iface);
-
-	FIXME("(%p, %ld, %ld): stub\n", This, mtTime, dwFlags);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicPerformanceImpl_GetParam (LPDIRECTMUSICPERFORMANCE iface, REFGUID rguidType, DWORD dwGroupBits, DWORD dwIndex, MUSIC_TIME mtTime, MUSIC_TIME* pmtNext, void* pParam)
-{
-	ICOM_THIS(IDirectMusicPerformanceImpl,iface);
-
-	FIXME("(%p, %s, %ld, %ld, %ld, %p, %p): stub\n", This, debugstr_guid(rguidType), dwGroupBits, dwIndex, mtTime, pmtNext, pParam);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicPerformanceImpl_SetParam (LPDIRECTMUSICPERFORMANCE iface, REFGUID rguidType, DWORD dwGroupBits, DWORD dwIndex, MUSIC_TIME mtTime, void* pParam)
-{
-	ICOM_THIS(IDirectMusicPerformanceImpl,iface);
-
-	FIXME("(%p, %s, %ld, %ld, %ld, %p): stub\n", This, debugstr_guid(rguidType), dwGroupBits, dwIndex, mtTime, pParam);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicPerformanceImpl_GetGlobalParam (LPDIRECTMUSICPERFORMANCE iface, REFGUID rguidType, 
-							   void* pParam, DWORD dwSize)
-{
-	ICOM_THIS(IDirectMusicPerformanceImpl,iface);
-
-	TRACE("(%p, %s, %p, %ld): forward to IDirectMusicPerformance8Impl::GetGlobalParam\n", This, debugstr_guid(rguidType), pParam, dwSize);
-	
-	return IDirectMusicPerformance8Impl_GetGlobalParam((LPDIRECTMUSICPERFORMANCE8) iface, rguidType, pParam, dwSize);
-}
-
-HRESULT WINAPI IDirectMusicPerformanceImpl_SetGlobalParam (LPDIRECTMUSICPERFORMANCE iface, REFGUID rguidType, 
-							   void* pParam, DWORD dwSize)
-{
-	ICOM_THIS(IDirectMusicPerformanceImpl,iface);
-
-	TRACE("(%p, %s, %p, %ld): forward to IDirectMusicPerformance8Impl::SetGlobalParam\n", This, debugstr_guid(rguidType), pParam, dwSize);
-	
-	return IDirectMusicPerformance8Impl_SetGlobalParam((LPDIRECTMUSICPERFORMANCE8) iface, rguidType, pParam, dwSize);
-}
-
-HRESULT WINAPI IDirectMusicPerformanceImpl_GetLatencyTime (LPDIRECTMUSICPERFORMANCE iface, REFERENCE_TIME* prtTime)
-{
-	ICOM_THIS(IDirectMusicPerformanceImpl,iface);
-
-	FIXME("(%p, %p): stub\n", This, prtTime);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicPerformanceImpl_GetQueueTime (LPDIRECTMUSICPERFORMANCE iface, REFERENCE_TIME* prtTime)
-{
-	ICOM_THIS(IDirectMusicPerformanceImpl,iface);
-
-	FIXME("(%p, %p): stub\n", This, prtTime);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicPerformanceImpl_AdjustTime (LPDIRECTMUSICPERFORMANCE iface, REFERENCE_TIME rtAmount)
-{
-	ICOM_THIS(IDirectMusicPerformanceImpl,iface);
-	
-	FIXME("(%p, FIXME): stub\n", This/*, rtAmount*/);
-	
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicPerformanceImpl_CloseDown (LPDIRECTMUSICPERFORMANCE iface)
-{
- 	ICOM_THIS(IDirectMusicPerformanceImpl,iface);
-	
-	FIXME("(%p): stub\n", This);
-	
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicPerformanceImpl_GetResolvedTime (LPDIRECTMUSICPERFORMANCE iface, REFERENCE_TIME rtTime, REFERENCE_TIME* prtResolved, DWORD dwTimeResolveFlags)
-{
-	ICOM_THIS(IDirectMusicPerformanceImpl,iface);
-
-	FIXME("(%p, FIXME, %p, %ld): stub\n", This/*, rtTime*/, prtResolved, dwTimeResolveFlags);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicPerformanceImpl_MIDIToMusic (LPDIRECTMUSICPERFORMANCE iface, BYTE bMIDIValue, DMUS_CHORD_KEY* pChord, BYTE bPlayMode, BYTE bChordLevel, WORD* pwMusicValue)
-{
-	ICOM_THIS(IDirectMusicPerformanceImpl,iface);
-
-	FIXME("(%p, %d, %p, %d, %d, %p): stub\n", This, bMIDIValue, pChord, bPlayMode, bChordLevel, pwMusicValue);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicPerformanceImpl_MusicToMIDI (LPDIRECTMUSICPERFORMANCE iface, WORD wMusicValue, DMUS_CHORD_KEY* pChord, BYTE bPlayMode, BYTE bChordLevel, BYTE* pbMIDIValue)
-{
-	ICOM_THIS(IDirectMusicPerformanceImpl,iface);
-
-	FIXME("(%p, %d, %p, %d, %d, %p): stub\n", This, wMusicValue, pChord, bPlayMode, bChordLevel, pbMIDIValue);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicPerformanceImpl_TimeToRhythm (LPDIRECTMUSICPERFORMANCE iface, MUSIC_TIME mtTime, DMUS_TIMESIGNATURE* pTimeSig, WORD* pwMeasure, BYTE* pbBeat, BYTE* pbGrid, short* pnOffset)
-{
-	ICOM_THIS(IDirectMusicPerformanceImpl,iface);
-
-	FIXME("(%p, %ld, %p, %p, %p, %p, %p): stub\n", This, mtTime, pTimeSig, pwMeasure, pbBeat, pbGrid, pnOffset);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicPerformanceImpl_RhythmToTime (LPDIRECTMUSICPERFORMANCE iface, WORD wMeasure, BYTE bBeat, BYTE bGrid, short nOffset, DMUS_TIMESIGNATURE* pTimeSig, MUSIC_TIME* pmtTime)
-{
-	ICOM_THIS(IDirectMusicPerformanceImpl,iface);
-
-	FIXME("(%p, %d, %d, %d, %i, %p, %p): stub\n", This, wMeasure, bBeat, bGrid, nOffset, pTimeSig, pmtTime);
-
-	return S_OK;
-}
-
-ICOM_VTABLE(IDirectMusicPerformance) DirectMusicPerformance_Vtbl =
-{
-    ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
-	IDirectMusicPerformanceImpl_QueryInterface,
-	IDirectMusicPerformanceImpl_AddRef,
-	IDirectMusicPerformanceImpl_Release,
-	IDirectMusicPerformanceImpl_Init,
-	IDirectMusicPerformanceImpl_PlaySegment,
-	IDirectMusicPerformanceImpl_Stop,
-	IDirectMusicPerformanceImpl_GetSegmentState,
-	IDirectMusicPerformanceImpl_SetPrepareTime,
-	IDirectMusicPerformanceImpl_GetPrepareTime,
-	IDirectMusicPerformanceImpl_SetBumperLength,
-	IDirectMusicPerformanceImpl_GetBumperLength,
-	IDirectMusicPerformanceImpl_SendPMsg,
-	IDirectMusicPerformanceImpl_MusicToReferenceTime,
-	IDirectMusicPerformanceImpl_ReferenceToMusicTime,
-	IDirectMusicPerformanceImpl_IsPlaying,
-	IDirectMusicPerformanceImpl_GetTime,
-	IDirectMusicPerformanceImpl_AllocPMsg,
-	IDirectMusicPerformanceImpl_FreePMsg,
-	IDirectMusicPerformanceImpl_GetGraph,
-	IDirectMusicPerformanceImpl_SetGraph,
-	IDirectMusicPerformanceImpl_SetNotificationHandle,
-	IDirectMusicPerformanceImpl_GetNotificationPMsg,
-	IDirectMusicPerformanceImpl_AddNotificationType,
-	IDirectMusicPerformanceImpl_RemoveNotificationType,
-	IDirectMusicPerformanceImpl_AddPort,
-	IDirectMusicPerformanceImpl_RemovePort,
-	IDirectMusicPerformanceImpl_AssignPChannelBlock,
-	IDirectMusicPerformanceImpl_AssignPChannel,
-	IDirectMusicPerformanceImpl_PChannelInfo,
-	IDirectMusicPerformanceImpl_DownloadInstrument,
-	IDirectMusicPerformanceImpl_Invalidate,
-	IDirectMusicPerformanceImpl_GetParam,
-	IDirectMusicPerformanceImpl_SetParam,
-	IDirectMusicPerformanceImpl_GetGlobalParam,
-	IDirectMusicPerformanceImpl_SetGlobalParam,
-	IDirectMusicPerformanceImpl_GetLatencyTime,
-	IDirectMusicPerformanceImpl_GetQueueTime,
-	IDirectMusicPerformanceImpl_AdjustTime,
-	IDirectMusicPerformanceImpl_CloseDown,
-	IDirectMusicPerformanceImpl_GetResolvedTime,
-	IDirectMusicPerformanceImpl_MIDIToMusic,
-	IDirectMusicPerformanceImpl_MusicToMIDI,
-	IDirectMusicPerformanceImpl_TimeToRhythm,
-	IDirectMusicPerformanceImpl_RhythmToTime
-};
-
 /* for ClassFactory */
 HRESULT WINAPI DMUSIC_CreateDirectMusicPerformance (LPCGUID lpcGUID, LPDIRECTMUSICPERFORMANCE *ppDMPerf, LPUNKNOWN pUnkOuter)
 {
-	IDirectMusicPerformanceImpl *pPerf;
-
-	TRACE("(%p,%p,%p)\n",lpcGUID, ppDMPerf, pUnkOuter);
-	if (IsEqualGUID(lpcGUID, &IID_IDirectMusicPerformance))
-	{
-		pPerf = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicPerformanceImpl));
-		if (NULL == pPerf)
-		{
-			*ppDMPerf = (LPDIRECTMUSICPERFORMANCE)NULL;
-			return E_OUTOFMEMORY;
-		}
-		pPerf->lpVtbl = &DirectMusicPerformance_Vtbl;
-		pPerf->ref = 1;
-		*ppDMPerf = (LPDIRECTMUSICPERFORMANCE)pPerf;
-		return S_OK;
-	}
-	WARN("No interface found\n");
-	
-	return E_NOINTERFACE;
+	return DMUSIC_CreateDirectMusicPerformance8(lpcGUID, (LPDIRECTMUSICPERFORMANCE8*) ppDMPerf, pUnkOuter);
 }
 
 
-/* IDirectMusicPerformance8 IUnknown parts follow: */
+/* IDirectMusicPerformance8 IUnknown part follow: */
 HRESULT WINAPI IDirectMusicPerformance8Impl_QueryInterface (LPDIRECTMUSICPERFORMANCE8 iface, REFIID riid, LPVOID *ppobj)
 {
 	ICOM_THIS(IDirectMusicPerformance8Impl,iface);
@@ -527,7 +48,7 @@
 		*ppobj = This;
 		return S_OK;
 	}
-	WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
+	WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
 	return E_NOINTERFACE;
 }
 
@@ -550,7 +71,7 @@
 	return ref;
 }
 
-/* IDirectMusicPerformance Interface part follow: */
+/* IDirectMusicPerformance8 IDirectMusicPerformance Interface part follow: */
 HRESULT WINAPI IDirectMusicPerformance8Impl_Init (LPDIRECTMUSICPERFORMANCE8 iface, IDirectMusic** ppDirectMusic, LPDIRECTSOUND pDirectSound, HWND hWnd)
 {
 	ICOM_THIS(IDirectMusicPerformance8Impl,iface);
@@ -562,15 +83,15 @@
 	
 	if (NULL != ppDirectMusic && NULL != *ppDirectMusic) {
 	  /* app creates it's own dmusic object and gives it to performance */
-	  This->dmusic = (IDirectMusic*) *ppDirectMusic;
-	  IDirectMusicImpl_AddRef((LPDIRECTMUSIC) This->dmusic);
+	  This->dmusic = (IDirectMusic8*) *ppDirectMusic;
+	  IDirectMusic8Impl_AddRef((LPDIRECTMUSIC8) This->dmusic);
 	} else {
 	  /* app allows the performance to initialise itfself and needs a pointer to object*/
 	  /* maybe IID_IDirectMusic8 must be used here */
-	  DMUSIC_CreateDirectMusic(&IID_IDirectMusic, (LPDIRECTMUSIC*) &This->dmusic, NULL);
+	  DMUSIC_CreateDirectMusic(&IID_IDirectMusic8, (LPDIRECTMUSIC*) &This->dmusic, NULL);
 	  if (ppDirectMusic) {
 	    *ppDirectMusic = (LPDIRECTMUSIC) This->dmusic;
-	    IDirectMusic_AddRef(*ppDirectMusic);
+	    IDirectMusic8Impl_AddRef((LPDIRECTMUSIC8) *ppDirectMusic);
 	  }
 	}
 
@@ -712,7 +233,7 @@
 
 HRESULT WINAPI IDirectMusicPerformance8Impl_GetGraph (LPDIRECTMUSICPERFORMANCE8 iface, IDirectMusicGraph** ppGraph)
 {
-	ICOM_THIS(IDirectMusicPerformanceImpl,iface);
+	ICOM_THIS(IDirectMusicPerformance8Impl,iface);
 
 	FIXME("(%p, %p): to check\n", This, ppGraph);
 
@@ -725,7 +246,7 @@
 
 HRESULT WINAPI IDirectMusicPerformance8Impl_SetGraph (LPDIRECTMUSICPERFORMANCE8 iface, IDirectMusicGraph* pGraph)
 {
-	ICOM_THIS(IDirectMusicPerformanceImpl,iface);
+	ICOM_THIS(IDirectMusicPerformance8Impl,iface);
 
 	FIXME("(%p, %p): to check\n", This, pGraph);
 
@@ -1029,8 +550,8 @@
 	IDirectMusicPerformance8Impl_Init(iface, ppDirectMusic, This->dsound, hWnd);
 
 	/* Init increases the ref count of the dsound object. Decremente it if the app don't want a pointer to the object. */
-	/*if (!ppDirectSound)
-	  IDirectSound_Release(*ppDirectSound);*/
+	if (!ppDirectSound)
+	  IDirectSound_Release(This->dsound);
 	
 	/* as seen in msdn we need params init before audio path creation */
 	if (NULL != pParams) {
@@ -1091,14 +612,13 @@
 	FIXME("(%p)->(%ld, %ld, %d, %p): semi-stub\n", This, dwType, dwPChannelCount, fActivate, ppNewPath);
 
 	default_path = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicAudioPathImpl));
-	if (NULL == default_path)
-	{
-		*ppNewPath = (LPDIRECTMUSICAUDIOPATH)NULL;
+	if (NULL == default_path) {
+		*ppNewPath = (LPDIRECTMUSICAUDIOPATH) NULL;
 		return E_OUTOFMEMORY;
 	}
 	default_path->lpVtbl = &DirectMusicAudioPath_Vtbl;
 	default_path->ref = 1;
-	default_path->perfo = (IDirectMusicPerformance*) This;
+	default_path->perfo = (IDirectMusicPerformance8*) This;
 
 	/* Secondary buffer description */
 	format.wFormatTag = WAVE_FORMAT_PCM;
@@ -1166,7 +686,7 @@
        This->default_path = pAudioPath;
        if (NULL != This->default_path) {
          IDirectMusicAudioPathImpl_AddRef((LPDIRECTMUSICAUDIOPATH) This->default_path);
-	 ((IDirectMusicAudioPathImpl*) This->default_path)->perfo = (IDirectMusicPerformance*) This;
+	 ((IDirectMusicAudioPathImpl*) This->default_path)->perfo = (IDirectMusicPerformance8*) This;
        }
        return DS_OK;
 }
@@ -1259,8 +779,8 @@
 	IDirectMusicPerformance8Impl *pPerf8;
 
 	TRACE("(%p,%p,%p)\n",lpcGUID, ppDMPerf8, pUnkOuter);
-	if (IsEqualGUID(lpcGUID, &IID_IDirectMusicPerformance8))
-	{
+	if (IsEqualGUID(lpcGUID, &IID_IDirectMusicPerformance) ||
+	    IsEqualGUID(lpcGUID, &IID_IDirectMusicPerformance8)) {
 		pPerf8 = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicPerformance8Impl));
 		if (NULL == pPerf8)
 		{
@@ -1273,7 +793,7 @@
 		pPerf8->dsound = NULL;
 		pPerf8->default_path = NULL;
 		
-		*ppDMPerf8 = (LPDIRECTMUSICPERFORMANCE8)pPerf8;
+		*ppDMPerf8 = (LPDIRECTMUSICPERFORMANCE8) pPerf8;
 		return S_OK;
 	}
 	WARN("No interface found\n");
Index: dmusic_plugins.c
===================================================================
RCS file: /home/wine/wine/dlls/dmusic/dmusic_plugins.c,v
retrieving revision 1.2
diff -u -r1.2 dmusic_plugins.c
--- dmusic_plugins.c	7 Jun 2003 00:39:18 -0000	1.2
+++ dmusic_plugins.c	25 Jun 2003 20:12:14 -0000
@@ -30,122 +30,21 @@
 
 WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
 
-/* IDirectMusicTool IUnknown parts follow: */
-HRESULT WINAPI IDirectMusicToolImpl_QueryInterface (LPDIRECTMUSICTOOL iface, REFIID riid, LPVOID *ppobj)
-{
-	ICOM_THIS(IDirectMusicToolImpl, iface);
-
-	if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicTool))
-	{
-		IDirectMusicToolImpl_AddRef(iface);
-		*ppobj = This;
-		return S_OK;
-	}
-	WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
-	return E_NOINTERFACE;
-}
-
-ULONG WINAPI IDirectMusicToolImpl_AddRef (LPDIRECTMUSICTOOL iface)
-{
-	ICOM_THIS(IDirectMusicToolImpl, iface);
-	TRACE("(%p) : AddRef from %ld\n", This, This->ref);
-	return ++(This->ref);
-}
 
-ULONG WINAPI IDirectMusicToolImpl_Release (LPDIRECTMUSICTOOL iface)
-{
-	ICOM_THIS(IDirectMusicToolImpl, iface);
-	ULONG ref = --This->ref;
-	TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
-	if (ref == 0)
-	{
-		HeapFree(GetProcessHeap(), 0, This);
-	}
-	return ref;
-}
-
-/* IDirectMusicTool Interface follow: */
-HRESULT WINAPI IDirectMusicToolImpl_Init (LPDIRECTMUSICTOOL iface, IDirectMusicGraph* pGraph)
-{
-	ICOM_THIS(IDirectMusicToolImpl, iface);
-
-	FIXME("(%p, %p): stub\n", This, pGraph);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicToolImpl_GetMsgDeliveryType (LPDIRECTMUSICTOOL iface, DWORD* pdwDeliveryType)
-{
-	ICOM_THIS(IDirectMusicToolImpl, iface);
-
-	FIXME("(%p, %p): stub\n", This, pdwDeliveryType);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicToolImpl_GetMediaTypeArraySize (LPDIRECTMUSICTOOL iface, DWORD* pdwNumElements)
-{
-	ICOM_THIS(IDirectMusicToolImpl, iface);
-
-	FIXME("(%p, %p): stub\n", This, pdwNumElements);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicToolImpl_GetMediaTypes (LPDIRECTMUSICTOOL iface, DWORD** padwMediaTypes, DWORD dwNumElements)
-{
-	ICOM_THIS(IDirectMusicToolImpl, iface);
-
-	FIXME("(%p, %p, %ld): stub\n", This, padwMediaTypes, dwNumElements);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicToolImpl_ProcessPMsg (LPDIRECTMUSICTOOL iface, IDirectMusicPerformance* pPerf, DMUS_PMSG* pPMSG)
-{
-	ICOM_THIS(IDirectMusicToolImpl, iface);
-
-	FIXME("(%p, %p, %p): stub\n", This, pPerf, pPMSG);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicToolImpl_Flush (LPDIRECTMUSICTOOL iface, IDirectMusicPerformance* pPerf, DMUS_PMSG* pPMSG, REFERENCE_TIME rtTime)
-{
-	ICOM_THIS(IDirectMusicToolImpl, iface);
-
-	FIXME("(%p, %p, %p, FIXME): stub\n", This, pPerf, pPMSG/*, rtTime*/);
-
-	return S_OK;
-}
-
-ICOM_VTABLE(IDirectMusicTool) DirectMusicTool_Vtbl =
-{
-    ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
-	IDirectMusicToolImpl_QueryInterface,
-	IDirectMusicToolImpl_AddRef,
-	IDirectMusicToolImpl_Release,
-	IDirectMusicToolImpl_Init,
-	IDirectMusicToolImpl_GetMsgDeliveryType,
-	IDirectMusicToolImpl_GetMediaTypeArraySize,
-	IDirectMusicToolImpl_GetMediaTypes,
-	IDirectMusicToolImpl_ProcessPMsg,
-	IDirectMusicToolImpl_Flush
-};
-
-
-/* IDirectMusicTool8 IUnknown parts follow: */
+/* IDirectMusicTool8 IUnknown part follow: */
 HRESULT WINAPI IDirectMusicTool8Impl_QueryInterface (LPDIRECTMUSICTOOL8 iface, REFIID riid, LPVOID *ppobj)
 {
 	ICOM_THIS(IDirectMusicTool8Impl,iface);
 
-	if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicTool8))
+	if (IsEqualGUID(riid, &IID_IUnknown) || 
+	    IsEqualGUID(riid, &IID_IDirectMusicTool) ||
+	    IsEqualGUID(riid, &IID_IDirectMusicTool8))
 	{
 		IDirectMusicTool8Impl_AddRef(iface);
 		*ppobj = This;
 		return S_OK;
 	}
-	WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
+	WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
 	return E_NOINTERFACE;
 }
 
@@ -168,7 +67,7 @@
 	return ref;
 }
 
-/* IDirectMusicTool8 Interface follow: */
+/* IDirectMusicTool Interface follow: */
 HRESULT WINAPI IDirectMusicTool8Impl_Init (LPDIRECTMUSICTOOL8 iface, IDirectMusicGraph* pGraph)
 {
 	ICOM_THIS(IDirectMusicTool8Impl,iface);
@@ -223,6 +122,7 @@
 	return S_OK;
 }
 
+/* IDirectMusicTool8 Interface part follow: */
 HRESULT WINAPI IDirectMusicTool8Impl_Clone (LPDIRECTMUSICTOOL8 iface, IDirectMusicTool** ppTool)
 {
 	ICOM_THIS(IDirectMusicTool8Impl,iface);
@@ -248,160 +148,20 @@
 };
 
 
-/* IDirectMusicTrack IUnknown parts follow: */
-HRESULT WINAPI IDirectMusicTrackImpl_QueryInterface (LPDIRECTMUSICTRACK iface, REFIID riid, LPVOID *ppobj)
-{
-	ICOM_THIS(IDirectMusicTrackImpl,iface);
-
-	if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicTrack))
-	{
-		IDirectMusicTrackImpl_AddRef(iface);
-		*ppobj = This;
-		return S_OK;
-	}
-	WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
-	return E_NOINTERFACE;
-}
-
-ULONG WINAPI IDirectMusicTrackImpl_AddRef (LPDIRECTMUSICTRACK iface)
-{
-	ICOM_THIS(IDirectMusicTrackImpl,iface);
-	TRACE("(%p) : AddRef from %ld\n", This, This->ref);
-	return ++(This->ref);
-}
-
-ULONG WINAPI IDirectMusicTrackImpl_Release (LPDIRECTMUSICTRACK iface)
-{
-	ICOM_THIS(IDirectMusicTrackImpl,iface);
-	ULONG ref = --This->ref;
-	TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
-	if (ref == 0)
-	{
-		HeapFree(GetProcessHeap(), 0, This);
-	}
-	return ref;
-}
-/* IDirectMusicTrack Interface follow: */
-HRESULT WINAPI IDirectMusicTrackImpl_Init (LPDIRECTMUSICTRACK iface, IDirectMusicSegment* pSegment)
-{
-	ICOM_THIS(IDirectMusicTrackImpl,iface);
-
-	FIXME("(%p, %p): stub\n", This, pSegment);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicTrackImpl_InitPlay (LPDIRECTMUSICTRACK iface, IDirectMusicSegmentState* pSegmentState, IDirectMusicPerformance* pPerformance, void** ppStateData, DWORD dwVirtualTrackID, DWORD dwFlags)
-{
-	ICOM_THIS(IDirectMusicTrackImpl,iface);
-
-	FIXME("(%p, %p, %p, %p, %ld, %ld): stub\n", This, pSegmentState, pPerformance, ppStateData, dwVirtualTrackID, dwFlags);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicTrackImpl_EndPlay (LPDIRECTMUSICTRACK iface, void* pStateData)
-{
-	ICOM_THIS(IDirectMusicTrackImpl,iface);
-
-	FIXME("(%p, %p): stub\n", This, pStateData);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicTrackImpl_Play (LPDIRECTMUSICTRACK iface, void* pStateData, MUSIC_TIME mtStart, MUSIC_TIME mtEnd, MUSIC_TIME mtOffset, DWORD dwFlags, IDirectMusicPerformance* pPerf, IDirectMusicSegmentState* pSegSt, DWORD dwVirtualID)
-{
-	ICOM_THIS(IDirectMusicTrackImpl,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 IDirectMusicTrackImpl_GetParam (LPDIRECTMUSICTRACK iface, REFGUID rguidType, MUSIC_TIME mtTime, MUSIC_TIME* pmtNext, void* pParam)
-{
-	ICOM_THIS(IDirectMusicTrackImpl,iface);
-
-	FIXME("(%p, %s, %ld, %p, %p): stub\n", This, debugstr_guid(rguidType), mtTime, pmtNext, pParam);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicTrackImpl_SetParam (LPDIRECTMUSICTRACK iface, REFGUID rguidType, MUSIC_TIME mtTime, void* pParam)
-{
-	ICOM_THIS(IDirectMusicTrackImpl,iface);
-
-	FIXME("(%p, %s, %ld, %p): stub\n", This, debugstr_guid(rguidType), mtTime, pParam);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicTrackImpl_IsParamSupported (LPDIRECTMUSICTRACK iface, REFGUID rguidType)
-{
-	ICOM_THIS(IDirectMusicTrackImpl,iface);
-
-	FIXME("(%p, %s): stub\n", This, debugstr_guid(rguidType));
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicTrackImpl_AddNotificationType (LPDIRECTMUSICTRACK iface, REFGUID rguidNotificationType)
-{
-	ICOM_THIS(IDirectMusicTrackImpl,iface);
-
-	FIXME("(%p, %s): stub\n", This, debugstr_guid(rguidNotificationType));
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicTrackImpl_RemoveNotificationType (LPDIRECTMUSICTRACK iface, REFGUID rguidNotificationType)
-{
-	ICOM_THIS(IDirectMusicTrackImpl,iface);
-
-	FIXME("(%p, %s): stub\n", This, debugstr_guid(rguidNotificationType));
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicTrackImpl_Clone (LPDIRECTMUSICTRACK iface, MUSIC_TIME mtStart, MUSIC_TIME mtEnd, IDirectMusicTrack** ppTrack)
-{
-	ICOM_THIS(IDirectMusicTrackImpl,iface);
-
-	FIXME("(%p, %ld, %ld, %p): stub\n", This, mtStart, mtEnd, ppTrack);
-
-	return S_OK;
-}
-
-ICOM_VTABLE(IDirectMusicTrack) DirectMusicTrack_Vtbl =
-{
-    ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
-	IDirectMusicTrackImpl_QueryInterface,
-	IDirectMusicTrackImpl_AddRef,
-	IDirectMusicTrackImpl_Release,
-	IDirectMusicTrackImpl_Init,
-	IDirectMusicTrackImpl_InitPlay,
-	IDirectMusicTrackImpl_EndPlay,
-	IDirectMusicTrackImpl_Play,
-	IDirectMusicTrackImpl_GetParam,
-	IDirectMusicTrackImpl_SetParam,
-	IDirectMusicTrackImpl_IsParamSupported,
-	IDirectMusicTrackImpl_AddNotificationType,
-	IDirectMusicTrackImpl_RemoveNotificationType,
-	IDirectMusicTrackImpl_Clone
-};
-
-/* IDirectMusicTrack8 IUnknown parts follow: */
+/* IDirectMusicTrack8 IUnknown part follow: */
 HRESULT WINAPI IDirectMusicTrack8Impl_QueryInterface (LPDIRECTMUSICTRACK8 iface, REFIID riid, LPVOID *ppobj)
 {
 	ICOM_THIS(IDirectMusicTrack8Impl,iface);
 
-	if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicTrack8))
+	if (IsEqualGUID(riid, &IID_IUnknown) || 
+	    IsEqualGUID(riid, &IID_IDirectMusicTrack) ||
+	    IsEqualGUID(riid, &IID_IDirectMusicTrack8))
 	{
 		IDirectMusicTrack8Impl_AddRef(iface);
 		*ppobj = This;
 		return S_OK;
 	}
-	WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
+	WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
 	return E_NOINTERFACE;
 }
 
@@ -423,6 +183,7 @@
 	}
 	return ref;
 }
+
 /* IDirectMusicTrack Interface part follow: */
 HRESULT WINAPI IDirectMusicTrack8Impl_Init (LPDIRECTMUSICTRACK8 iface, IDirectMusicSegment* pSegment)
 {
@@ -515,7 +276,6 @@
 }
 
 /* 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)
 {
 	ICOM_THIS(IDirectMusicTrack8Impl,iface);
Index: dmusic_private.h
===================================================================
RCS file: /home/wine/wine/dlls/dmusic/dmusic_private.h,v
retrieving revision 1.10
diff -u -r1.10 dmusic_private.h
--- dmusic_private.h	24 Jun 2003 02:26:07 -0000	1.10
+++ dmusic_private.h	25 Jun 2003 20:12:18 -0000
@@ -34,7 +34,6 @@
 /*****************************************************************************
  * Interfaces
  */
-typedef struct IDirectMusicImpl IDirectMusicImpl;
 typedef struct IDirectMusic8Impl IDirectMusic8Impl;
 typedef struct IDirectMusicBufferImpl IDirectMusicBufferImpl;
 typedef struct IDirectMusicInstrumentImpl IDirectMusicInstrumentImpl;
@@ -46,29 +45,21 @@
 typedef struct IDirectMusicThruImpl IDirectMusicThruImpl;
 typedef struct IReferenceClockImpl IReferenceClockImpl;
 
-typedef struct IDirectMusicSynthImpl IDirectMusicSynthImpl;
 typedef struct IDirectMusicSynth8Impl IDirectMusicSynth8Impl;
 typedef struct IDirectMusicSynthSinkImpl IDirectMusicSynthSinkImpl;
 
-typedef struct IDirectMusicToolImpl IDirectMusicToolImpl;
 typedef struct IDirectMusicTool8Impl IDirectMusicTool8Impl;
-typedef struct IDirectMusicTrackImpl IDirectMusicTrackImpl;
 typedef struct IDirectMusicTrack8Impl IDirectMusicTrack8Impl;
 
 typedef struct IDirectMusicBandImpl IDirectMusicBandImpl;
 typedef struct IDirectMusicObjectImpl IDirectMusicObjectImpl;
-typedef struct IDirectMusicLoaderImpl IDirectMusicLoaderImpl;
 typedef struct IDirectMusicLoader8Impl IDirectMusicLoader8Impl;
 typedef struct IDirectMusicGetLoaderImpl IDirectMusicGetLoaderImpl;
-typedef struct IDirectMusicSegmentImpl IDirectMusicSegmentImpl;
 typedef struct IDirectMusicSegment8Impl IDirectMusicSegment8Impl;
-typedef struct IDirectMusicSegmentStateImpl IDirectMusicSegmentStateImpl;
 typedef struct IDirectMusicSegmentState8Impl IDirectMusicSegmentState8Impl;
 typedef struct IDirectMusicAudioPathImpl IDirectMusicAudioPathImpl;
-typedef struct IDirectMusicPerformanceImpl IDirectMusicPerformanceImpl;
 typedef struct IDirectMusicPerformance8Impl IDirectMusicPerformance8Impl;
 typedef struct IDirectMusicGraphImpl IDirectMusicGraphImpl;
-typedef struct IDirectMusicStyleImpl IDirectMusicStyleImpl;
 typedef struct IDirectMusicStyle8Impl IDirectMusicStyle8Impl;
 typedef struct IDirectMusicChordMapImpl IDirectMusicChordMapImpl;
 typedef struct IDirectMusicComposerImpl IDirectMusicComposerImpl;
@@ -80,7 +71,6 @@
 /*****************************************************************************
  * Predeclare the interface implementation structures
  */
-extern ICOM_VTABLE(IDirectMusic) DirectMusic_Vtbl;
 extern ICOM_VTABLE(IDirectMusic8) DirectMusic8_Vtbl;
 extern ICOM_VTABLE(IDirectMusicBuffer) DirectMusicBuffer_Vtbl;
 extern ICOM_VTABLE(IDirectMusicInstrument) DirectMusicInstrument_Vtbl;
@@ -92,29 +82,21 @@
 extern ICOM_VTABLE(IDirectMusicThru) DirectMusicThru_Vtbl;
 extern ICOM_VTABLE(IReferenceClock) ReferenceClock_Vtbl;
 
-extern ICOM_VTABLE(IDirectMusicSynth) DirectMusicSynth;
-extern ICOM_VTABLE(IDirectMusicSynth8) DirectMusicSynth8;
-extern ICOM_VTABLE(IDirectMusicSynthSink) DirectMusicSynthSink;
-
-extern ICOM_VTABLE(IDirectMusicTool) DirectMusicTool;
-extern ICOM_VTABLE(IDirectMusicTool8) DirectMusicTool8;
-extern ICOM_VTABLE(IDirectMusicTrack) DirectMusicTrack;
-extern ICOM_VTABLE(IDirectMusicTrack8) DirectMusicTrack8;
-
-extern ICOM_VTABLE(IDirectMusicBand) DirectMusicBand;
-extern ICOM_VTABLE(IDirectMusicObject) DirectMusicObject;
-extern ICOM_VTABLE(IDirectMusicLoader) DirectMusicLoader;
-extern ICOM_VTABLE(IDirectMusicLoader8) DirectMusicLoader8;
-extern ICOM_VTABLE(IDirectMusicGetLoader) DirectMusicGetLoader;
-extern ICOM_VTABLE(IDirectMusicSegment) DirectMusicSegment;
-extern ICOM_VTABLE(IDirectMusicSegment8) DirectMusicSegment8;
-extern ICOM_VTABLE(IDirectMusicSegmentState) DirectMusicSegmentState;
-extern ICOM_VTABLE(IDirectMusicSegmentState8) DirectMusicSegmentState8;
+extern ICOM_VTABLE(IDirectMusicSynth8) DirectMusicSynth8_Vtbl;
+extern ICOM_VTABLE(IDirectMusicSynthSink) DirectMusicSynthSink_Vtbl;
+
+extern ICOM_VTABLE(IDirectMusicTool8) DirectMusicTool8_Vtbl;
+extern ICOM_VTABLE(IDirectMusicTrack8) DirectMusicTrack8_Vtbl;
+
+extern ICOM_VTABLE(IDirectMusicBand) DirectMusicBand_Vtbl;
+extern ICOM_VTABLE(IDirectMusicObject) DirectMusicObject_Vtbl;
+extern ICOM_VTABLE(IDirectMusicLoader8) DirectMusicLoader8_Vtbl;
+extern ICOM_VTABLE(IDirectMusicGetLoader) DirectMusicGetLoader_Vtbl;
+extern ICOM_VTABLE(IDirectMusicSegment8) DirectMusicSegment8_Vtbl;
+extern ICOM_VTABLE(IDirectMusicSegmentState8) DirectMusicSegmentState8_Vtbl;
 extern ICOM_VTABLE(IDirectMusicAudioPath) DirectMusicAudioPath_Vtbl;
-extern ICOM_VTABLE(IDirectMusicPerformance) DirectMusicPerformance_Vtbl;
 extern ICOM_VTABLE(IDirectMusicPerformance8) DirectMusicPerformance8_Vtbl;
 extern ICOM_VTABLE(IDirectMusicGraph) DirectMusicGraph_Vtbl;
-extern ICOM_VTABLE(IDirectMusicStyle) DirectMusicStyle_Vtbl;
 extern ICOM_VTABLE(IDirectMusicStyle8) DirectMusicStyle8_Vtbl;
 extern ICOM_VTABLE(IDirectMusicChordMap) DirectMusicChordMap_Vtbl;
 extern ICOM_VTABLE(IDirectMusicComposer) DirectMusicComposer_Vtbl;
@@ -204,36 +186,13 @@
 } BandTrack;
 
 /*****************************************************************************
- * IDirectMusicImpl implementation structure
+ * ClassFactory
+ *
+ * can support IID_IDirectMusic and IID_IDirectMusic8
+ * return always an IDirectMusic8Impl
  */
-struct IDirectMusicImpl
-{
-  /* IUnknown fields */
-  ICOM_VFIELD(IDirectMusic);
-  DWORD          ref;
-
-  /* IDirectMusicImpl fields */
-  IDirectMusicPortImpl** ports;
-  int nrofports;
-};
+extern HRESULT WINAPI DMUSIC_CreateDirectMusic (LPCGUID lpcGUID, LPDIRECTMUSIC* ppDM, LPUNKNOWN pUnkOuter);
 
-/* IUnknown: */
-extern HRESULT WINAPI IDirectMusicImpl_QueryInterface (LPDIRECTMUSIC iface, REFIID riid, LPVOID *ppobj);
-extern ULONG WINAPI   IDirectMusicImpl_AddRef (LPDIRECTMUSIC iface);
-extern ULONG WINAPI   IDirectMusicImpl_Release (LPDIRECTMUSIC iface);
-/* IDirectMusicImpl: */
-extern HRESULT WINAPI IDirectMusicImpl_EnumPort (LPDIRECTMUSIC iface, DWORD dwIndex, LPDMUS_PORTCAPS pPortCaps);
-extern HRESULT WINAPI IDirectMusicImpl_CreateMusicBuffer (LPDIRECTMUSIC iface, LPDMUS_BUFFERDESC pBufferDesc, LPDIRECTMUSICBUFFER** ppBuffer, LPUNKNOWN pUnkOuter);
-extern HRESULT WINAPI IDirectMusicImpl_CreatePort (LPDIRECTMUSIC iface, REFCLSID rclsidPort, LPDMUS_PORTPARAMS pPortParams, LPDIRECTMUSICPORT* ppPort, LPUNKNOWN pUnkOuter);
-extern HRESULT WINAPI IDirectMusicImpl_EnumMasterClock (LPDIRECTMUSIC iface, DWORD dwIndex, LPDMUS_CLOCKINFO lpClockInfo);
-extern HRESULT WINAPI IDirectMusicImpl_GetMasterClock (LPDIRECTMUSIC iface, LPGUID pguidClock, IReferenceClock** ppReferenceClock);
-extern HRESULT WINAPI IDirectMusicImpl_SetMasterClock (LPDIRECTMUSIC iface, REFGUID rguidClock);
-extern HRESULT WINAPI IDirectMusicImpl_Activate (LPDIRECTMUSIC iface, BOOL fEnable);
-extern HRESULT WINAPI IDirectMusicImpl_GetDefaultPort (LPDIRECTMUSIC iface, LPGUID pguidPort);
-extern HRESULT WINAPI IDirectMusicImpl_SetDirectSound (LPDIRECTMUSIC iface, LPDIRECTSOUND pDirectSound, HWND hWnd);
-
-/* ClassFactory */
-extern HRESULT WINAPI DMUSIC_CreateDirectMusic (LPCGUID lpcGUID, LPDIRECTMUSIC *ppDM, LPUNKNOWN pUnkOuter);
 
 /*****************************************************************************
  * IDirectMusic8Impl implementation structure
@@ -244,7 +203,7 @@
   ICOM_VFIELD(IDirectMusic8);
   DWORD          ref;
 
-  /* IDirectMusic8Impl fields */
+  /* IDirectMusicImpl fields */
   IDirectMusicPortImpl** ports;
   int nrofports;
 };
@@ -253,7 +212,7 @@
 extern HRESULT WINAPI IDirectMusic8Impl_QueryInterface (LPDIRECTMUSIC8 iface, REFIID riid, LPVOID *ppobj);
 extern ULONG WINAPI   IDirectMusic8Impl_AddRef (LPDIRECTMUSIC8 iface);
 extern ULONG WINAPI   IDirectMusic8Impl_Release (LPDIRECTMUSIC8 iface);
-/* IDirectMusic8Impl: */
+/* IDirectMusic: */
 extern HRESULT WINAPI IDirectMusic8Impl_EnumPort (LPDIRECTMUSIC8 iface, DWORD dwIndex, LPDMUS_PORTCAPS pPortCaps);
 extern HRESULT WINAPI IDirectMusic8Impl_CreateMusicBuffer (LPDIRECTMUSIC8 iface, LPDMUS_BUFFERDESC pBufferDesc, LPDIRECTMUSICBUFFER** ppBuffer, LPUNKNOWN pUnkOuter);
 extern HRESULT WINAPI IDirectMusic8Impl_CreatePort (LPDIRECTMUSIC8 iface, REFCLSID rclsidPort, LPDMUS_PORTPARAMS pPortParams, LPDIRECTMUSICPORT* ppPort, LPUNKNOWN pUnkOuter);
@@ -263,8 +222,10 @@
 extern HRESULT WINAPI IDirectMusic8Impl_Activate (LPDIRECTMUSIC8 iface, BOOL fEnable);
 extern HRESULT WINAPI IDirectMusic8Impl_GetDefaultPort (LPDIRECTMUSIC8 iface, LPGUID pguidPort);
 extern HRESULT WINAPI IDirectMusic8Impl_SetDirectSound (LPDIRECTMUSIC8 iface, LPDIRECTSOUND pDirectSound, HWND hWnd);
+/* IDirectMusic8: */
 extern HRESULT WINAPI IDirectMusic8Impl_SetExternalMasterClock (LPDIRECTMUSIC8 iface, IReferenceClock* pClock);
 
+
 /*****************************************************************************
  * IDirectMusicBufferImpl implementation structure
  */
@@ -296,6 +257,7 @@
 extern HRESULT WINAPI IDirectMusicBufferImpl_SetStartTime (LPDIRECTMUSICBUFFER iface, REFERENCE_TIME rt);
 extern HRESULT WINAPI IDirectMusicBufferImpl_SetUsedBytes (LPDIRECTMUSICBUFFER iface, DWORD cb);
 
+
 /*****************************************************************************
  * IDirectMusicInstrumentImpl implementation structure
  */
@@ -317,6 +279,7 @@
 extern HRESULT WINAPI IDirectMusicInstrumentImpl_GetPatch (LPDIRECTMUSICINSTRUMENT iface, DWORD* pdwPatch);
 extern HRESULT WINAPI IDirectMusicInstrumentImpl_SetPatch (LPDIRECTMUSICINSTRUMENT iface, DWORD dwPatch);
 
+
 /*****************************************************************************
  * IDirectMusicDownloadedInstrumentImpl implementation structure
  */
@@ -336,6 +299,7 @@
 /* IDirectMusicDownloadedInstrumentImpl: */
 /* none yet */
 
+
 /*****************************************************************************
  * IDirectMusicCollectionImpl implementation structure
  */
@@ -356,6 +320,7 @@
 HRESULT WINAPI IDirectMusicCollectionImpl_GetInstrument (LPDIRECTMUSICCOLLECTION iface, DWORD dwPatch, IDirectMusicInstrument** ppInstrument);
 HRESULT WINAPI IDirectMusicCollectionImpl_EnumInstrument (LPDIRECTMUSICCOLLECTION iface, DWORD dwIndex, DWORD* pdwPatch, LPWSTR pwszName, DWORD dwNameLen);
 
+
 /*****************************************************************************
  * IDirectMusicDownloadImpl implementation structure
  */
@@ -375,6 +340,7 @@
 /* IDirectMusicImpl: */
 extern HRESULT WINAPI IDirectMusicDownloadImpl_GetBuffer (LPDIRECTMUSICDOWNLOAD iface, void** ppvBuffer, DWORD* pdwSize);
 
+
 /*****************************************************************************
  * IDirectMusicPortDownloadImpl implementation structure
  */
@@ -438,6 +404,7 @@
 extern HRESULT WINAPI IDirectMusicPortImpl_SetDirectSound (LPDIRECTMUSICPORT iface, LPDIRECTSOUND pDirectSound, LPDIRECTSOUNDBUFFER pDirectSoundBuffer);
 extern HRESULT WINAPI IDirectMusicPortImpl_GetFormat (LPDIRECTMUSICPORT iface, LPWAVEFORMATEX pWaveFormatEx, LPDWORD pdwWaveFormatExSize, LPDWORD pdwBufferSize);
 
+
 /*****************************************************************************
  * IDirectMusicThruImpl implementation structure
  */
@@ -457,6 +424,7 @@
 /* IDirectMusicPortDownloadImpl: */
 extern HRESULT WINAPI ThruChannel (LPDIRECTMUSICTHRU iface, DWORD dwSourceChannelGroup, DWORD dwSourceChannel, DWORD dwDestinationChannelGroup, DWORD dwDestinationChannel, LPDIRECTMUSICPORT pDestinationPort);
 
+
 /*****************************************************************************
  * IReferenceClockImpl implementation structure
  */
@@ -481,41 +449,6 @@
 
 
 /*****************************************************************************
- * IDirectMusicSynthImpl implementation structure
- */
-struct IDirectMusicSynthImpl
-{
-  /* IUnknown fields */
-  ICOM_VFIELD(IDirectMusicSynth);
-  DWORD          ref;
-
-  /* IDirectMusicSynth fields */
-};
-
-/* IUnknown: */
-extern HRESULT WINAPI IDirectMusicSynthImpl_QueryInterface (LPDIRECTMUSICSYNTH iface, REFIID riid, LPVOID *ppobj);
-extern ULONG WINAPI   IDirectMusicSynthImpl_AddRef (LPDIRECTMUSICSYNTH iface);
-extern ULONG WINAPI   IDirectMusicSynthImpl_Release (LPDIRECTMUSICSYNTH iface);
-/* IDirectMusicSynth: */
-extern HRESULT WINAPI IDirectMusicSynthImpl_Open (LPDIRECTMUSICSYNTH iface,LPDMUS_PORTPARAMS pPortParams);
-extern HRESULT WINAPI IDirectMusicSynthImpl_Close (LPDIRECTMUSICSYNTH iface);
-extern HRESULT WINAPI IDirectMusicSynthImpl_SetNumChannelGroups (LPDIRECTMUSICSYNTH iface, DWORD dwGroups);
-extern HRESULT WINAPI IDirectMusicSynthImpl_Download (LPDIRECTMUSICSYNTH iface, LPHANDLE phDownload, LPVOID pvData, LPBOOL pbFree);
-extern HRESULT WINAPI IDirectMusicSynthImpl_Unload (LPDIRECTMUSICSYNTH iface, HANDLE hDownload, HRESULT (CALLBACK* lpFreeHandle)(HANDLE,HANDLE), HANDLE hUserData);
-extern HRESULT WINAPI IDirectMusicSynthImpl_PlayBuffer (LPDIRECTMUSICSYNTH iface, REFERENCE_TIME rt, LPBYTE pbBuffer, DWORD cbBuffer);
-extern HRESULT WINAPI IDirectMusicSynthImpl_GetRunningStats (LPDIRECTMUSICSYNTH iface, LPDMUS_SYNTHSTATS pStats);
-extern HRESULT WINAPI IDirectMusicSynthImpl_GetPortCaps (LPDIRECTMUSICSYNTH iface, LPDMUS_PORTCAPS pCaps);
-extern HRESULT WINAPI IDirectMusicSynthImpl_SetMasterClock (LPDIRECTMUSICSYNTH iface, IReferenceClock* pClock);
-extern HRESULT WINAPI IDirectMusicSynthImpl_GetLatencyClock (LPDIRECTMUSICSYNTH iface, IReferenceClock** ppClock);
-extern HRESULT WINAPI IDirectMusicSynthImpl_Activate (LPDIRECTMUSICSYNTH iface, BOOL fEnable);
-extern HRESULT WINAPI IDirectMusicSynthImpl_SetSynthSink (LPDIRECTMUSICSYNTH iface, IDirectMusicSynthSink* pSynthSink);
-extern HRESULT WINAPI IDirectMusicSynthImpl_Render (LPDIRECTMUSICSYNTH iface, short* pBuffer, DWORD dwLength, LONGLONG llPosition);
-extern HRESULT WINAPI IDirectMusicSynthImpl_SetChannelPriority (LPDIRECTMUSICSYNTH iface, DWORD dwChannelGroup, DWORD dwChannel, DWORD dwPriority);
-extern HRESULT WINAPI IDirectMusicSynthImpl_GetChannelPriority (LPDIRECTMUSICSYNTH iface, DWORD dwChannelGroup, DWORD dwChannel, LPDWORD pdwPriority);
-extern HRESULT WINAPI IDirectMusicSynthImpl_GetFormat (LPDIRECTMUSICSYNTH iface, LPWAVEFORMATEX pWaveFormatEx, LPDWORD pdwWaveFormatExSiz);
-extern HRESULT WINAPI IDirectMusicSynthImpl_GetAppend (LPDIRECTMUSICSYNTH iface, DWORD* pdwAppend);
-	
-/*****************************************************************************
  * IDirectMusicSynth8Impl implementation structure
  */
 struct IDirectMusicSynth8Impl
@@ -556,6 +489,7 @@
 extern HRESULT WINAPI IDirectMusicSynth8Impl_Refresh (LPDIRECTMUSICSYNTH8 iface, DWORD dwDownloadID, DWORD dwFlags);
 extern HRESULT WINAPI IDirectMusicSynth8Impl_AssignChannelToBuses (LPDIRECTMUSICSYNTH8 iface, DWORD dwChannelGroup, DWORD dwChannel, LPDWORD pdwBuses, DWORD cBuses);
 
+
 /*****************************************************************************
  * IDirectMusicSynthSinkImpl implementation structure
  */
@@ -584,32 +518,6 @@
 
 
 /*****************************************************************************
- * IDirectMusicToolImpl implementation structure
- */
-struct IDirectMusicToolImpl
-{
-  /* IUnknown fields */
-  ICOM_VFIELD(IDirectMusicTool);
-  DWORD          ref;
-
-  /* IDirectMusicToolImpl fields */
-  IDirectMusicToolImpl* prev;
-  IDirectMusicToolImpl* next;
-};
-
-/* IUnknown: */
-extern HRESULT WINAPI IDirectMusicToolImpl_QueryInterface (LPDIRECTMUSICTOOL iface, REFIID riid, LPVOID *ppobj);
-extern ULONG WINAPI   IDirectMusicToolImpl_AddRef (LPDIRECTMUSICTOOL iface);
-extern ULONG WINAPI   IDirectMusicToolImpl_Release (LPDIRECTMUSICTOOL iface);
-/* IDirectMusicToolImpl: */
-extern HRESULT WINAPI IDirectMusicToolImpl_Init (LPDIRECTMUSICTOOL iface, IDirectMusicGraph* pGraph);
-extern HRESULT WINAPI IDirectMusicToolImpl_GetMsgDeliveryType (LPDIRECTMUSICTOOL iface, DWORD* pdwDeliveryType);
-extern HRESULT WINAPI IDirectMusicToolImpl_GetMediaTypeArraySize (LPDIRECTMUSICTOOL iface, DWORD* pdwNumElements);
-extern HRESULT WINAPI IDirectMusicToolImpl_GetMediaTypes (LPDIRECTMUSICTOOL iface, DWORD** padwMediaTypes, DWORD dwNumElements);
-extern HRESULT WINAPI IDirectMusicToolImpl_ProcessPMsg (LPDIRECTMUSICTOOL iface, IDirectMusicPerformance* pPerf, DMUS_PMSG* pPMSG);
-extern HRESULT WINAPI IDirectMusicToolImpl_Flush (LPDIRECTMUSICTOOL iface, IDirectMusicPerformance* pPerf, DMUS_PMSG* pPMSG, REFERENCE_TIME rtTime);
-
-/*****************************************************************************
  * IDirectMusicTool8Impl implementation structure
  */
 struct IDirectMusicTool8Impl
@@ -619,8 +527,8 @@
   DWORD          ref;
 
   /* IDirectMusicTool8Impl fields */
-  IDirectMusicToolImpl* prev;
-  IDirectMusicToolImpl* next;
+  IDirectMusicTool8Impl* prev;
+  IDirectMusicTool8Impl* next;
 };
 
 /* IUnknown: */
@@ -636,33 +544,7 @@
 extern HRESULT WINAPI IDirectMusicTool8Impl_Flush (LPDIRECTMUSICTOOL8 iface, IDirectMusicPerformance* pPerf, DMUS_PMSG* pPMSG, REFERENCE_TIME rtTime);
 /* IDirectMusicToolImpl8: */
 extern HRESULT WINAPI IDirectMusicTool8Impl_Clone (LPDIRECTMUSICTOOL8 iface, IDirectMusicTool** ppTool);
-/*****************************************************************************
- * IDirectMusicTrackImpl implementation structure
- */
-struct IDirectMusicTrackImpl
-{
-  /* IUnknown fields */
-  ICOM_VFIELD(IDirectMusicTrack);
-  DWORD          ref;
 
-  /* IDirectMusicTrackImpl fields */
-};
-
-/* IUnknown: */
-extern HRESULT WINAPI IDirectMusicTrackImpl_QueryInterface (LPDIRECTMUSICTRACK iface, REFIID riid, LPVOID *ppobj);
-extern ULONG WINAPI   IDirectMusicTrackImpl_AddRef (LPDIRECTMUSICTRACK iface);
-extern ULONG WINAPI   IDirectMusicTrackImpl_Release (LPDIRECTMUSICTRACK iface);
-/* IDirectMusicTrack: */
-extern HRESULT WINAPI IDirectMusicTrackImpl_Init (LPDIRECTMUSICTRACK iface, IDirectMusicSegment* pSegment);
-extern HRESULT WINAPI IDirectMusicTrackImpl_InitPlay (LPDIRECTMUSICTRACK iface, IDirectMusicSegmentState* pSegmentState, IDirectMusicPerformance* pPerformance, void** ppStateData, DWORD dwVirtualTrackID, DWORD dwFlags);
-extern HRESULT WINAPI IDirectMusicTrackImpl_EndPlay (LPDIRECTMUSICTRACK iface, void* pStateData);
-extern HRESULT WINAPI IDirectMusicTrackImpl_Play (LPDIRECTMUSICTRACK iface, void* pStateData, MUSIC_TIME mtStart, MUSIC_TIME mtEnd, MUSIC_TIME mtOffset, DWORD dwFlags, IDirectMusicPerformance* pPerf, IDirectMusicSegmentState* pSegSt, DWORD dwVirtualID);
-extern HRESULT WINAPI IDirectMusicTrackImpl_GetParam (LPDIRECTMUSICTRACK iface, REFGUID rguidType, MUSIC_TIME mtTime, MUSIC_TIME* pmtNext, void* pParam);
-extern HRESULT WINAPI IDirectMusicTrackImpl_SetParam (LPDIRECTMUSICTRACK iface, REFGUID rguidType, MUSIC_TIME mtTime, void* pParam);
-extern HRESULT WINAPI IDirectMusicTrackImpl_IsParamSupported (LPDIRECTMUSICTRACK iface, REFGUID rguidType);
-extern HRESULT WINAPI IDirectMusicTrackImpl_AddNotificationType (LPDIRECTMUSICTRACK iface, REFGUID rguidNotificationType);
-extern HRESULT WINAPI IDirectMusicTrackImpl_RemoveNotificationType (LPDIRECTMUSICTRACK iface, REFGUID rguidNotificationType);
-extern HRESULT WINAPI IDirectMusicTrackImpl_Clone (LPDIRECTMUSICTRACK iface, MUSIC_TIME mtStart, MUSIC_TIME mtEnd, IDirectMusicTrack** ppTrack);
 
 /*****************************************************************************
  * IDirectMusicTrack8Impl implementation structure
@@ -720,6 +602,7 @@
 extern HRESULT WINAPI IDirectMusicBandImpl_Download (LPDIRECTMUSICBAND iface, IDirectMusicPerformance* pPerformance);
 extern HRESULT WINAPI IDirectMusicBandImpl_Unload (LPDIRECTMUSICBAND iface, IDirectMusicPerformance* pPerformance);
 
+
 /*****************************************************************************
  * IDirectMusicObjectImpl implementation structure
  */
@@ -742,33 +625,6 @@
 extern HRESULT WINAPI IDirectMusicObjectImpl_SetDescriptor (LPDIRECTMUSICOBJECT iface, LPDMUS_OBJECTDESC pDesc);
 extern HRESULT WINAPI IDirectMusicObjectImpl_ParseDescriptor (LPDIRECTMUSICOBJECT iface, LPSTREAM pStream, LPDMUS_OBJECTDESC pDesc);
 
-/*****************************************************************************
- * IDirectMusicLoaderImpl implementation structure
- */
-struct IDirectMusicLoaderImpl
-{
-  /* IUnknown fields */
-  ICOM_VFIELD(IDirectMusicLoader);
-  DWORD          ref;
-
-  /* IDirectMusicLoaderImpl fields */
-  WCHAR          searchPath[MAX_PATH];
-};
-
-/* IUnknown: */
-extern HRESULT WINAPI IDirectMusicLoaderImpl_QueryInterface (LPDIRECTMUSICLOADER iface, REFIID riid, LPVOID *ppobj);
-extern ULONG WINAPI   IDirectMusicLoaderImpl_AddRef (LPDIRECTMUSICLOADER iface);
-extern ULONG WINAPI   IDirectMusicLoaderImpl_Release (LPDIRECTMUSICLOADER iface);
-/* IDirectMusicLoader: */
-extern HRESULT WINAPI IDirectMusicLoaderImpl_GetObject (LPDIRECTMUSICLOADER iface, LPDMUS_OBJECTDESC pDesc, REFIID riid, LPVOID*ppv);
-extern HRESULT WINAPI IDirectMusicLoaderImpl_SetObject (LPDIRECTMUSICLOADER iface, LPDMUS_OBJECTDESC pDesc);
-extern HRESULT WINAPI IDirectMusicLoaderImpl_SetSearchDirectory (LPDIRECTMUSICLOADER iface, REFGUID rguidClass, WCHAR* pwzPath, BOOL fClear);
-extern HRESULT WINAPI IDirectMusicLoaderImpl_ScanDirectory (LPDIRECTMUSICLOADER iface, REFGUID rguidClass, WCHAR* pwzFileExtension, WCHAR* pwzScanFileName);
-extern HRESULT WINAPI IDirectMusicLoaderImpl_CacheObject (LPDIRECTMUSICLOADER iface, IDirectMusicObject* pObject);
-extern HRESULT WINAPI IDirectMusicLoaderImpl_ReleaseObject (LPDIRECTMUSICLOADER iface, IDirectMusicObject* pObject);
-extern HRESULT WINAPI IDirectMusicLoaderImpl_ClearCache (LPDIRECTMUSICLOADER iface, REFGUID rguidClass);
-extern HRESULT WINAPI IDirectMusicLoaderImpl_EnableCache (LPDIRECTMUSICLOADER iface, REFGUID rguidClass, BOOL fEnable);
-extern HRESULT WINAPI IDirectMusicLoaderImpl_EnumObject (LPDIRECTMUSICLOADER iface, REFGUID rguidClass, DWORD dwIndex, LPDMUS_OBJECTDESC pDesc);
 
 /*****************************************************************************
  * IDirectMusicLoader8Impl implementation structure
@@ -799,12 +655,13 @@
 extern HRESULT WINAPI IDirectMusicLoader8Impl_EnableCache (LPDIRECTMUSICLOADER8 iface, REFGUID rguidClass, BOOL fEnable);
 extern HRESULT WINAPI IDirectMusicLoader8Impl_EnumObject (LPDIRECTMUSICLOADER8 iface, REFGUID rguidClass, DWORD dwIndex, LPDMUS_OBJECTDESC pDesc);
 /* IDirectMusicLoader8: */
-extern void WINAPI IDirectMusicLoader8Impl_CollectGarbage (LPDIRECTMUSICLOADER8 iface);
+extern void    WINAPI IDirectMusicLoader8Impl_CollectGarbage (LPDIRECTMUSICLOADER8 iface);
 extern HRESULT WINAPI IDirectMusicLoader8Impl_ReleaseObjectByUnknown (LPDIRECTMUSICLOADER8 iface, IUnknown* pObject);
 extern HRESULT WINAPI IDirectMusicLoader8Impl_LoadObjectFromFile (LPDIRECTMUSICLOADER8 iface, REFGUID rguidClassID, REFIID iidInterfaceID, WCHAR* pwzFilePath, void** ppObject);
 /* ClassFactory */
 extern HRESULT WINAPI DMUSIC_CreateDirectMusicLoader8 (LPCGUID lpcGUID, LPDIRECTMUSICLOADER8 *ppDMLoad8, LPUNKNOWN pUnkOuter);
 
+
 /*****************************************************************************
  * IDirectMusicGetLoaderImpl implementation structure
  */
@@ -824,46 +681,6 @@
 /* IDirectMusicGetLoader: */
 extern HRESULT WINAPI IDirectMusicGetLoaderImpl_GetLoader (LPDIRECTMUSICGETLOADER iface, IDirectMusicLoader** ppLoader);
 
-/*****************************************************************************
- * IDirectMusicSegmentImpl implementation structure
- */
-struct IDirectMusicSegmentImpl
-{
-  /* IUnknown fields */
-  ICOM_VFIELD(IDirectMusicSegment);
-  DWORD          ref;
-
-  /* IDirectMusicSegmentImpl fields */  
-};
-
-/* IUnknown: */
-extern HRESULT WINAPI IDirectMusicSegmentImpl_QueryInterface (LPDIRECTMUSICSEGMENT iface, REFIID riid, LPVOID *ppobj);
-extern ULONG WINAPI   IDirectMusicSegmentImpl_AddRef (LPDIRECTMUSICSEGMENT iface);
-extern ULONG WINAPI   IDirectMusicSegmentImpl_Release (LPDIRECTMUSICSEGMENT iface);
-/* IDirectMusicSegment: */
-extern HRESULT WINAPI IDirectMusicSegmentImpl_GetLength (LPDIRECTMUSICSEGMENT iface, MUSIC_TIME* pmtLength);
-extern HRESULT WINAPI IDirectMusicSegmentImpl_SetLength (LPDIRECTMUSICSEGMENT iface, MUSIC_TIME mtLength);
-extern HRESULT WINAPI IDirectMusicSegmentImpl_GetRepeats (LPDIRECTMUSICSEGMENT iface, DWORD* pdwRepeats);
-extern HRESULT WINAPI IDirectMusicSegmentImpl_SetRepeats (LPDIRECTMUSICSEGMENT iface, DWORD dwRepeats);
-extern HRESULT WINAPI IDirectMusicSegmentImpl_GetDefaultResolution (LPDIRECTMUSICSEGMENT iface, DWORD* pdwResolution);
-extern HRESULT WINAPI IDirectMusicSegmentImpl_SetDefaultResolution (LPDIRECTMUSICSEGMENT iface, DWORD dwResolution);
-extern HRESULT WINAPI IDirectMusicSegmentImpl_GetTrack (LPDIRECTMUSICSEGMENT iface, REFGUID rguidType, DWORD dwGroupBits, DWORD dwIndex, IDirectMusicTrack** ppTrack);
-extern HRESULT WINAPI IDirectMusicSegmentImpl_GetTrackGroup (LPDIRECTMUSICSEGMENT iface, IDirectMusicTrack* pTrack, DWORD* pdwGroupBits);
-extern HRESULT WINAPI IDirectMusicSegmentImpl_InsertTrack (LPDIRECTMUSICSEGMENT iface, IDirectMusicTrack* pTrack, DWORD dwGroupBits);
-extern HRESULT WINAPI IDirectMusicSegmentImpl_RemoveTrack (LPDIRECTMUSICSEGMENT iface, IDirectMusicTrack* pTrack);
-extern HRESULT WINAPI IDirectMusicSegmentImpl_InitPlay (LPDIRECTMUSICSEGMENT iface, IDirectMusicSegmentState** ppSegState, IDirectMusicPerformance* pPerformance, DWORD dwFlags);
-extern HRESULT WINAPI IDirectMusicSegmentImpl_GetGraph (LPDIRECTMUSICSEGMENT iface, IDirectMusicGraph** ppGraph);
-extern HRESULT WINAPI IDirectMusicSegmentImpl_SetGraph (LPDIRECTMUSICSEGMENT iface, IDirectMusicGraph* pGraph);
-extern HRESULT WINAPI IDirectMusicSegmentImpl_AddNotificationType (LPDIRECTMUSICSEGMENT iface, REFGUID rguidNotificationType);
-extern HRESULT WINAPI IDirectMusicSegmentImpl_RemoveNotificationType (LPDIRECTMUSICSEGMENT iface, REFGUID rguidNotificationType);
-extern HRESULT WINAPI IDirectMusicSegmentImpl_GetParam (LPDIRECTMUSICSEGMENT iface, REFGUID rguidType, DWORD dwGroupBits, DWORD dwIndex, MUSIC_TIME mtTime, MUSIC_TIME* pmtNext, void* pParam);
-extern HRESULT WINAPI IDirectMusicSegmentImpl_SetParam (LPDIRECTMUSICSEGMENT iface, REFGUID rguidType, DWORD dwGroupBits, DWORD dwIndex, MUSIC_TIME mtTime, void* pParam);
-extern HRESULT WINAPI IDirectMusicSegmentImpl_Clone (LPDIRECTMUSICSEGMENT iface, MUSIC_TIME mtStart, MUSIC_TIME mtEnd, IDirectMusicSegment** ppSegment);
-extern HRESULT WINAPI IDirectMusicSegmentImpl_SetStartPoint (LPDIRECTMUSICSEGMENT iface, MUSIC_TIME mtStart);
-extern HRESULT WINAPI IDirectMusicSegmentImpl_GetStartPoint (LPDIRECTMUSICSEGMENT iface, MUSIC_TIME* pmtStart);
-extern HRESULT WINAPI IDirectMusicSegmentImpl_SetLoopPoints (LPDIRECTMUSICSEGMENT iface, MUSIC_TIME mtStart, MUSIC_TIME mtEnd);
-extern HRESULT WINAPI IDirectMusicSegmentImpl_GetLoopPoints (LPDIRECTMUSICSEGMENT iface, MUSIC_TIME* pmtStart, MUSIC_TIME* pmtEnd);
-extern HRESULT WINAPI IDirectMusicSegmentImpl_SetPChannelsUsed (LPDIRECTMUSICSEGMENT iface, DWORD dwNumPChannels, DWORD* paPChannels);
 
 /*****************************************************************************
  * IDirectMusicSegment8Impl implementation structure
@@ -971,10 +788,10 @@
   DWORD          ref;
 
   /* IDirectMusicAudioPathImpl fields */
-  IDirectMusicPerformance* perfo;
-  IDirectMusicGraph*       toolGraph;
-  IDirectSoundBuffer*      buffer;
-  IDirectSoundBuffer*      primary;
+  IDirectMusicPerformance8* perfo;
+  IDirectMusicGraph*        toolGraph;
+  IDirectSoundBuffer*       buffer;
+  IDirectSoundBuffer*       primary;
 };
 
 /* IUnknown: */
@@ -988,77 +805,8 @@
 extern HRESULT WINAPI IDirectMusicAudioPathImpl_ConvertPChannel (LPDIRECTMUSICAUDIOPATH iface, DWORD dwPChannelIn, DWORD* pdwPChannelOut);
 
 /*****************************************************************************
- * IDirectMusicPerformanceImpl implementation structure
+ * ClassFactory
  */
-struct IDirectMusicPerformanceImpl
-{
-  /* IUnknown fields */
-  ICOM_VFIELD(IDirectMusicPerformance);
-  DWORD              ref;
-
-  /* IDirectMusicPerformanceImpl fields */
-  IDirectMusic*      dmusic;
-  IDirectSound*      dsound;
-  IDirectMusicGraph* toolGraph;
-  DMUS_AUDIOPARAMS   params;
-	
-  /* global parameters */
-  BOOL  AutoDownload;
-  char  MasterGrooveLevel;
-  float MasterTempo;
-  long  MasterVolume;
-	
-  /* performance channels */
-  DMUSIC_PRIVATE_PCHANNEL PChannel[1];
-};
-
-/* IUnknown: */
-extern HRESULT WINAPI IDirectMusicPerformanceImpl_QueryInterface (LPDIRECTMUSICPERFORMANCE iface, REFIID riid, LPVOID *ppobj);
-extern ULONG WINAPI   IDirectMusicPerformanceImpl_AddRef (LPDIRECTMUSICPERFORMANCE iface);
-extern ULONG WINAPI   IDirectMusicPerformanceImpl_Release (LPDIRECTMUSICPERFORMANCE iface);
-/* IDirectMusicPerformance: */
-extern HRESULT WINAPI IDirectMusicPerformanceImpl_Init (LPDIRECTMUSICPERFORMANCE iface, IDirectMusic** ppDirectMusic, LPDIRECTSOUND pDirectSound, HWND hWnd);
-extern HRESULT WINAPI IDirectMusicPerformanceImpl_PlaySegment (LPDIRECTMUSICPERFORMANCE iface, IDirectMusicSegment* pSegment, DWORD dwFlags, __int64 i64StartTime, IDirectMusicSegmentState** ppSegmentState);
-extern HRESULT WINAPI IDirectMusicPerformanceImpl_Stop (LPDIRECTMUSICPERFORMANCE iface, IDirectMusicSegment* pSegment, IDirectMusicSegmentState* pSegmentState, MUSIC_TIME mtTime, DWORD dwFlags);
-extern HRESULT WINAPI IDirectMusicPerformanceImpl_GetSegmentState (LPDIRECTMUSICPERFORMANCE iface, IDirectMusicSegmentState** ppSegmentState, MUSIC_TIME mtTime);
-extern HRESULT WINAPI IDirectMusicPerformanceImpl_SetPrepareTime (LPDIRECTMUSICPERFORMANCE iface, DWORD dwMilliSeconds);
-extern HRESULT WINAPI IDirectMusicPerformanceImpl_GetPrepareTime (LPDIRECTMUSICPERFORMANCE iface, DWORD* pdwMilliSeconds);
-extern HRESULT WINAPI IDirectMusicPerformanceImpl_SetBumperLength (LPDIRECTMUSICPERFORMANCE iface, DWORD dwMilliSeconds);
-extern HRESULT WINAPI IDirectMusicPerformanceImpl_GetBumperLength (LPDIRECTMUSICPERFORMANCE iface, DWORD* pdwMilliSeconds);
-extern HRESULT WINAPI IDirectMusicPerformanceImpl_SendPMsg (LPDIRECTMUSICPERFORMANCE iface, DMUS_PMSG* pPMSG);
-extern HRESULT WINAPI IDirectMusicPerformanceImpl_MusicToReferenceTime (LPDIRECTMUSICPERFORMANCE iface, MUSIC_TIME mtTime, REFERENCE_TIME* prtTime);
-extern HRESULT WINAPI IDirectMusicPerformanceImpl_ReferenceToMusicTime (LPDIRECTMUSICPERFORMANCE iface, REFERENCE_TIME rtTime, MUSIC_TIME* pmtTime);
-extern HRESULT WINAPI IDirectMusicPerformanceImpl_IsPlaying (LPDIRECTMUSICPERFORMANCE iface, IDirectMusicSegment* pSegment, IDirectMusicSegmentState* pSegState);
-extern HRESULT WINAPI IDirectMusicPerformanceImpl_GetTime (LPDIRECTMUSICPERFORMANCE iface, REFERENCE_TIME* prtNow, MUSIC_TIME* pmtNow);
-extern HRESULT WINAPI IDirectMusicPerformanceImpl_AllocPMsg (LPDIRECTMUSICPERFORMANCE iface, ULONG cb, DMUS_PMSG** ppPMSG);
-extern HRESULT WINAPI IDirectMusicPerformanceImpl_FreePMsg (LPDIRECTMUSICPERFORMANCE iface, DMUS_PMSG* pPMSG);
-extern HRESULT WINAPI IDirectMusicPerformanceImpl_GetGraph (LPDIRECTMUSICPERFORMANCE iface, IDirectMusicGraph** ppGraph);
-extern HRESULT WINAPI IDirectMusicPerformanceImpl_SetGraph (LPDIRECTMUSICPERFORMANCE iface, IDirectMusicGraph* pGraph);
-extern HRESULT WINAPI IDirectMusicPerformanceImpl_SetNotificationHandle (LPDIRECTMUSICPERFORMANCE iface, HANDLE hNotification, REFERENCE_TIME rtMinimum);
-extern HRESULT WINAPI IDirectMusicPerformanceImpl_GetNotificationPMsg (LPDIRECTMUSICPERFORMANCE iface, DMUS_NOTIFICATION_PMSG** ppNotificationPMsg);
-extern HRESULT WINAPI IDirectMusicPerformanceImpl_AddNotificationType (LPDIRECTMUSICPERFORMANCE iface, REFGUID rguidNotificationType);
-extern HRESULT WINAPI IDirectMusicPerformanceImpl_RemoveNotificationType (LPDIRECTMUSICPERFORMANCE iface, REFGUID rguidNotificationType);
-extern HRESULT WINAPI IDirectMusicPerformanceImpl_AddPort (LPDIRECTMUSICPERFORMANCE iface, IDirectMusicPort* pPort);
-extern HRESULT WINAPI IDirectMusicPerformanceImpl_RemovePort (LPDIRECTMUSICPERFORMANCE iface, IDirectMusicPort* pPort);
-extern HRESULT WINAPI IDirectMusicPerformanceImpl_AssignPChannelBlock (LPDIRECTMUSICPERFORMANCE iface, DWORD dwBlockNum, IDirectMusicPort* pPort, DWORD dwGroup);
-extern HRESULT WINAPI IDirectMusicPerformanceImpl_AssignPChannel (LPDIRECTMUSICPERFORMANCE iface, DWORD dwPChannel, IDirectMusicPort* pPort, DWORD dwGroup, DWORD dwMChannel);
-extern HRESULT WINAPI IDirectMusicPerformanceImpl_PChannelInfo (LPDIRECTMUSICPERFORMANCE iface, DWORD dwPChannel, IDirectMusicPort** ppPort, DWORD* pdwGroup, DWORD* pdwMChannel);
-extern HRESULT WINAPI IDirectMusicPerformanceImpl_DownloadInstrument (LPDIRECTMUSICPERFORMANCE iface, IDirectMusicInstrument* pInst, DWORD dwPChannel, IDirectMusicDownloadedInstrument** ppDownInst, DMUS_NOTERANGE* pNoteRanges, DWORD dwNumNoteRanges, IDirectMusicPort** ppPort, DWORD* pdwGroup, DWORD* pdwMChannel);
-extern HRESULT WINAPI IDirectMusicPerformanceImpl_Invalidate (LPDIRECTMUSICPERFORMANCE iface, MUSIC_TIME mtTime, DWORD dwFlags);
-extern HRESULT WINAPI IDirectMusicPerformanceImpl_GetParam (LPDIRECTMUSICPERFORMANCE iface, REFGUID rguidType, DWORD dwGroupBits, DWORD dwIndex, MUSIC_TIME mtTime, MUSIC_TIME* pmtNext, void* pParam);
-extern HRESULT WINAPI IDirectMusicPerformanceImpl_SetParam (LPDIRECTMUSICPERFORMANCE iface, REFGUID rguidType, DWORD dwGroupBits, DWORD dwIndex, MUSIC_TIME mtTime, void* pParam);
-extern HRESULT WINAPI IDirectMusicPerformanceImpl_GetGlobalParam (LPDIRECTMUSICPERFORMANCE iface, REFGUID rguidType, void* pParam, DWORD dwSize);
-extern HRESULT WINAPI IDirectMusicPerformanceImpl_SetGlobalParam (LPDIRECTMUSICPERFORMANCE iface, REFGUID rguidType, void* pParam, DWORD dwSize);
-extern HRESULT WINAPI IDirectMusicPerformanceImpl_GetLatencyTime (LPDIRECTMUSICPERFORMANCE iface, REFERENCE_TIME* prtTime);
-extern HRESULT WINAPI IDirectMusicPerformanceImpl_GetQueueTime (LPDIRECTMUSICPERFORMANCE iface, REFERENCE_TIME* prtTime);
-extern HRESULT WINAPI IDirectMusicPerformanceImpl_AdjustTime (LPDIRECTMUSICPERFORMANCE iface, REFERENCE_TIME rtAmount);
-extern HRESULT WINAPI IDirectMusicPerformanceImpl_CloseDown (LPDIRECTMUSICPERFORMANCE iface);
-extern HRESULT WINAPI IDirectMusicPerformanceImpl_GetResolvedTime (LPDIRECTMUSICPERFORMANCE iface, REFERENCE_TIME rtTime, REFERENCE_TIME* prtResolved, DWORD dwTimeResolveFlags);
-extern HRESULT WINAPI IDirectMusicPerformanceImpl_MIDIToMusic (LPDIRECTMUSICPERFORMANCE iface, BYTE bMIDIValue, DMUS_CHORD_KEY* pChord, BYTE bPlayMode, BYTE bChordLevel, WORD* pwMusicValue);
-extern HRESULT WINAPI IDirectMusicPerformanceImpl_MusicToMIDI (LPDIRECTMUSICPERFORMANCE iface, WORD wMusicValue, DMUS_CHORD_KEY* pChord, BYTE bPlayMode, BYTE bChordLevel, BYTE* pbMIDIValue);
-extern HRESULT WINAPI IDirectMusicPerformanceImpl_TimeToRhythm (LPDIRECTMUSICPERFORMANCE iface, MUSIC_TIME mtTime, DMUS_TIMESIGNATURE* pTimeSig, WORD* pwMeasure, BYTE* pbBeat, BYTE* pbGrid, short* pnOffset);
-extern HRESULT WINAPI IDirectMusicPerformanceImpl_RhythmToTime (LPDIRECTMUSICPERFORMANCE iface, WORD wMeasure, BYTE bBeat, BYTE bGrid, short nOffset, DMUS_TIMESIGNATURE* pTimeSig, MUSIC_TIME* pmtTime);
-/* ClassFactory */
 extern HRESULT WINAPI DMUSIC_CreateDirectMusicPerformance (LPCGUID lpcGUID, LPDIRECTMUSICPERFORMANCE *ppDMPerf, LPUNKNOWN pUnkOuter);
 
 /*****************************************************************************
@@ -1071,7 +819,7 @@
   DWORD                  ref;
 
   /* IDirectMusicPerformanceImpl fields */
-  IDirectMusic*          dmusic;
+  IDirectMusic8*         dmusic;
   IDirectSound*          dsound;
   IDirectMusicGraph*     toolGraph;
   DMUS_AUDIOPARAMS       params;
@@ -1158,8 +906,8 @@
   DWORD          ref;
 
   /* IDirectMusicGraphImpl fields */
-  IDirectMusicToolImpl* first;
-  IDirectMusicToolImpl* last;
+  IDirectMusicTool8Impl* first;
+  IDirectMusicTool8Impl* last;
   WORD                  num_tools;
 };
 
@@ -1174,35 +922,6 @@
 extern HRESULT WINAPI IDirectMusicGraphImpl_RemoveTool (LPDIRECTMUSICGRAPH iface, IDirectMusicTool* pTool);
 
 /*****************************************************************************
- * IDirectMusicStyleImpl implementation structure
- */
-struct IDirectMusicStyleImpl
-{
-  /* IUnknown fields */
-  ICOM_VFIELD(IDirectMusicStyle);
-  DWORD          ref;
-
-  /* IDirectMusicStyleImpl fields */
-};
-
-/* IUnknown: */
-extern HRESULT WINAPI IDirectMusicStyleImpl_QueryInterface (LPDIRECTMUSICSTYLE iface, REFIID riid, LPVOID *ppobj);
-extern ULONG WINAPI   IDirectMusicStyleImpl_AddRef (LPDIRECTMUSICSTYLE iface);
-extern ULONG WINAPI   IDirectMusicStyleImpl_Release (LPDIRECTMUSICSTYLE iface);
-/* IDirectMusicStyle: */
-extern HRESULT WINAPI IDirectMusicStyleImpl_GetBand (LPDIRECTMUSICSTYLE iface, WCHAR* pwszName, IDirectMusicBand** ppBand);
-extern HRESULT WINAPI IDirectMusicStyleImpl_EnumBand (LPDIRECTMUSICSTYLE iface, DWORD dwIndex, WCHAR* pwszName);
-extern HRESULT WINAPI IDirectMusicStyleImpl_GetDefaultBand (LPDIRECTMUSICSTYLE iface, IDirectMusicBand** ppBand);
-extern HRESULT WINAPI IDirectMusicStyleImpl_EnumMotif (LPDIRECTMUSICSTYLE iface, DWORD dwIndex, WCHAR* pwszName);
-extern HRESULT WINAPI IDirectMusicStyleImpl_GetMotif (LPDIRECTMUSICSTYLE iface, WCHAR* pwszName, IDirectMusicSegment** ppSegment);
-extern HRESULT WINAPI IDirectMusicStyleImpl_GetDefaultChordMap (LPDIRECTMUSICSTYLE iface, IDirectMusicChordMap** ppChordMap);
-extern HRESULT WINAPI IDirectMusicStyleImpl_EnumChordMap (LPDIRECTMUSICSTYLE iface, DWORD dwIndex, WCHAR* pwszName);
-extern HRESULT WINAPI IDirectMusicStyleImpl_GetChordMap (LPDIRECTMUSICSTYLE iface, WCHAR* pwszName, IDirectMusicChordMap** ppChordMap);
-extern HRESULT WINAPI IDirectMusicStyleImpl_GetTimeSignature (LPDIRECTMUSICSTYLE iface, DMUS_TIMESIGNATURE* pTimeSig);
-extern HRESULT WINAPI IDirectMusicStyleImpl_GetEmbellishmentLength (LPDIRECTMUSICSTYLE iface, DWORD dwType, DWORD dwLevel, DWORD* pdwMin, DWORD* pdwMax);
-extern HRESULT WINAPI IDirectMusicStyleImpl_GetTempo (LPDIRECTMUSICSTYLE iface, double* pTempo);
-
-/*****************************************************************************
  * IDirectMusicStyle8Impl implementation structure
  */
 struct IDirectMusicStyle8Impl
@@ -1233,6 +952,7 @@
 /* IDirectMusicStyle8: */
 extern HRESULT WINAPI IDirectMusicStyle8ImplEnumPattern (LPDIRECTMUSICSTYLE8 iface, DWORD dwIndex, DWORD dwPatternType, WCHAR* pwszName);
 
+
 /*****************************************************************************
  * IDirectMusicChordMapImpl implementation structure
  */
@@ -1252,6 +972,7 @@
 /* IDirectMusicChordMap: */
 extern HRESULT WINAPI IDirectMusicChordMapImpl_GetScale (LPDIRECTMUSICCHORDMAP iface, DWORD* pdwScale);
 
+
 /*****************************************************************************
  * IDirectMusicComposerImpl implementation structure
  */
@@ -1297,6 +1018,7 @@
 extern HRESULT WINAPI IDirectMusicPatternTrackImpl_SetVariation (LPDIRECTMUSICPATTERNTRACK iface, IDirectMusicSegmentState* pSegState, DWORD dwVariationFlags, DWORD dwPart);
 extern HRESULT WINAPI IDirectMusicPatternTrackImpl_SetPatternByName (LPDIRECTMUSICPATTERNTRACK iface, IDirectMusicSegmentState* pSegState, WCHAR* wszName, IDirectMusicStyle* pStyle, DWORD dwPatternType, DWORD* pdwLength);
 
+
 /*****************************************************************************
  * IDirectMusicScriptImpl implementation structure
  */
@@ -1325,6 +1047,7 @@
 extern HRESULT WINAPI IDirectMusicScriptImpl_EnumRoutine (LPDIRECTMUSICSCRIPT iface, DWORD dwIndex, WCHAR* pwszName);
 extern HRESULT WINAPI IDirectMusicScriptImpl_EnumVariable (LPDIRECTMUSICSCRIPT iface, DWORD dwIndex, WCHAR* pwszName);
 
+
 /*****************************************************************************
  * IDirectMusicContainerImpl implementation structure
  */
@@ -1344,6 +1067,7 @@
 /* IDirectMusicContainer: */
 extern HRESULT WINAPI IDirectMusicContainerImpl_EnumObject (LPDIRECTMUSICCONTAINER iface, REFGUID rguidClass, DWORD dwIndex, LPDMUS_OBJECTDESC pDesc, WCHAR* pwszAlias);
 
+
 /*****************************************************************************
  * IDirectMusicSongImpl implementation structure
  */
@@ -1369,13 +1093,14 @@
 extern HRESULT WINAPI IDirectMusicSongImpl_Unload (LPDIRECTMUSICSONG iface, IUnknown* pAudioPath);
 extern HRESULT WINAPI IDirectMusicSongImpl_EnumSegment (LPDIRECTMUSICSONG iface, DWORD dwIndex, IDirectMusicSegment** ppSegment);
 
+
 /*****************************************************************************
  * Helper Functions
  */
 void register_waveport (LPGUID lpGUID, LPCSTR lpszDesc, LPCSTR lpszDrvName, LPVOID lpContext);
 /* Loader Helper Functions */
-HRESULT WINAPI DMUSIC_FillSegmentFromFileHandle (IDirectMusicSegmentImpl *segment, HANDLE fd);
-HRESULT WINAPI DMUSIC_FillTrackFromFileHandle (IDirectMusicTrackImpl *segment, HANDLE fd);
+HRESULT WINAPI DMUSIC_FillSegmentFromFileHandle (IDirectMusicSegment8Impl *segment, HANDLE fd);
+HRESULT WINAPI DMUSIC_FillTrackFromFileHandle (IDirectMusicTrack8Impl *segment, HANDLE fd);
 HRESULT WINAPI DMUSIC_FillReferenceFromFileHandle (Reference reference, HANDLE fd);
 HRESULT WINAPI DMUSIC_FillUNFOFromFileHandle (UNFO_List UNFO, HANDLE fd);
 HRESULT WINAPI DMUSIC_FillBandFromFileHandle (IDirectMusicBandImpl *band, HANDLE fd);
Index: dmusic_segment.c
===================================================================
RCS file: /home/wine/wine/dlls/dmusic/dmusic_segment.c,v
retrieving revision 1.3
diff -u -r1.3 dmusic_segment.c
--- dmusic_segment.c	18 Jun 2003 03:18:23 -0000	1.3
+++ dmusic_segment.c	25 Jun 2003 20:12:19 -0000
@@ -31,279 +31,6 @@
 
 WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
 
-/* IDirectMusicSegment IUnknown parts follow: */
-HRESULT WINAPI IDirectMusicSegmentImpl_QueryInterface (LPDIRECTMUSICSEGMENT iface, REFIID riid, LPVOID *ppobj)
-{
-	ICOM_THIS(IDirectMusicSegmentImpl,iface);
-
-	if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicSegment))
-	{
-		IDirectMusicSegmentImpl_AddRef(iface);
-		*ppobj = This;
-		return S_OK;
-	}
-	WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
-	return E_NOINTERFACE;
-}
-
-ULONG WINAPI IDirectMusicSegmentImpl_AddRef (LPDIRECTMUSICSEGMENT iface)
-{
-	ICOM_THIS(IDirectMusicSegmentImpl,iface);
-	TRACE("(%p) : AddRef from %ld\n", This, This->ref);
-	return ++(This->ref);
-}
-
-ULONG WINAPI IDirectMusicSegmentImpl_Release (LPDIRECTMUSICSEGMENT iface)
-{
-	ICOM_THIS(IDirectMusicSegmentImpl,iface);
-	ULONG ref = --This->ref;
-	TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
-	if (ref == 0)
-	{
-		HeapFree(GetProcessHeap(), 0, This);
-	}
-	return ref;
-}
-
-/* IDirectMusicSegment Interface follow: */
-HRESULT WINAPI IDirectMusicSegmentImpl_GetLength (LPDIRECTMUSICSEGMENT iface, MUSIC_TIME* pmtLength)
-{
-	ICOM_THIS(IDirectMusicSegmentImpl,iface);
-
-	FIXME("(%p, %p): stub\n", This, pmtLength);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicSegmentImpl_SetLength (LPDIRECTMUSICSEGMENT iface, MUSIC_TIME mtLength)
-{
-	ICOM_THIS(IDirectMusicSegmentImpl,iface);
-
-	FIXME("(%p, %ld): stub\n", This, mtLength);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicSegmentImpl_GetRepeats (LPDIRECTMUSICSEGMENT iface, DWORD* pdwRepeats)
-{
-	ICOM_THIS(IDirectMusicSegmentImpl,iface);
-
-	FIXME("(%p, %p): stub\n", This, pdwRepeats);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicSegmentImpl_SetRepeats (LPDIRECTMUSICSEGMENT iface, DWORD dwRepeats)
-{
-	ICOM_THIS(IDirectMusicSegmentImpl,iface);
-
-	FIXME("(%p, %ld): stub\n", This, dwRepeats);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicSegmentImpl_GetDefaultResolution (LPDIRECTMUSICSEGMENT iface, DWORD* pdwResolution)
-{
-	ICOM_THIS(IDirectMusicSegmentImpl,iface);
-
-	FIXME("(%p, %p): stub\n", This, pdwResolution);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicSegmentImpl_SetDefaultResolution (LPDIRECTMUSICSEGMENT iface, DWORD dwResolution)
-{
-	ICOM_THIS(IDirectMusicSegmentImpl,iface);
-
-	FIXME("(%p, %ld): stub\n", This, dwResolution);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicSegmentImpl_GetTrack (LPDIRECTMUSICSEGMENT iface, REFGUID rguidType, DWORD dwGroupBits, DWORD dwIndex, IDirectMusicTrack** ppTrack)
-{
-	ICOM_THIS(IDirectMusicSegmentImpl,iface);
-
-	FIXME("(%p, %s, %ld, %ld, %p): stub\n", This, debugstr_guid(rguidType), dwGroupBits, dwIndex, ppTrack);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicSegmentImpl_GetTrackGroup (LPDIRECTMUSICSEGMENT iface, IDirectMusicTrack* pTrack, DWORD* pdwGroupBits)
-{
-	ICOM_THIS(IDirectMusicSegmentImpl,iface);
-
-	FIXME("(%p, %p, %p): stub\n", This, pTrack, pdwGroupBits);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicSegmentImpl_InsertTrack (LPDIRECTMUSICSEGMENT iface, IDirectMusicTrack* pTrack, DWORD dwGroupBits)
-{
-	ICOM_THIS(IDirectMusicSegmentImpl,iface);
-
-	FIXME("(%p, %p, %ld): stub\n", This, pTrack, dwGroupBits);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicSegmentImpl_RemoveTrack (LPDIRECTMUSICSEGMENT iface, IDirectMusicTrack* pTrack)
-{
-	ICOM_THIS(IDirectMusicSegmentImpl,iface);
-
-	FIXME("(%p, %p): stub\n", This, pTrack);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicSegmentImpl_InitPlay (LPDIRECTMUSICSEGMENT iface, IDirectMusicSegmentState** ppSegState, IDirectMusicPerformance* pPerformance, DWORD dwFlags)
-{
-	ICOM_THIS(IDirectMusicSegmentImpl,iface);
-
-	FIXME("(%p, %p, %p, %ld): stub\n", This, ppSegState, pPerformance, dwFlags);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicSegmentImpl_GetGraph (LPDIRECTMUSICSEGMENT iface, IDirectMusicGraph** ppGraph)
-{
-	ICOM_THIS(IDirectMusicSegmentImpl,iface);
-
-	FIXME("(%p, %p): stub\n", This, ppGraph);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicSegmentImpl_SetGraph (LPDIRECTMUSICSEGMENT iface, IDirectMusicGraph* pGraph)
-{
-	ICOM_THIS(IDirectMusicSegmentImpl,iface);
-
-	FIXME("(%p, %p): stub\n", This, pGraph);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicSegmentImpl_AddNotificationType (LPDIRECTMUSICSEGMENT iface, REFGUID rguidNotificationType)
-{
-	ICOM_THIS(IDirectMusicSegmentImpl,iface);
-
-	FIXME("(%p, %s): stub\n", This, debugstr_guid(rguidNotificationType));
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicSegmentImpl_RemoveNotificationType (LPDIRECTMUSICSEGMENT iface, REFGUID rguidNotificationType)
-{
-	ICOM_THIS(IDirectMusicSegmentImpl,iface);
-
-	FIXME("(%p, %s): stub\n", This, debugstr_guid(rguidNotificationType));
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicSegmentImpl_GetParam (LPDIRECTMUSICSEGMENT iface, REFGUID rguidType, DWORD dwGroupBits, DWORD dwIndex, MUSIC_TIME mtTime, MUSIC_TIME* pmtNext, void* pParam)
-{
-	ICOM_THIS(IDirectMusicSegmentImpl,iface);
-
-	FIXME("(%p, %s, %ld, %ld, %ld, %p, %p): stub\n", This, debugstr_guid(rguidType), dwGroupBits, dwIndex, mtTime, pmtNext, pParam);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicSegmentImpl_SetParam (LPDIRECTMUSICSEGMENT iface, REFGUID rguidType, DWORD dwGroupBits, DWORD dwIndex, MUSIC_TIME mtTime, void* pParam)
-{
-	ICOM_THIS(IDirectMusicSegmentImpl,iface);
-
-	FIXME("(%p, %s, %ld, %ld, %ld, %p): stub\n", This, debugstr_guid(rguidType), dwGroupBits, dwIndex, mtTime, pParam);
-	
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicSegmentImpl_Clone (LPDIRECTMUSICSEGMENT iface, MUSIC_TIME mtStart, MUSIC_TIME mtEnd, IDirectMusicSegment** ppSegment)
-{
-	ICOM_THIS(IDirectMusicSegmentImpl,iface);
-
-	FIXME("(%p, %ld, %ld, %p): stub\n", This, mtStart, mtEnd, ppSegment);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicSegmentImpl_SetStartPoint (LPDIRECTMUSICSEGMENT iface, MUSIC_TIME mtStart)
-{
-	ICOM_THIS(IDirectMusicSegmentImpl,iface);
-
-	FIXME("(%p, %ld): stub\n", This, mtStart);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicSegmentImpl_GetStartPoint (LPDIRECTMUSICSEGMENT iface, MUSIC_TIME* pmtStart)
-{
-	ICOM_THIS(IDirectMusicSegmentImpl,iface);
-
-	FIXME("(%p, %p): stub\n", This, pmtStart);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicSegmentImpl_SetLoopPoints (LPDIRECTMUSICSEGMENT iface, MUSIC_TIME mtStart, MUSIC_TIME mtEnd)
-{
-	ICOM_THIS(IDirectMusicSegmentImpl,iface);
-
-	FIXME("(%p, %ld, %ld): stub\n", This, mtStart, mtEnd);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicSegmentImpl_GetLoopPoints (LPDIRECTMUSICSEGMENT iface, MUSIC_TIME* pmtStart, MUSIC_TIME* pmtEnd)
-{
-	ICOM_THIS(IDirectMusicSegmentImpl,iface);
-
-	FIXME("(%p, %p, %p): stub\n", This, pmtStart, pmtEnd);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicSegmentImpl_SetPChannelsUsed (LPDIRECTMUSICSEGMENT iface, DWORD dwNumPChannels, DWORD* paPChannels)
-{
-	ICOM_THIS(IDirectMusicSegmentImpl,iface);
-
-	FIXME("(%p, %ld, %p): stub\n", This, dwNumPChannels, paPChannels);
-
-	return S_OK;
-}
-
-ICOM_VTABLE(IDirectMusicSegment) DirectMusicSegment_Vtbl =
-{
-    ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
-	IDirectMusicSegmentImpl_QueryInterface,
-	IDirectMusicSegmentImpl_AddRef,
-	IDirectMusicSegmentImpl_Release,
-	IDirectMusicSegmentImpl_GetLength,
-	IDirectMusicSegmentImpl_SetLength,
-	IDirectMusicSegmentImpl_GetRepeats,
-	IDirectMusicSegmentImpl_SetRepeats,
-	IDirectMusicSegmentImpl_GetDefaultResolution,
-	IDirectMusicSegmentImpl_SetDefaultResolution,
-	IDirectMusicSegmentImpl_GetTrack,
-	IDirectMusicSegmentImpl_GetTrackGroup,
-	IDirectMusicSegmentImpl_InsertTrack,
-	IDirectMusicSegmentImpl_RemoveTrack,
-	IDirectMusicSegmentImpl_InitPlay,
-	IDirectMusicSegmentImpl_GetGraph,
-	IDirectMusicSegmentImpl_SetGraph,
-	IDirectMusicSegmentImpl_AddNotificationType,
-	IDirectMusicSegmentImpl_RemoveNotificationType,
-	IDirectMusicSegmentImpl_GetParam,
-	IDirectMusicSegmentImpl_SetParam,
-	IDirectMusicSegmentImpl_Clone,
-	IDirectMusicSegmentImpl_SetStartPoint,
-	IDirectMusicSegmentImpl_GetStartPoint,
-	IDirectMusicSegmentImpl_SetLoopPoints,
-	IDirectMusicSegmentImpl_GetLoopPoints,
-	IDirectMusicSegmentImpl_SetPChannelsUsed
-};
-
 
 /* IDirectMusicSegment8 IUnknown parts follow: */
 HRESULT WINAPI IDirectMusicSegment8Impl_QueryInterface (LPDIRECTMUSICSEGMENT8 iface, REFIID riid, LPVOID *ppobj)
@@ -318,7 +45,7 @@
 		*ppobj = This;
 		return S_OK;
 	}
-	WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
+	WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
 	return E_NOINTERFACE;
 }
 
@@ -632,100 +359,7 @@
 };
 
 
-/* IDirectMusicSegmentState IUnknown parts follow: */
-HRESULT WINAPI IDirectMusicSegmentStateImpl_QueryInterface (LPDIRECTMUSICSEGMENTSTATE iface, REFIID riid, LPVOID *ppobj)
-{
-	ICOM_THIS(IDirectMusicSegmentStateImpl,iface);
-
-	if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicSegmentState))
-	{
-		IDirectMusicSegmentStateImpl_AddRef(iface);
-		*ppobj = This;
-		return S_OK;
-	}
-	WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
-	return E_NOINTERFACE;
-}
-
-ULONG WINAPI IDirectMusicSegmentStateImpl_AddRef (LPDIRECTMUSICSEGMENTSTATE iface)
-{
-	ICOM_THIS(IDirectMusicSegmentStateImpl,iface);
-	TRACE("(%p) : AddRef from %ld\n", This, This->ref);
-	return ++(This->ref);
-}
-
-ULONG WINAPI IDirectMusicSegmentStateImpl_Release (LPDIRECTMUSICSEGMENTSTATE iface)
-{
-	ICOM_THIS(IDirectMusicSegmentStateImpl,iface);
-	ULONG ref = --This->ref;
-	TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
-	if (ref == 0)
-	{
-		HeapFree(GetProcessHeap(), 0, This);
-	}
-	return ref;
-}
-
-/* IDirectMusicSegmentState Interface follow: */
-HRESULT WINAPI IDirectMusicSegmentStateImpl_GetRepeats (LPDIRECTMUSICSEGMENTSTATE iface,  DWORD* pdwRepeats)
-{
-	ICOM_THIS(IDirectMusicSegmentStateImpl,iface);
-
-	FIXME("(%p, %p): stub\n", This, pdwRepeats);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicSegmentStateImpl_GetSegment (LPDIRECTMUSICSEGMENTSTATE iface, IDirectMusicSegment** ppSegment)
-{
-	ICOM_THIS(IDirectMusicSegmentStateImpl,iface);
-
-	FIXME("(%p, %p): stub\n", This, ppSegment);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicSegmentStateImpl_GetStartTime (LPDIRECTMUSICSEGMENTSTATE iface, MUSIC_TIME* pmtStart)
-{
-	ICOM_THIS(IDirectMusicSegmentStateImpl,iface);
-
-	FIXME("(%p, %p): stub\n", This, pmtStart);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicSegmentStateImpl_GetSeek (LPDIRECTMUSICSEGMENTSTATE iface, MUSIC_TIME* pmtSeek)
-{
-	ICOM_THIS(IDirectMusicSegmentStateImpl,iface);
-
-	FIXME("(%p, %p): stub\n", This, pmtSeek);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicSegmentStateImpl_GetStartPoint (LPDIRECTMUSICSEGMENTSTATE iface, MUSIC_TIME* pmtStart)
-{
-	ICOM_THIS(IDirectMusicSegmentStateImpl,iface);
-
-	FIXME("(%p, %p): stub\n", This, pmtStart);
-
-	return S_OK;
-}
-
-ICOM_VTABLE(IDirectMusicSegmentState) DirectMusicSegmentState_Vtbl =
-{
-    ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
-	IDirectMusicSegmentStateImpl_QueryInterface,
-	IDirectMusicSegmentStateImpl_AddRef,
-	IDirectMusicSegmentStateImpl_Release,
-	IDirectMusicSegmentStateImpl_GetRepeats,
-	IDirectMusicSegmentStateImpl_GetSegment,
-	IDirectMusicSegmentStateImpl_GetStartTime,
-	IDirectMusicSegmentStateImpl_GetSeek,
-	IDirectMusicSegmentStateImpl_GetStartPoint
-};
-
-/* IDirectMusicSegmentState8 IUnknown parts follow: */
+/* IDirectMusicSegmentState8 IUnknown part follow: */
 HRESULT WINAPI IDirectMusicSegmentState8Impl_QueryInterface (LPDIRECTMUSICSEGMENTSTATE8 iface, REFIID riid, LPVOID *ppobj)
 {
 	ICOM_THIS(IDirectMusicSegmentState8Impl,iface);
@@ -847,13 +481,14 @@
 {
 	ICOM_THIS(IDirectMusicPatternTrackImpl,iface);
 
-	if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicPatternTrack))
+	if (IsEqualGUID(riid, &IID_IUnknown) || 
+	    IsEqualGUID(riid, &IID_IDirectMusicPatternTrack))
 	{
 		IDirectMusicPatternTrackImpl_AddRef(iface);
 		*ppobj = This;
 		return S_OK;
 	}
-	WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
+	WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
 	return E_NOINTERFACE;
 }
 
Index: dmusic_style.c
===================================================================
RCS file: /home/wine/wine/dlls/dmusic/dmusic_style.c,v
retrieving revision 1.2
diff -u -r1.2 dmusic_style.c
--- dmusic_style.c	7 Jun 2003 00:39:18 -0000	1.2
+++ dmusic_style.c	25 Jun 2003 20:12:19 -0000
@@ -28,172 +28,21 @@
 
 WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
 
-/* IDirectMusicStyle IUnknown parts follow: */
-HRESULT WINAPI IDirectMusicStyleImpl_QueryInterface (LPDIRECTMUSICSTYLE iface, REFIID riid, LPVOID *ppobj)
-{
-	ICOM_THIS(IDirectMusicStyleImpl,iface);
-
-	if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicStyle))
-	{
-		IDirectMusicStyleImpl_AddRef(iface);
-		*ppobj = This;
-		return S_OK;
-	}
-	WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
-	return E_NOINTERFACE;
-}
-
-ULONG WINAPI IDirectMusicStyleImpl_AddRef (LPDIRECTMUSICSTYLE iface)
-{
-	ICOM_THIS(IDirectMusicStyleImpl,iface);
-	TRACE("(%p) : AddRef from %ld\n", This, This->ref);
-	return ++(This->ref);
-}
-
-ULONG WINAPI IDirectMusicStyleImpl_Release (LPDIRECTMUSICSTYLE iface)
-{
-	ICOM_THIS(IDirectMusicStyleImpl,iface);
-	ULONG ref = --This->ref;
-	TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
-	if (ref == 0)
-	{
-		HeapFree(GetProcessHeap(), 0, This);
-	}
-	return ref;
-}
-
-/* IDirectMusicStyle Interface follow: */
-HRESULT WINAPI IDirectMusicStyleImpl_GetBand (LPDIRECTMUSICSTYLE iface, WCHAR* pwszName, IDirectMusicBand** ppBand)
-{
-	ICOM_THIS(IDirectMusicStyleImpl,iface);
-
-	FIXME("(%p, %p, %p): stub\n", This, pwszName, ppBand);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicStyleImpl_EnumBand (LPDIRECTMUSICSTYLE iface, DWORD dwIndex, WCHAR* pwszName)
-{
-	ICOM_THIS(IDirectMusicStyleImpl,iface);
-
-	FIXME("(%p, %ld, %p): stub\n", This, dwIndex, pwszName);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicStyleImpl_GetDefaultBand (LPDIRECTMUSICSTYLE iface, IDirectMusicBand** ppBand)
-{
-	ICOM_THIS(IDirectMusicStyleImpl,iface);
-
-	FIXME("(%p, %p): stub\n", This, ppBand);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicStyleImpl_EnumMotif (LPDIRECTMUSICSTYLE iface, DWORD dwIndex, WCHAR* pwszName)
-{
-	ICOM_THIS(IDirectMusicStyleImpl,iface);
-
-	FIXME("(%p, %ld, %p): stub\n", This, dwIndex, pwszName);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicStyleImpl_GetMotif (LPDIRECTMUSICSTYLE iface, WCHAR* pwszName, IDirectMusicSegment** ppSegment)
-{
-	ICOM_THIS(IDirectMusicStyleImpl,iface);
-
-	FIXME("(%p, %p, %p): stub\n", This, pwszName, ppSegment);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicStyleImpl_GetDefaultChordMap (LPDIRECTMUSICSTYLE iface, IDirectMusicChordMap** ppChordMap)
-{
-	ICOM_THIS(IDirectMusicStyleImpl,iface);
-
-	FIXME("(%p, %p): stub\n", This, ppChordMap);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicStyleImpl_EnumChordMap (LPDIRECTMUSICSTYLE iface, DWORD dwIndex, WCHAR* pwszName)
-{
-	ICOM_THIS(IDirectMusicStyleImpl,iface);
-
-	FIXME("(%p, %ld, %p): stub\n", This, dwIndex, pwszName);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicStyleImpl_GetChordMap (LPDIRECTMUSICSTYLE iface, WCHAR* pwszName, IDirectMusicChordMap** ppChordMap)
-{
-	ICOM_THIS(IDirectMusicStyleImpl,iface);
-
-	FIXME("(%p, %p, %p): stub\n", This, pwszName, ppChordMap);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicStyleImpl_GetTimeSignature (LPDIRECTMUSICSTYLE iface, DMUS_TIMESIGNATURE* pTimeSig)
-{
-	ICOM_THIS(IDirectMusicStyleImpl,iface);
-
-	FIXME("(%p, %p): stub\n", This, pTimeSig);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicStyleImpl_GetEmbellishmentLength (LPDIRECTMUSICSTYLE iface, DWORD dwType, DWORD dwLevel, DWORD* pdwMin, DWORD* pdwMax)
-{
-	ICOM_THIS(IDirectMusicStyleImpl,iface);
-
-	FIXME("(%p, %ld, %ld, %p, %p): stub\n", This, dwType, dwLevel, pdwMin, pdwMax);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicStyleImpl_GetTempo (LPDIRECTMUSICSTYLE iface, double* pTempo)
-{
-	ICOM_THIS(IDirectMusicStyleImpl,iface);
-
-	FIXME("(%p, %p): stub\n", This, pTempo);
-
-	return S_OK;
-}
-
-ICOM_VTABLE(IDirectMusicStyle) DirectMusicStyle_Vtbl =
-{
-    ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
-	IDirectMusicStyleImpl_QueryInterface,
-	IDirectMusicStyleImpl_AddRef,
-	IDirectMusicStyleImpl_Release,
-	IDirectMusicStyleImpl_GetBand,
-	IDirectMusicStyleImpl_EnumBand,
-	IDirectMusicStyleImpl_GetDefaultBand,
-	IDirectMusicStyleImpl_EnumMotif,
-	IDirectMusicStyleImpl_GetMotif,
-	IDirectMusicStyleImpl_GetDefaultChordMap,
-	IDirectMusicStyleImpl_EnumChordMap,
-	IDirectMusicStyleImpl_GetChordMap,
-	IDirectMusicStyleImpl_GetTimeSignature,
-	IDirectMusicStyleImpl_GetEmbellishmentLength,
-	IDirectMusicStyleImpl_GetTempo
-};
-
 
 /* IDirectMusicStyle8 IUnknown parts follow: */
 HRESULT WINAPI IDirectMusicStyle8Impl_QueryInterface (LPDIRECTMUSICSTYLE8 iface, REFIID riid, LPVOID *ppobj)
 {
 	ICOM_THIS(IDirectMusicStyle8Impl,iface);
 
-	if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicStyle8))
+	if (IsEqualGUID(riid, &IID_IUnknown) || 
+	    IsEqualGUID(riid, &IID_IDirectMusicStyle) ||
+	    IsEqualGUID(riid, &IID_IDirectMusicStyle8))
 	{
 		IDirectMusicStyle8Impl_AddRef(iface);
 		*ppobj = This;
 		return S_OK;
 	}
-	WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
+	WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
 	return E_NOINTERFACE;
 }
 
Index: dmusic_synth.c
===================================================================
RCS file: /home/wine/wine/dlls/dmusic/dmusic_synth.c,v
retrieving revision 1.2
diff -u -r1.2 dmusic_synth.c
--- dmusic_synth.c	7 Jun 2003 00:39:18 -0000	1.2
+++ dmusic_synth.c	25 Jun 2003 20:12:20 -0000
@@ -29,232 +29,20 @@
 
 WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
 
-/* IDirectMusicSynth IUnknown parts follow: */
-HRESULT WINAPI IDirectMusicSynthImpl_QueryInterface (LPDIRECTMUSICSYNTH iface, REFIID riid, LPVOID *ppobj)
-{
-	ICOM_THIS(IDirectMusicSynthImpl,iface);
-
-	if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicSynth))
-	{
-		IDirectMusicSynthImpl_AddRef(iface);
-		*ppobj = This;
-		return S_OK;
-	}
-	WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
-	return E_NOINTERFACE;
-}
-
-ULONG WINAPI IDirectMusicSynthImpl_AddRef (LPDIRECTMUSICSYNTH iface)
-{
-	ICOM_THIS(IDirectMusicSynthImpl,iface);
-	TRACE("(%p) : AddRef from %ld\n", This, This->ref);
-	return ++(This->ref);
-}
-
-ULONG WINAPI IDirectMusicSynthImpl_Release (LPDIRECTMUSICSYNTH iface)
-{
-	ICOM_THIS(IDirectMusicSynthImpl,iface);
-	ULONG ref = --This->ref;
-	TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
-	if (ref == 0)
-	{
-		HeapFree(GetProcessHeap(), 0, This);
-	}
-	return ref;
-}
-
-/* IDirectMusicSynth Interface follow: */
-HRESULT WINAPI IDirectMusicSynthImpl_Open (LPDIRECTMUSICSYNTH iface, LPDMUS_PORTPARAMS pPortParams)
-{
-	ICOM_THIS(IDirectMusicSynthImpl,iface);
-
-	FIXME("(%p, %p): stub\n", This, pPortParams);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicSynthImpl_Close (LPDIRECTMUSICSYNTH iface)
-{
-	ICOM_THIS(IDirectMusicSynthImpl,iface);
-
-	FIXME("(%p): stub\n", This);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicSynthImpl_SetNumChannelGroups (LPDIRECTMUSICSYNTH iface, DWORD dwGroups)
-{
-	ICOM_THIS(IDirectMusicSynthImpl,iface);
-
-	FIXME("(%p, %ld): stub\n", This, dwGroups);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicSynthImpl_Download (LPDIRECTMUSICSYNTH iface, LPHANDLE phDownload, LPVOID pvData, LPBOOL pbFree)
-{
-	ICOM_THIS(IDirectMusicSynthImpl,iface);
-
-	FIXME("(%p, %p, %p, %p): stub\n", This, phDownload, pvData, pbFree);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicSynthImpl_Unload (LPDIRECTMUSICSYNTH iface, HANDLE hDownload, HRESULT (CALLBACK* lpFreeHandle)(HANDLE,HANDLE), HANDLE hUserData)
-{
-	ICOM_THIS(IDirectMusicSynthImpl,iface);
-
-	FIXME("(%p, %p, %p): stub\n", This, hDownload, hUserData);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicSynthImpl_PlayBuffer (LPDIRECTMUSICSYNTH iface, REFERENCE_TIME rt, LPBYTE pbBuffer, DWORD cbBuffer)
-{
-	ICOM_THIS(IDirectMusicSynthImpl,iface);
-
-	FIXME("(%p, FIXME, %p, %ld): stub\n", This/*, rt*/, pbBuffer, cbBuffer);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicSynthImpl_GetRunningStats (LPDIRECTMUSICSYNTH iface, LPDMUS_SYNTHSTATS pStats)
-{
-	ICOM_THIS(IDirectMusicSynthImpl,iface);
-
-	FIXME("(%p, %p): stub\n", This, pStats);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicSynthImpl_GetPortCaps (LPDIRECTMUSICSYNTH iface, LPDMUS_PORTCAPS pCaps)
-{
-	ICOM_THIS(IDirectMusicSynthImpl,iface);
-
-	FIXME("(%p, %p): stub\n", This, pCaps);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicSynthImpl_SetMasterClock (LPDIRECTMUSICSYNTH iface, IReferenceClock* pClock)
-{
-	ICOM_THIS(IDirectMusicSynthImpl,iface);
-
-	FIXME("(%p, %p): stub\n", This, pClock);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicSynthImpl_GetLatencyClock (LPDIRECTMUSICSYNTH iface, IReferenceClock** ppClock)
-{
-	ICOM_THIS(IDirectMusicSynthImpl,iface);
-
-	FIXME("(%p, %p): stub\n", This, ppClock);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicSynthImpl_Activate (LPDIRECTMUSICSYNTH iface, BOOL fEnable)
-{
-	ICOM_THIS(IDirectMusicSynthImpl,iface);
-
-	FIXME("(%p, %d): stub\n", This, fEnable);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicSynthImpl_SetSynthSink (LPDIRECTMUSICSYNTH iface, IDirectMusicSynthSink* pSynthSink)
-{
-	ICOM_THIS(IDirectMusicSynthImpl,iface);
-
-	FIXME("(%p, %p): stub\n", This, pSynthSink);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicSynthImpl_Render (LPDIRECTMUSICSYNTH iface, short* pBuffer, DWORD dwLength, LONGLONG llPosition)
-{
-	ICOM_THIS(IDirectMusicSynthImpl,iface);
-
-	FIXME("(%p, %p, %ld, FIXME): stub\n", This, pBuffer, dwLength/*, llPosition*/);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicSynthImpl_SetChannelPriority (LPDIRECTMUSICSYNTH iface, DWORD dwChannelGroup, DWORD dwChannel, DWORD dwPriority)
-{
-	ICOM_THIS(IDirectMusicSynthImpl,iface);
-
-	FIXME("(%p, %ld, %ld, %ld): stub\n", This, dwChannelGroup, dwChannel, dwPriority);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicSynthImpl_GetChannelPriority (LPDIRECTMUSICSYNTH iface, DWORD dwChannelGroup, DWORD dwChannel, LPDWORD pdwPriority)
-{
-	ICOM_THIS(IDirectMusicSynthImpl,iface);
-
-	FIXME("(%p, %ld, %ld, %p): stub\n", This, dwChannelGroup, dwChannel, pdwPriority);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicSynthImpl_GetFormat (LPDIRECTMUSICSYNTH iface, LPWAVEFORMATEX pWaveFormatEx, LPDWORD pdwWaveFormatExSiz)
-{
-	ICOM_THIS(IDirectMusicSynthImpl,iface);
-
-	FIXME("(%p, %p, %p): stub\n", This, pWaveFormatEx, pdwWaveFormatExSiz);
-
-	return S_OK;
-}
-
-HRESULT WINAPI IDirectMusicSynthImpl_GetAppend (LPDIRECTMUSICSYNTH iface, DWORD* pdwAppend)
-{
-	ICOM_THIS(IDirectMusicSynthImpl,iface);
-
-	FIXME("(%p, %p): stub\n", This, pdwAppend);
-
-	return S_OK;
-}
-
-ICOM_VTABLE(IDirectMusicSynth) DirectMusicSynth_Vtbl =
-{
-    ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
-	IDirectMusicSynthImpl_QueryInterface,
-	IDirectMusicSynthImpl_AddRef,
-	IDirectMusicSynthImpl_Release,
-	IDirectMusicSynthImpl_Open,
-	IDirectMusicSynthImpl_Close,
-	IDirectMusicSynthImpl_SetNumChannelGroups,
-	IDirectMusicSynthImpl_Download,
-	IDirectMusicSynthImpl_Unload,
-	IDirectMusicSynthImpl_PlayBuffer,
-	IDirectMusicSynthImpl_GetRunningStats,
-	IDirectMusicSynthImpl_GetPortCaps,
-	IDirectMusicSynthImpl_SetMasterClock,
-	IDirectMusicSynthImpl_GetLatencyClock,
-	IDirectMusicSynthImpl_Activate,
-	IDirectMusicSynthImpl_SetSynthSink,
-	IDirectMusicSynthImpl_Render,
-	IDirectMusicSynthImpl_SetChannelPriority,
-	IDirectMusicSynthImpl_GetChannelPriority,
-	IDirectMusicSynthImpl_GetFormat,
-	IDirectMusicSynthImpl_GetAppend
-};
-
-
 /* IDirectMusicSynth8 IUnknown parts follow: */
 HRESULT WINAPI IDirectMusicSynth8Impl_QueryInterface (LPDIRECTMUSICSYNTH8 iface, REFIID riid, LPVOID *ppobj)
 {
 	ICOM_THIS(IDirectMusicSynth8Impl,iface);
 
-	if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicSynth8))
+	if (IsEqualGUID(riid, &IID_IUnknown) || 
+	    IsEqualGUID(riid, &IID_IDirectMusicSynth) ||
+	    IsEqualGUID(riid, &IID_IDirectMusicSynth8))
 	{
 		IDirectMusicSynth8Impl_AddRef(iface);
 		*ppobj = This;
 		return S_OK;
 	}
-	WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
+	WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
 	return E_NOINTERFACE;
 }
 
@@ -513,13 +301,14 @@
 {
 	ICOM_THIS(IDirectMusicSynthSinkImpl,iface);
 
-	if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicSynthSink))
+	if (IsEqualGUID(riid, &IID_IUnknown) || 
+	    IsEqualGUID(riid, &IID_IDirectMusicSynthSink))
 	{
 		IDirectMusicSynthSinkImpl_AddRef(iface);
 		*ppobj = This;
 		return S_OK;
 	}
-	WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
+	WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
 	return E_NOINTERFACE;
 }
 
Index: helper.c
===================================================================
RCS file: /home/wine/wine/dlls/dmusic/helper.c,v
retrieving revision 1.1
diff -u -r1.1 helper.c
--- helper.c	24 Jun 2003 02:26:07 -0000	1.1
+++ helper.c	25 Jun 2003 20:12:22 -0000
@@ -303,7 +303,7 @@
  *			implement loading for missing (empty) clauses
  *			fix a problem with tempo track loading (look at code)
  */
-HRESULT WINAPI DMUSIC_FillTrackFromFileHandle (IDirectMusicTrackImpl *segment, HANDLE fd)
+HRESULT WINAPI DMUSIC_FillTrackFromFileHandle (IDirectMusicTrack8Impl *segment, HANDLE fd)
 {
 	rawChunk chunk;
 	DWORD BytesRead, ListCount = 0, ListCount2 = 0, ListSize, ListSize2, FileCount = 0, FileSize, FileCount2 = 0, FileSize2 /* *2s are for various subchunks  */;
@@ -642,7 +642,7 @@
 	return S_OK;
 }
 
-HRESULT WINAPI DMUSIC_FillSegmentFromFileHandle (IDirectMusicSegmentImpl *segment, HANDLE fd)
+HRESULT WINAPI DMUSIC_FillSegmentFromFileHandle (IDirectMusicSegment8Impl *segment, HANDLE fd)
 {
 	rawChunk chunk;
 	DWORD BytesRead, ListCount = 0, ListSize, FileCount = 0, FileSize;

Attachment: signature.asc
Description: To je digitalno podpisan del=?iso-8859-2?Q?sporo=E8ila?=


[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux