- add IDirectMusicContainer support in
IDirectMusicLoader8Impl::LoadObjectFromFile - don't use IDirectMusicSegment*Impl when IDirectMusicSegment*8Impl can be used instead (avoid code duplication)
This commit is contained in:
parent
44edc0c0ec
commit
8695df5aa4
|
@ -324,19 +324,19 @@ HRESULT WINAPI IDirectMusicLoader8Impl_LoadObjectFromFile (LPDIRECTMUSICLOADER8
|
|||
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 = HeapAlloc(GetProcessHeap(), 0, sizeof(IDirectMusicContainerImpl));
|
||||
container->lpVtbl = &DirectMusicContainer_Vtbl;
|
||||
container->ref = 1;
|
||||
*ppObject = container;
|
||||
return S_OK;
|
||||
} else {
|
||||
FIXME("bad iid\n");
|
||||
|
|
|
@ -1131,9 +1131,9 @@ HRESULT WINAPI IDirectMusicPerformance8ImplCreateStandardAudioPath (LPDIRECTMUSI
|
|||
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 @@ HRESULT WINAPI IDirectMusicPerformance8ImplCreateStandardAudioPath (LPDIRECTMUSI
|
|||
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;
|
||||
|
||||
|
|
|
@ -310,7 +310,9 @@ HRESULT WINAPI IDirectMusicSegment8Impl_QueryInterface (LPDIRECTMUSICSEGMENT8 if
|
|||
{
|
||||
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 @@ HRESULT WINAPI IDirectMusicSegmentState8Impl_QueryInterface (LPDIRECTMUSICSEGMEN
|
|||
{
|
||||
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;
|
||||
|
|
Loading…
Reference in New Issue