[DMUSIC07] more

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

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

Changelog:
 - add IDirectMusicContainer support in 
IDirectMusicLoader8Impl::LoadObjectFromFile
 - don't use IDirectMusicSegment*Impl when IDirectMusicSegment*8Impl can be 
used instead (avoir code duplication)

Regards,
Raphael

PS: Christian with your last patch dmusic crash when WinMM is disabled (no 
sound drivers => DirectSoundCreate8 returns an error)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE+7mFtp7NA3AmQTU4RAsxIAKCRM8zax9l31E2ko8O3xnqDMg4urgCcCyGy
n+Nq8gwAEqr7FZxljztSyO8=
=3tJi
-----END PGP SIGNATURE-----
Index: dmusic_loader.c
===================================================================
RCS file: /home/wine/wine/dlls/dmusic/dmusic_loader.c,v
retrieving revision 1.5
diff -u -r1.5 dmusic_loader.c
--- dmusic_loader.c	16 Jun 2003 20:26:50 -0000	1.5
+++ dmusic_loader.c	17 Jun 2003 00:24:55 -0000
@@ -324,19 +324,19 @@
 	  FIXME("wanted 'con'\n");
 	}
 
-	if (IsEqualGUID(iidInterfaceID,&IID_IDirectMusicSegment)) {
-	  IDirectMusicSegmentImpl* segment;
-	  segment = (IDirectMusicSegmentImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IDirectMusicImpl));
-	  segment->lpVtbl = &DirectMusicSegment_Vtbl;
-	  segment->ref = 1;
-	  *ppObject = segment;
-	  return S_OK;
-	} else if (IsEqualGUID(iidInterfaceID,&IID_IDirectMusicSegment8)) {
-	  IDirectMusicSegmentImpl* segment;
-	  segment = (IDirectMusicSegmentImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IDirectMusicImpl));
+	if (IsEqualGUID(iidInterfaceID, &IID_IDirectMusicSegment) || 
+	    IsEqualGUID(iidInterfaceID, &IID_IDirectMusicSegment8)) {
+	  IDirectMusicSegment8Impl* segment;
+	  segment = (IDirectMusicSegment8Impl*) HeapAlloc(GetProcessHeap(), 0, sizeof(IDirectMusicSegment8Impl));
 	  segment->lpVtbl = &DirectMusicSegment8_Vtbl;
 	  segment->ref = 1;
 	  *ppObject = segment;
+	} else if (IsEqualGUID(iidInterfaceID, &IID_IDirectMusicContainer)) {
+	  IDirectMusicContainerImpl* container;
+	  container = (IDirectMusicSegmentImpl*) HeapAlloc(GetProcessHeap(), 0, sizeof(IDirectMusicContainerImpl));
+	  container->lpVtbl = &DirectMusicContainer_Vtbl;
+	  container->ref = 1;
+	  *ppObject = container;
 	  return S_OK;
 	} else {
 	  FIXME("bad iid\n");
Index: dmusic_performance.c
===================================================================
RCS file: /home/wine/wine/dlls/dmusic/dmusic_performance.c,v
retrieving revision 1.7
diff -u -r1.7 dmusic_performance.c
--- dmusic_performance.c	16 Jun 2003 20:26:50 -0000	1.7
+++ dmusic_performance.c	17 Jun 2003 00:25:00 -0000
@@ -1131,9 +1131,9 @@
 	default:
 		break;
 	}
-	
+
 	/* FIXME: Should we create one secondary buffer for each PChannel? */
-	IDirectSound8_CreateSoundBuffer((LPDIRECTSOUND8)This->dsound, &desc, &buffer, NULL);
+	IDirectSound8_CreateSoundBuffer((LPDIRECTSOUND8) This->dsound, &desc, &buffer, NULL);
 	default_path->buffer = (IDirectSoundBuffer*) buffer;
 
 	/* Update description for creating primary buffer */
@@ -1141,7 +1141,7 @@
 	desc.dwBufferBytes = 0;
 	desc.lpwfxFormat = NULL;
 
-	IDirectSound8_CreateSoundBuffer((LPDIRECTSOUND8)This->dsound, &desc, &buffer, NULL);
+	IDirectSound8_CreateSoundBuffer((LPDIRECTSOUND8) This->dsound, &desc, &buffer, NULL);
 
 	default_path->primary = (IDirectSoundBuffer*) buffer;
 
Index: dmusic_segment.c
===================================================================
RCS file: /home/wine/wine/dlls/dmusic/dmusic_segment.c,v
retrieving revision 1.2
diff -u -r1.2 dmusic_segment.c
--- dmusic_segment.c	7 Jun 2003 00:39:18 -0000	1.2
+++ dmusic_segment.c	17 Jun 2003 00:25:07 -0000
@@ -310,7 +310,9 @@
 {
 	ICOM_THIS(IDirectMusicSegment8Impl,iface);
 
-	if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicSegment8))
+	if (IsEqualGUID(riid, &IID_IUnknown) || 
+	    IsEqualGUID(riid, &IID_IDirectMusicSegment) ||
+	    IsEqualGUID(riid, &IID_IDirectMusicSegment8))
 	{
 		IDirectMusicSegment8Impl_AddRef(iface);
 		*ppobj = This;
@@ -728,7 +730,9 @@
 {
 	ICOM_THIS(IDirectMusicSegmentState8Impl,iface);
 
-	if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicSegmentState8))
+	if (IsEqualGUID(riid, &IID_IUnknown) || 
+	    IsEqualGUID(riid, &IID_IDirectMusicSegmentState) ||
+	    IsEqualGUID(riid, &IID_IDirectMusicSegmentState8))
 	{
 		IDirectMusicSegmentState8Impl_AddRef(iface);
 		*ppobj = This;

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

  Powered by Linux