Commit 10509573 authored by Rok Mandeljc's avatar Rok Mandeljc Committed by Alexandre Julliard

Some fixes in dmband loading.

parent 897beee5
...@@ -39,8 +39,7 @@ HRESULT WINAPI IDirectMusicBandImpl_QueryInterface (LPDIRECTMUSICBAND iface, REF ...@@ -39,8 +39,7 @@ HRESULT WINAPI IDirectMusicBandImpl_QueryInterface (LPDIRECTMUSICBAND iface, REF
ICOM_THIS(IDirectMusicBandImpl,iface); ICOM_THIS(IDirectMusicBandImpl,iface);
if (IsEqualGUID(riid, &IID_IUnknown) || if (IsEqualGUID(riid, &IID_IUnknown) ||
IsEqualGUID(riid, &IID_IDirectMusicBand)) IsEqualGUID(riid, &IID_IDirectMusicBand)) {
{
IDirectMusicBandImpl_AddRef(iface); IDirectMusicBandImpl_AddRef(iface);
*ppobj = This; *ppobj = This;
return S_OK; return S_OK;
...@@ -61,8 +60,7 @@ ULONG WINAPI IDirectMusicBandImpl_Release (LPDIRECTMUSICBAND iface) ...@@ -61,8 +60,7 @@ ULONG WINAPI IDirectMusicBandImpl_Release (LPDIRECTMUSICBAND iface)
ICOM_THIS(IDirectMusicBandImpl,iface); ICOM_THIS(IDirectMusicBandImpl,iface);
ULONG ref = --This->ref; ULONG ref = --This->ref;
TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref); TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
if (ref == 0) if (ref == 0) {
{
HeapFree(GetProcessHeap(), 0, This); HeapFree(GetProcessHeap(), 0, This);
} }
return ref; return ref;
...@@ -112,8 +110,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicBand (LPCGUID lpcGUID, LPDIRECTMUSICBAND* ...@@ -112,8 +110,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicBand (LPCGUID lpcGUID, LPDIRECTMUSICBAND*
{ {
IDirectMusicBandImpl* dmband; IDirectMusicBandImpl* dmband;
if (IsEqualGUID (lpcGUID, &IID_IDirectMusicBand)) if (IsEqualGUID (lpcGUID, &IID_IDirectMusicBand)) {
{
dmband = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicBandImpl)); dmband = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicBandImpl));
if (NULL == dmband) { if (NULL == dmband) {
*ppDMBand = (LPDIRECTMUSICBAND) NULL; *ppDMBand = (LPDIRECTMUSICBAND) NULL;
...@@ -121,6 +118,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicBand (LPCGUID lpcGUID, LPDIRECTMUSICBAND* ...@@ -121,6 +118,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicBand (LPCGUID lpcGUID, LPDIRECTMUSICBAND*
} }
dmband->lpVtbl = &DirectMusicBand_Vtbl; dmband->lpVtbl = &DirectMusicBand_Vtbl;
dmband->ref = 1; dmband->ref = 1;
list_init (&dmband->Instruments);
*ppDMBand = (LPDIRECTMUSICBAND) dmband; *ppDMBand = (LPDIRECTMUSICBAND) dmband;
return S_OK; return S_OK;
} }
...@@ -325,12 +323,12 @@ HRESULT WINAPI IDirectMusicBandObjectStream_Load (LPPERSISTSTREAM iface, IStream ...@@ -325,12 +323,12 @@ HRESULT WINAPI IDirectMusicBandObjectStream_Load (LPPERSISTSTREAM iface, IStream
switch (chunkID) { switch (chunkID) {
case DMUS_FOURCC_GUID_CHUNK: { case DMUS_FOURCC_GUID_CHUNK: {
TRACE_(dmfile)(": GUID chunk\n"); TRACE_(dmfile)(": GUID chunk\n");
IStream_Read (pStm, &pBand->vVersion, chunkSize, NULL); IStream_Read (pStm, pBand->guidID, chunkSize, NULL);
break; break;
} }
case DMUS_FOURCC_VERSION_CHUNK: { case DMUS_FOURCC_VERSION_CHUNK: {
TRACE_(dmfile)(": version chunk\n"); TRACE_(dmfile)(": version chunk\n");
IStream_Read (pStm, &pBand->guidID, chunkSize, NULL); IStream_Read (pStm, pBand->vVersion, chunkSize, NULL);
break; break;
} }
case FOURCC_LIST: { case FOURCC_LIST: {
...@@ -347,34 +345,41 @@ HRESULT WINAPI IDirectMusicBandObjectStream_Load (LPPERSISTSTREAM iface, IStream ...@@ -347,34 +345,41 @@ HRESULT WINAPI IDirectMusicBandObjectStream_Load (LPPERSISTSTREAM iface, IStream
ListCount[0] += sizeof(FOURCC) + sizeof(DWORD) + chunkSize; ListCount[0] += sizeof(FOURCC) + sizeof(DWORD) + chunkSize;
TRACE_(dmfile)(": %s chunk (size = %ld)", debugstr_fourcc (chunkID), chunkSize); TRACE_(dmfile)(": %s chunk (size = %ld)", debugstr_fourcc (chunkID), chunkSize);
switch (chunkID) { switch (chunkID) {
/* don't ask me why, but M$ puts INFO elements in UNFO list sometimes
(though strings seem to be valid unicode) */
case mmioFOURCC('I','N','A','M'):
case DMUS_FOURCC_UNAM_CHUNK: { case DMUS_FOURCC_UNAM_CHUNK: {
TRACE_(dmfile)(": name chunk\n"); TRACE_(dmfile)(": name chunk\n");
pBand->wszName = HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, chunkSize); pBand->wzName = HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, chunkSize);
IStream_Read (pStm, pBand->wszName, chunkSize, NULL); IStream_Read (pStm, pBand->wzName, chunkSize, NULL);
break; break;
} }
case mmioFOURCC('I','A','R','T'):
case DMUS_FOURCC_UART_CHUNK: { case DMUS_FOURCC_UART_CHUNK: {
TRACE_(dmfile)(": artist chunk\n"); TRACE_(dmfile)(": artist chunk\n");
pBand->wszArtist = HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, chunkSize); pBand->wzArtist = HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, chunkSize);
IStream_Read (pStm, pBand->wszArtist, chunkSize, NULL); IStream_Read (pStm, pBand->wzArtist, chunkSize, NULL);
break; break;
} }
case mmioFOURCC('I','C','O','P'):
case DMUS_FOURCC_UCOP_CHUNK: { case DMUS_FOURCC_UCOP_CHUNK: {
TRACE_(dmfile)(": copyright chunk\n"); TRACE_(dmfile)(": copyright chunk\n");
pBand->wszCopyright = HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, chunkSize); pBand->wzCopyright = HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, chunkSize);
IStream_Read (pStm, pBand->wszCopyright, chunkSize, NULL); IStream_Read (pStm, pBand->wzCopyright, chunkSize, NULL);
break; break;
} }
case mmioFOURCC('I','S','B','J'):
case DMUS_FOURCC_USBJ_CHUNK: { case DMUS_FOURCC_USBJ_CHUNK: {
TRACE_(dmfile)(": subject chunk\n"); TRACE_(dmfile)(": subject chunk\n");
pBand->wszSubject = HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, chunkSize); pBand->wzSubject = HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, chunkSize);
IStream_Read (pStm, pBand->wszSubject, chunkSize, NULL); IStream_Read (pStm, pBand->wzSubject, chunkSize, NULL);
break; break;
} }
case mmioFOURCC('I','C','M','T'):
case DMUS_FOURCC_UCMT_CHUNK: { case DMUS_FOURCC_UCMT_CHUNK: {
TRACE_(dmfile)(": comment chunk\n"); TRACE_(dmfile)(": comment chunk\n");
pBand->wszComment = HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, chunkSize); pBand->wzComment = HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, chunkSize);
IStream_Read (pStm, pBand->wszComment, chunkSize, NULL); IStream_Read (pStm, pBand->wzComment, chunkSize, NULL);
break; break;
} }
default: { default: {
...@@ -403,6 +408,8 @@ HRESULT WINAPI IDirectMusicBandObjectStream_Load (LPPERSISTSTREAM iface, IStream ...@@ -403,6 +408,8 @@ HRESULT WINAPI IDirectMusicBandObjectStream_Load (LPPERSISTSTREAM iface, IStream
ListCount[1] = 0; ListCount[1] = 0;
switch (chunkID) { switch (chunkID) {
case DMUS_FOURCC_INSTRUMENT_LIST: { case DMUS_FOURCC_INSTRUMENT_LIST: {
/* init new instrument list entry */
LPDMUS_PRIVATE_INSTRUMENT pNewInstrument = (LPDMUS_PRIVATE_INSTRUMENT) HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, sizeof(DMUS_PRIVATE_INSTRUMENT));
TRACE_(dmfile)(": instrument list\n"); TRACE_(dmfile)(": instrument list\n");
do { do {
IStream_Read (pStm, &chunkID, sizeof(FOURCC), NULL); IStream_Read (pStm, &chunkID, sizeof(FOURCC), NULL);
...@@ -412,7 +419,7 @@ HRESULT WINAPI IDirectMusicBandObjectStream_Load (LPPERSISTSTREAM iface, IStream ...@@ -412,7 +419,7 @@ HRESULT WINAPI IDirectMusicBandObjectStream_Load (LPPERSISTSTREAM iface, IStream
switch (chunkID) { switch (chunkID) {
case DMUS_FOURCC_INSTRUMENT_CHUNK: { case DMUS_FOURCC_INSTRUMENT_CHUNK: {
TRACE_(dmfile)(": band instrument header\n"); TRACE_(dmfile)(": band instrument header\n");
IStream_Read (pStm, &pBand->pInstruments[pBand->dwInstruments], chunkSize, NULL); IStream_Read (pStm, &pNewInstrument->pInstrument, chunkSize, NULL);
break; break;
} }
case FOURCC_LIST: { case FOURCC_LIST: {
...@@ -489,8 +496,8 @@ ObjDesc.vVersion.dwVersionMS, ObjDesc.vVersion.dwVersionLS, debugstr_w(ObjDesc.w ...@@ -489,8 +496,8 @@ ObjDesc.vVersion.dwVersionMS, ObjDesc.vVersion.dwVersionLS, debugstr_w(ObjDesc.w
IDirectMusicObject* pObject; IDirectMusicObject* pObject;
if(FAILED(IDirectMusicLoader_GetObject (pLoader, &ObjDesc, &IID_IDirectMusicObject, (LPVOID*)&pObject))) if(FAILED(IDirectMusicLoader_GetObject (pLoader, &ObjDesc, &IID_IDirectMusicObject, (LPVOID*)&pObject)))
/* acquire collection from loaded referenced object */ /* acquire collection from loaded referenced object */
if(FAILED(IDirectMusicObject_QueryInterface (pObject, &IID_IDirectMusicCollection, (LPVOID*)&pBand->ppReferenceCollection[pBand->dwInstruments]))) if(FAILED(IDirectMusicObject_QueryInterface (pObject, &IID_IDirectMusicCollection, (LPVOID*)&pNewInstrument->ppReferenceCollection)))
IDirectMusicLoader_Release (pLoader); IDirectMusicLoader_Release (pLoader);
} }
IDirectMusicGetLoader_Release (pGetLoader); IDirectMusicGetLoader_Release (pGetLoader);
} else { } else {
...@@ -506,45 +513,42 @@ ObjDesc.vVersion.dwVersionMS, ObjDesc.vVersion.dwVersionLS, debugstr_w(ObjDesc.w ...@@ -506,45 +513,42 @@ ObjDesc.vVersion.dwVersionMS, ObjDesc.vVersion.dwVersionLS, debugstr_w(ObjDesc.w
} }
break; break;
} }
default: { default: {
TRACE_(dmfile)(": unknown chunk (skipping)\n"); TRACE_(dmfile)(": unknown chunk (skipping)\n");
liMove.QuadPart = chunkSize; liMove.QuadPart = chunkSize;
IStream_Seek (pStm, liMove, STREAM_SEEK_CUR, NULL); /* skip this chunk */ IStream_Seek (pStm, liMove, STREAM_SEEK_CUR, NULL); /* skip this chunk */
break; break;
} }
} }
TRACE_(dmfile)(": ListCount[1] = %ld < ListSize[1] = %ld\n", ListCount[1], ListSize[1]); TRACE_(dmfile)(": ListCount[1] = %ld < ListSize[1] = %ld\n", ListCount[1], ListSize[1]);
} while (ListCount[1] < ListSize[1]); } while (ListCount[1] < ListSize[1]);
/* causes crash :( */ /* hmm... in dxdiag segment's band there aren't any references, but loader still desperatly
#if 0 loads default collection... does that mean that if there is no reference, use default?
/* hmm... in dxdiag segment's band there aren't any references, but loader still desperatly */
loads default collection... does that mean that if there is no reference, use default? if (!pNewInstrument->ppReferenceCollection) {
*/ TRACE_(dmfile)(": (READ): loading default collection (as no specific reference was made)\n");
if (!pBand->ppReferenceCollection[pBand->dwInstruments]) { ZeroMemory ((LPVOID)&ObjDesc, sizeof(DMUS_OBJECTDESC));
TRACE(": (READ): loading default collection (as no specific reference was made)\n"); ObjDesc.dwSize = sizeof(DMUS_OBJECTDESC);
ZeroMemory ((LPVOID)&ObjDesc, sizeof(DMUS_OBJECTDESC)); ObjDesc.dwValidData = DMUS_OBJ_CLASS | DMUS_OBJ_OBJECT;
ObjDesc.dwSize = sizeof(DMUS_OBJECTDESC); ObjDesc.guidObject = GUID_DefaultGMCollection;
ObjDesc.dwValidData = DMUS_OBJ_CLASS | DMUS_OBJ_OBJECT; ObjDesc.guidClass = CLSID_DirectMusicCollection;
ObjDesc.guidObject = GUID_DefaultGMCollection; if (SUCCEEDED(IStream_QueryInterface (pStm, &IID_IDirectMusicGetLoader, (LPVOID*)&pGetLoader))) {
ObjDesc.guidClass = CLSID_DirectMusicCollection; if (SUCCEEDED(IDirectMusicGetLoader_GetLoader (pGetLoader, &pLoader))) {
if (SUCCEEDED(IStream_QueryInterface (pStm, &IID_IDirectMusicGetLoader, (LPVOID*)&pGetLoader))) { IDirectMusicObject* pObject;
if (SUCCEEDED(IDirectMusicGetLoader_GetLoader (pGetLoader, &pLoader))) { if (SUCCEEDED(IDirectMusicLoader_GetObject (pLoader, &ObjDesc, &IID_IDirectMusicObject, (LPVOID*)&pObject))) {
IDirectMusicObject* pObject; IDirectMusicObject_QueryInterface (pObject, &IID_IDirectMusicCollection, (LPVOID*)&pNewInstrument->ppReferenceCollection);
if (SUCCEEDED(IDirectMusicLoader_GetObject (pLoader, &ObjDesc, &IID_IDirectMusicObject, (LPVOID*)&pObject))) { IDirectMusicLoader_Release (pLoader);
IDirectMusicObject_QueryInterface (pObject, &IID_IDirectMusicCollection, (LPVOID*)&pBand->ppReferenceCollection[pBand->dwInstruments]); }
IDirectMusicLoader_Release (pLoader);
} }
IDirectMusicGetLoader_Release (pGetLoader);
} else {
ERR("Could not get IDirectMusicGetLoader... reference will not be loaded :(\n");
/* E_FAIL */
} }
IDirectMusicGetLoader_Release (pGetLoader);
} else {
ERR("Could not get IDirectMusicGetLoader... reference will not be loaded :(\n");
/* E_FAIL */
} }
list_add_tail (&This->pParentObject->pBand->Instruments, &pNewInstrument->entry);
break;
} }
#endif
pBand->dwInstruments++; /* add count */
break;
}
default: { default: {
TRACE_(dmfile)(": unexpected chunk; loading failed)\n"); TRACE_(dmfile)(": unexpected chunk; loading failed)\n");
return E_FAIL; return E_FAIL;
...@@ -601,6 +605,50 @@ ObjDesc.vVersion.dwVersionMS, ObjDesc.vVersion.dwVersionLS, debugstr_w(ObjDesc.w ...@@ -601,6 +605,50 @@ ObjDesc.vVersion.dwVersionMS, ObjDesc.vVersion.dwVersionLS, debugstr_w(ObjDesc.w
} }
} }
/* DEBUG: dumps whole band object tree: */
if (TRACE_ON(dmband)) {
int r = 0;
DMUS_PRIVATE_INSTRUMENT *tmpEntry;
struct list *listEntry;
TRACE("*** IDirectMusicBand (%p) ***\n", pBand);
if (pBand->guidID)
TRACE(" - GUID = %s\n", debugstr_guid(pBand->guidID));
if (pBand->vVersion)
TRACE(" - Version = %i,%i,%i,%i\n", (pBand->vVersion->dwVersionMS >> 8) && 0x0000FFFF, pBand->vVersion->dwVersionMS && 0x0000FFFF, \
(pBand->vVersion->dwVersionLS >> 8) && 0x0000FFFF, pBand->vVersion->dwVersionLS && 0x0000FFFF);
if (pBand->wzName)
TRACE(" - Name = %s\n", debugstr_w(pBand->wzName));
if (pBand->wzArtist)
TRACE(" - Artist = %s\n", debugstr_w(pBand->wzArtist));
if (pBand->wzCopyright)
TRACE(" - Copyright = %s\n", debugstr_w(pBand->wzCopyright));
if (pBand->wzSubject)
TRACE(" - Subject = %s\n", debugstr_w(pBand->wzSubject));
if (pBand->wzComment)
TRACE(" - Comment = %s\n", debugstr_w(pBand->wzComment));
TRACE(" - Instruments:\n");
LIST_FOR_EACH (listEntry, &This->pParentObject->pBand->Instruments) {
tmpEntry = LIST_ENTRY( listEntry, DMUS_PRIVATE_INSTRUMENT, entry );
TRACE(" - Instrument[%i]:\n", r);
TRACE(" - Instrument header:\n");
TRACE(" - dwPatch = %ld\n", tmpEntry->pInstrument.dwPatch);
TRACE(" - dwAssignPatch = %ld\n", tmpEntry->pInstrument.dwAssignPatch);
TRACE(" - dwNoteRanges[4] = %ln\n", tmpEntry->pInstrument.dwNoteRanges);
TRACE(" - dwPChannel = %ld\n", tmpEntry->pInstrument.dwPChannel);
TRACE(" - dwFlags = %ld\n", tmpEntry->pInstrument.dwFlags);
TRACE(" - bPan = %i\n", tmpEntry->pInstrument.bPan);
TRACE(" - bVolume = %i\n", tmpEntry->pInstrument.bVolume);
TRACE(" - nTranspose = %i\n", tmpEntry->pInstrument.nTranspose);
TRACE(" - dwChannelPriority = %ld\n", tmpEntry->pInstrument.dwChannelPriority);
TRACE(" - nPitchBendRange = %i\n", tmpEntry->pInstrument.nPitchBendRange);
TRACE(" - Reference collection: %p\n", tmpEntry->ppReferenceCollection);
r++;
}
}
return S_OK; return S_OK;
} }
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(dmband); WINE_DEFAULT_DEBUG_CHANNEL(dmband);
WINE_DECLARE_DEBUG_CHANNEL(dmfile); WINE_DECLARE_DEBUG_CHANNEL(dmfile);
/***************************************************************************** /*****************************************************************************
* IDirectMusicBandTrack implementation * IDirectMusicBandTrack implementation
*/ */
...@@ -77,7 +78,7 @@ HRESULT WINAPI IDirectMusicBandTrack_Init (LPDIRECTMUSICTRACK8 iface, IDirectMus ...@@ -77,7 +78,7 @@ HRESULT WINAPI IDirectMusicBandTrack_Init (LPDIRECTMUSICTRACK8 iface, IDirectMus
ICOM_THIS(IDirectMusicBandTrack,iface); ICOM_THIS(IDirectMusicBandTrack,iface);
FIXME("(%p, %p): stub\n", This, pSegment); FIXME("(%p, %p): stub\n", This, pSegment);
return S_OK; return S_OK;
} }
...@@ -86,7 +87,7 @@ HRESULT WINAPI IDirectMusicBandTrack_InitPlay (LPDIRECTMUSICTRACK8 iface, IDirec ...@@ -86,7 +87,7 @@ HRESULT WINAPI IDirectMusicBandTrack_InitPlay (LPDIRECTMUSICTRACK8 iface, IDirec
ICOM_THIS(IDirectMusicBandTrack,iface); ICOM_THIS(IDirectMusicBandTrack,iface);
FIXME("(%p, %p, %p, %p, %ld, %ld): stub\n", This, pSegmentState, pPerformance, ppStateData, dwVirtualTrack8ID, dwFlags); FIXME("(%p, %p, %p, %p, %ld, %ld): stub\n", This, pSegmentState, pPerformance, ppStateData, dwVirtualTrack8ID, dwFlags);
return S_OK; return S_OK;
} }
...@@ -103,8 +104,75 @@ HRESULT WINAPI IDirectMusicBandTrack_Play (LPDIRECTMUSICTRACK8 iface, void* pSta ...@@ -103,8 +104,75 @@ HRESULT WINAPI IDirectMusicBandTrack_Play (LPDIRECTMUSICTRACK8 iface, void* pSta
{ {
ICOM_THIS(IDirectMusicBandTrack,iface); ICOM_THIS(IDirectMusicBandTrack,iface);
FIXME("(%p, %p, %ld, %ld, %ld, %ld, %p, %p, %ld): stub\n", This, pStateData, mtStart, mtEnd, mtOffset, dwFlags, pPerf, pSegSt, dwVirtualID); FIXME("(%p, %p, %ld, %ld, %ld, %ld, %p, %p, %ld): semi-stub\n", This, pStateData, mtStart, mtEnd, mtOffset, dwFlags, pPerf, pSegSt, dwVirtualID);
/* Sends following pMSG:
- DMUS_PATCH_PMSG
- DMUS_TRANSPOSE_PMSG
- DMUS_CHANNEL_PRIORITY_PMSG
- DMUS_MIDI_PMSG
*/
#if 0
/* get the graph and segment */
IDirectMusicSegment* pSegment; /* needed for getting track group */
IDirectMusicGraph* pGraph; /* needed for PMsg stamping */
DWORD dwGroup;
if (FAILED(IDirectMusicSegmentState_GetSegment (pSegSt, &pSegment))) {
ERR("failed to get segment\n");
return E_FAIL;
}
/* HINT: M$ lies when saying that we can query segment for graph; one can obtain graph only
by querying segment state or performance */
if (FAILED(IDirectMusicSegmentState_QueryInterface (pSegSt, &IID_IDirectMusicGraph, (LPVOID*)&pGraph))) {
ERR("failed to get graph on segment\n");
return E_FAIL;
}
IDirectMusicSegment_GetTrackGroup (pSegment, (LPDIRECTMUSICTRACK)iface, &dwGroup);
/* iterate through band list to get appropriate band */
DMUS_PRIVATE_BAND *tmpBandEntry;
struct list *listEntry;
IDirectMusicBandImpl* pBand = NULL;
LIST_FOR_EACH (listEntry, &This->Bands) {
tmpBandEntry = LIST_ENTRY (listEntry, DMUS_PRIVATE_BAND, entry);
/* FIXME: time checking is far from perfect: i don't know if times are properly compared and
in case of v.2 header i don't know which time to take; besides, first band with smaller
time will be taken */
if (((tmpBandEntry->pBandHeader.dwVersion = 1) && (tmpBandEntry->pBandHeader.lBandTime < mtStart))
|| ((tmpBandEntry->pBandHeader.dwVersion = 2) && (tmpBandEntry->pBandHeader.lBandTimeLogical < mtStart))) {
pBand = tmpBandEntry->ppBand;
break;
}
}
int r = 0; /* TEST */
/* now iterate through instruments list on selected band and fill and send all messages related to it */
DMUS_PRIVATE_INSTRUMENT *tmpInstrumentEntry;
LIST_FOR_EACH (listEntry, &pBand->Instruments) {
tmpInstrumentEntry = LIST_ENTRY (listEntry, DMUS_PRIVATE_INSTRUMENT, entry);
FIXME("parsing instrument [%i]\n", r);
r++;
/* allocate the msg */
DMUS_CHANNEL_MIDI_PMSG* pMIDI = NULL;
if (FAILED(IDirectMusicPerformance_AllocPMsg (pPerf, sizeof(DMUS_MIDI_PMSG), (DMUS_PMSG**)&pMIDI))) {
ERR("could not allocate PMsg\n");
}
/* HERE THE MESSAGE DATA SHOULD BE PUT IN */
if (FAILED(IDirectMusicGraph_StampPMsg (pGraph, (DMUS_PMSG*)pMIDI))) {
ERR("could not stamp PMsg\n");
}
if (FAILED(IDirectMusicPerformance_SendPMsg (pPerf, (DMUS_PMSG*)pMIDI))) {
ERR("could not send PMsg\n");
}
}
#endif
return S_OK; return S_OK;
} }
...@@ -144,7 +212,7 @@ HRESULT WINAPI IDirectMusicBandTrack_IsParamSupported (LPDIRECTMUSICTRACK8 iface ...@@ -144,7 +212,7 @@ HRESULT WINAPI IDirectMusicBandTrack_IsParamSupported (LPDIRECTMUSICTRACK8 iface
|| IsEqualGUID (rguidType, &GUID_UnloadFromAudioPath)) { || IsEqualGUID (rguidType, &GUID_UnloadFromAudioPath)) {
TRACE("param supported\n"); TRACE("param supported\n");
return S_OK; return S_OK;
} }
TRACE("param unsupported\n"); TRACE("param unsupported\n");
return DMUS_E_TYPE_UNSUPPORTED; return DMUS_E_TYPE_UNSUPPORTED;
...@@ -260,6 +328,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicBandTrack (LPCGUID lpcGUID, LPDIRECTMUSIC ...@@ -260,6 +328,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicBandTrack (LPCGUID lpcGUID, LPDIRECTMUSIC
} }
track->lpVtbl = &DirectMusicBandTrack_Vtbl; track->lpVtbl = &DirectMusicBandTrack_Vtbl;
track->ref = 1; track->ref = 1;
list_init (&track->Bands);
track->pStream = HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, sizeof(IDirectMusicBandTrackStream)); track->pStream = HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, sizeof(IDirectMusicBandTrackStream));
track->pStream->lpVtbl = &DirectMusicBandTrackStream_Vtbl; track->pStream->lpVtbl = &DirectMusicBandTrackStream_Vtbl;
track->pStream->ref = 1; track->pStream->ref = 1;
...@@ -354,17 +423,17 @@ HRESULT WINAPI IDirectMusicBandTrackStream_Load (LPPERSISTSTREAM iface, IStream* ...@@ -354,17 +423,17 @@ HRESULT WINAPI IDirectMusicBandTrackStream_Load (LPPERSISTSTREAM iface, IStream*
switch (chunkID) { switch (chunkID) {
case DMUS_FOURCC_BANDTRACK_CHUNK: { case DMUS_FOURCC_BANDTRACK_CHUNK: {
TRACE_(dmfile)(": band track header chunk\n"); TRACE_(dmfile)(": band track header chunk\n");
IStream_Read (pStm, &pTrack->btkHeader, chunkSize, NULL); IStream_Read (pStm, pTrack->btkHeader, chunkSize, NULL);
break; break;
} }
case DMUS_FOURCC_GUID_CHUNK: { case DMUS_FOURCC_GUID_CHUNK: {
TRACE_(dmfile)(": GUID chunk\n"); TRACE_(dmfile)(": GUID chunk\n");
IStream_Read (pStm, &pTrack->vVersion, chunkSize, NULL); IStream_Read (pStm, pTrack->guidID, chunkSize, NULL);
break; break;
} }
case DMUS_FOURCC_VERSION_CHUNK: { case DMUS_FOURCC_VERSION_CHUNK: {
TRACE_(dmfile)(": version chunk\n"); TRACE_(dmfile)(": version chunk\n");
IStream_Read (pStm, &pTrack->guidID, chunkSize, NULL); IStream_Read (pStm, pTrack->vVersion, chunkSize, NULL);
break; break;
} }
case FOURCC_LIST: { case FOURCC_LIST: {
...@@ -381,34 +450,41 @@ HRESULT WINAPI IDirectMusicBandTrackStream_Load (LPPERSISTSTREAM iface, IStream* ...@@ -381,34 +450,41 @@ HRESULT WINAPI IDirectMusicBandTrackStream_Load (LPPERSISTSTREAM iface, IStream*
ListCount[0] += sizeof(FOURCC) + sizeof(DWORD) + chunkSize; ListCount[0] += sizeof(FOURCC) + sizeof(DWORD) + chunkSize;
TRACE_(dmfile)(": %s chunk (size = %ld)", debugstr_fourcc (chunkID), chunkSize); TRACE_(dmfile)(": %s chunk (size = %ld)", debugstr_fourcc (chunkID), chunkSize);
switch (chunkID) { switch (chunkID) {
/* don't ask me why, but M$ puts INFO elements in UNFO list sometimes
(though strings seem to be valid unicode) */
case mmioFOURCC('I','N','A','M'):
case DMUS_FOURCC_UNAM_CHUNK: { case DMUS_FOURCC_UNAM_CHUNK: {
TRACE_(dmfile)(": name chunk\n"); TRACE_(dmfile)(": name chunk\n");
pTrack->wszName = HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, chunkSize); pTrack->wzName = HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, chunkSize);
IStream_Read (pStm, pTrack->wszName, chunkSize, NULL); IStream_Read (pStm, pTrack->wzName, chunkSize, NULL);
break; break;
} }
case mmioFOURCC('I','A','R','T'):
case DMUS_FOURCC_UART_CHUNK: { case DMUS_FOURCC_UART_CHUNK: {
TRACE_(dmfile)(": artist chunk\n"); TRACE_(dmfile)(": artist chunk\n");
pTrack->wszArtist = HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, chunkSize); pTrack->wzArtist = HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, chunkSize);
IStream_Read (pStm, pTrack->wszArtist, chunkSize, NULL); IStream_Read (pStm, pTrack->wzArtist, chunkSize, NULL);
break; break;
} }
case mmioFOURCC('I','C','O','P'):
case DMUS_FOURCC_UCOP_CHUNK: { case DMUS_FOURCC_UCOP_CHUNK: {
TRACE_(dmfile)(": copyright chunk\n"); TRACE_(dmfile)(": copyright chunk\n");
pTrack->wszCopyright = HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, chunkSize); pTrack->wzCopyright = HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, chunkSize);
IStream_Read (pStm, pTrack->wszCopyright, chunkSize, NULL); IStream_Read (pStm, pTrack->wzCopyright, chunkSize, NULL);
break; break;
} }
case mmioFOURCC('I','S','B','J'):
case DMUS_FOURCC_USBJ_CHUNK: { case DMUS_FOURCC_USBJ_CHUNK: {
TRACE_(dmfile)(": subject chunk\n"); TRACE_(dmfile)(": subject chunk\n");
pTrack->wszSubject = HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, chunkSize); pTrack->wzSubject = HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, chunkSize);
IStream_Read (pStm, pTrack->wszSubject, chunkSize, NULL); IStream_Read (pStm, pTrack->wzSubject, chunkSize, NULL);
break; break;
} }
case mmioFOURCC('I','C','M','T'):
case DMUS_FOURCC_UCMT_CHUNK: { case DMUS_FOURCC_UCMT_CHUNK: {
TRACE_(dmfile)(": comment chunk\n"); TRACE_(dmfile)(": comment chunk\n");
pTrack->wszComment = HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, chunkSize); pTrack->wzComment = HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, chunkSize);
IStream_Read (pStm, pTrack->wszComment, chunkSize, NULL); IStream_Read (pStm, pTrack->wzComment, chunkSize, NULL);
break; break;
} }
default: { default: {
...@@ -437,6 +513,8 @@ HRESULT WINAPI IDirectMusicBandTrackStream_Load (LPPERSISTSTREAM iface, IStream* ...@@ -437,6 +513,8 @@ HRESULT WINAPI IDirectMusicBandTrackStream_Load (LPPERSISTSTREAM iface, IStream*
ListCount[1] = 0; ListCount[1] = 0;
switch (chunkID) { switch (chunkID) {
case DMUS_FOURCC_BAND_LIST: { case DMUS_FOURCC_BAND_LIST: {
/* init new band list entry */
LPDMUS_PRIVATE_BAND pNewBand = (LPDMUS_PRIVATE_BAND) HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, sizeof(DMUS_PRIVATE_BAND));
TRACE_(dmfile)(": band list\n"); TRACE_(dmfile)(": band list\n");
do { do {
IStream_Read (pStm, &chunkID, sizeof(FOURCC), NULL); IStream_Read (pStm, &chunkID, sizeof(FOURCC), NULL);
...@@ -448,18 +526,17 @@ HRESULT WINAPI IDirectMusicBandTrackStream_Load (LPPERSISTSTREAM iface, IStream* ...@@ -448,18 +526,17 @@ HRESULT WINAPI IDirectMusicBandTrackStream_Load (LPPERSISTSTREAM iface, IStream*
TRACE_(dmfile)(": band item header (v.1) chunk\n"); TRACE_(dmfile)(": band item header (v.1) chunk\n");
IStream_Read (pStm, &tempHeaderV1, chunkSize, NULL); IStream_Read (pStm, &tempHeaderV1, chunkSize, NULL);
/* now transfer data to universal header */ /* now transfer data to universal header */
pTrack->pBandHeaders[pTrack->dwBands].dwVersion = 1; pNewBand->pBandHeader.dwVersion = 1;
pTrack->pBandHeaders[pTrack->dwBands].lBandTime = tempHeaderV1.lBandTime; pNewBand->pBandHeader.lBandTime = tempHeaderV1.lBandTime;
TRACE_(dmfile)(": (READ): header: lBandTime = %li\n", tempHeaderV1.lBandTime);
break; break;
} }
case DMUS_FOURCC_BANDITEM_CHUNK2: { case DMUS_FOURCC_BANDITEM_CHUNK2: {
TRACE_(dmfile)(": band item header (v.2) chunk\n"); TRACE_(dmfile)(": band item header (v.2) chunk\n");
IStream_Read (pStm, &tempHeaderV2, chunkSize, NULL); IStream_Read (pStm, &tempHeaderV2, chunkSize, NULL);
/* now transfer data to universal header */ /* now transfer data to universal header */
pTrack->pBandHeaders[pTrack->dwBands].dwVersion = 2; pNewBand->pBandHeader.dwVersion = 2;
pTrack->pBandHeaders[pTrack->dwBands].lBandTimeLogical = tempHeaderV2.lBandTimeLogical; pNewBand->pBandHeader.lBandTimeLogical = tempHeaderV2.lBandTimeLogical;
pTrack->pBandHeaders[pTrack->dwBands].lBandTimePhysical = tempHeaderV2.lBandTimePhysical; pNewBand->pBandHeader.lBandTimePhysical = tempHeaderV2.lBandTimePhysical;
break; break;
} }
case FOURCC_RIFF: { case FOURCC_RIFF: {
...@@ -479,7 +556,7 @@ HRESULT WINAPI IDirectMusicBandTrackStream_Load (LPPERSISTSTREAM iface, IStream* ...@@ -479,7 +556,7 @@ HRESULT WINAPI IDirectMusicBandTrackStream_Load (LPPERSISTSTREAM iface, IStream*
IDirectMusicObject* pObject; IDirectMusicObject* pObject;
if (SUCCEEDED(IDirectMusicLoader_GetObject (pLoader, &ObjDesc, &IID_IDirectMusicObject, (LPVOID*)&pObject))) { if (SUCCEEDED(IDirectMusicLoader_GetObject (pLoader, &ObjDesc, &IID_IDirectMusicObject, (LPVOID*)&pObject))) {
/* acquire band from loaded object */ /* acquire band from loaded object */
IDirectMusicObject_QueryInterface (pObject, &IID_IDirectMusicBand, (LPVOID*)&pTrack->ppBands[pTrack->dwBands]); IDirectMusicObject_QueryInterface (pObject, &IID_IDirectMusicBand, (LPVOID*)&pNewBand->ppBand);
/*IDirectMusicLoader_Release (pLoader);*/ /*IDirectMusicLoader_Release (pLoader);*/
} else FIXME(": couldn't get band\n"); } else FIXME(": couldn't get band\n");
} }
...@@ -503,6 +580,7 @@ HRESULT WINAPI IDirectMusicBandTrackStream_Load (LPPERSISTSTREAM iface, IStream* ...@@ -503,6 +580,7 @@ HRESULT WINAPI IDirectMusicBandTrackStream_Load (LPPERSISTSTREAM iface, IStream*
} }
TRACE_(dmfile)(": ListCount[1] = %ld < ListSize[1] = %ld\n", ListCount[1], ListSize[1]); TRACE_(dmfile)(": ListCount[1] = %ld < ListSize[1] = %ld\n", ListCount[1], ListSize[1]);
} while (ListCount[1] < ListSize[1]); } while (ListCount[1] < ListSize[1]);
list_add_tail (&pTrack->Bands, &pNewBand->entry);
break; break;
} }
default: { default: {
...@@ -523,7 +601,6 @@ HRESULT WINAPI IDirectMusicBandTrackStream_Load (LPPERSISTSTREAM iface, IStream* ...@@ -523,7 +601,6 @@ HRESULT WINAPI IDirectMusicBandTrackStream_Load (LPPERSISTSTREAM iface, IStream*
} }
TRACE_(dmfile)(": ListCount[0] = %ld < ListSize[0] = %ld\n", ListCount[0], ListSize[0]); TRACE_(dmfile)(": ListCount[0] = %ld < ListSize[0] = %ld\n", ListCount[0], ListSize[0]);
} while (ListCount[0] < ListSize[0]); } while (ListCount[0] < ListSize[0]);
pTrack->dwBands++; /* add reference count */
break; break;
} }
default: { default: {
...@@ -563,7 +640,53 @@ HRESULT WINAPI IDirectMusicBandTrackStream_Load (LPPERSISTSTREAM iface, IStream* ...@@ -563,7 +640,53 @@ HRESULT WINAPI IDirectMusicBandTrackStream_Load (LPPERSISTSTREAM iface, IStream*
return E_FAIL; return E_FAIL;
} }
} }
/* DEBUG: dumps whole band track object tree: */
if (TRACE_ON(dmband)) {
int r = 0;
DMUS_PRIVATE_BAND *tmpEntry;
struct list *listEntry;
TRACE("*** IDirectMusicBandTrack (%p) ***\n", pTrack);
if (pTrack->btkHeader) {
TRACE(" - Band track header:\n");
TRACE(" - bAutoDownload: %i\n", pTrack->btkHeader->bAutoDownload);
}
if (pTrack->guidID)
TRACE(" - GUID = %s\n", debugstr_guid(pTrack->guidID));
if (pTrack->vVersion)
TRACE(" - Version = %i,%i,%i,%i\n", (pTrack->vVersion->dwVersionMS >> 8) && 0x0000FFFF, pTrack->vVersion->dwVersionMS && 0x0000FFFF, \
(pTrack->vVersion->dwVersionLS >> 8) && 0x0000FFFF, pTrack->vVersion->dwVersionLS && 0x0000FFFF);
if (pTrack->wzName)
TRACE(" - Name = %s\n", debugstr_w(pTrack->wzName));
if (pTrack->wzArtist)
TRACE(" - Artist = %s\n", debugstr_w(pTrack->wzArtist));
if (pTrack->wzCopyright)
TRACE(" - Copyright = %s\n", debugstr_w(pTrack->wzCopyright));
if (pTrack->wzSubject)
TRACE(" - Subject = %s\n", debugstr_w(pTrack->wzSubject));
if (pTrack->wzComment)
TRACE(" - Comment = %s\n", debugstr_w(pTrack->wzComment));
TRACE(" - Bands:\n");
LIST_FOR_EACH (listEntry, &pTrack->Bands) {
tmpEntry = LIST_ENTRY( listEntry, DMUS_PRIVATE_BAND, entry );
TRACE(" - Band[%i]:\n", r);
TRACE(" - Band header:\n");
TRACE(" - version = %ld\n", tmpEntry->pBandHeader.dwVersion);
if (tmpEntry->pBandHeader.dwVersion == 1) {
TRACE(" - lBandTime = %li\n", tmpEntry->pBandHeader.lBandTime);
} else if (tmpEntry->pBandHeader.dwVersion == 2) {
TRACE(" - lBandTimeLogical = %li\n", tmpEntry->pBandHeader.lBandTimeLogical);
TRACE(" - lBandTimePhysical = %li\n", tmpEntry->pBandHeader.lBandTimePhysical);
}
TRACE(" - Band: %p\n", tmpEntry->ppBand);
r++;
}
}
return S_OK; return S_OK;
} }
......
...@@ -33,6 +33,8 @@ ...@@ -33,6 +33,8 @@
#include "dmplugin.h" #include "dmplugin.h"
#include "dmusicf.h" #include "dmusicf.h"
#include "dsound.h" #include "dsound.h"
#include "wine/list.h"
/***************************************************************************** /*****************************************************************************
* Interfaces * Interfaces
...@@ -67,6 +69,33 @@ extern HRESULT WINAPI DMUSIC_CreateDirectMusicBandObject (LPCGUID lpcGUID, LPDIR ...@@ -67,6 +69,33 @@ extern HRESULT WINAPI DMUSIC_CreateDirectMusicBandObject (LPCGUID lpcGUID, LPDIR
extern HRESULT WINAPI DMUSIC_CreateDirectMusicBandTrack (LPCGUID lpcGUID, LPDIRECTMUSICTRACK8* ppTrack, LPUNKNOWN pUnkOuter); extern HRESULT WINAPI DMUSIC_CreateDirectMusicBandTrack (LPCGUID lpcGUID, LPDIRECTMUSICTRACK8* ppTrack, LPUNKNOWN pUnkOuter);
/*****************************************************************************
* Auxiliary definitions
*/
/* i don't like M$'s idea about two different band item headers, so behold: universal one */
typedef struct _DMUS_PRIVATE_BAND_ITEM_HEADER {
DWORD dwVersion; /* 1 or 2 */
/* v.1 */
MUSIC_TIME lBandTime;
/* v.2 */
MUSIC_TIME lBandTimeLogical;
MUSIC_TIME lBandTimePhysical;
} DMUS_PRIVATE_BAND_ITEM_HEADER;
typedef struct _DMUS_PRIVATE_INSTRUMENT {
struct list entry; /* for listing elements */
DMUS_IO_INSTRUMENT pInstrument;
IDirectMusicCollection* ppReferenceCollection;
} DMUS_PRIVATE_INSTRUMENT, *LPDMUS_PRIVATE_INSTRUMENT;
typedef struct _DMUS_PRIVATE_BAND {
struct list entry; /* for listing elements */
DMUS_PRIVATE_BAND_ITEM_HEADER pBandHeader;
IDirectMusicBandImpl* ppBand;
} DMUS_PRIVATE_BAND, *LPDMUS_PRIVATE_BAND;
/***************************************************************************** /*****************************************************************************
* IDirectMusicBandImpl implementation structure * IDirectMusicBandImpl implementation structure
*/ */
...@@ -78,18 +107,18 @@ struct IDirectMusicBandImpl ...@@ -78,18 +107,18 @@ struct IDirectMusicBandImpl
/* IDirectMusicBandImpl fields */ /* IDirectMusicBandImpl fields */
IDirectMusicBandObject* pObject; IDirectMusicBandObject* pObject;
GUID guidID; /* unique id */
DMUS_IO_VERSION vVersion; /* version */ GUID* guidID; /* unique id */
DMUS_IO_VERSION* vVersion; /* version */
/* info from UNFO list */ /* info from UNFO list */
WCHAR* wszName; WCHAR* wzName;
WCHAR* wszArtist; WCHAR* wzArtist;
WCHAR* wszCopyright; WCHAR* wzCopyright;
WCHAR* wszSubject; WCHAR* wzSubject;
WCHAR* wszComment; WCHAR* wzComment;
/* data */ /* data */
DMUS_IO_INSTRUMENT pInstruments[255]; struct list Instruments;
IDirectMusicCollection* ppReferenceCollection[255];
DWORD dwInstruments;
}; };
/* IUnknown: */ /* IUnknown: */
...@@ -151,15 +180,6 @@ extern HRESULT WINAPI IDirectMusicBandObjectStream_Load (LPPERSISTSTREAM iface, ...@@ -151,15 +180,6 @@ extern HRESULT WINAPI IDirectMusicBandObjectStream_Load (LPPERSISTSTREAM iface,
extern HRESULT WINAPI IDirectMusicBandObjectStream_Save (LPPERSISTSTREAM iface, IStream* pStm, BOOL fClearDirty); extern HRESULT WINAPI IDirectMusicBandObjectStream_Save (LPPERSISTSTREAM iface, IStream* pStm, BOOL fClearDirty);
extern HRESULT WINAPI IDirectMusicBandObjectStream_GetSizeMax (LPPERSISTSTREAM iface, ULARGE_INTEGER* pcbSize); extern HRESULT WINAPI IDirectMusicBandObjectStream_GetSizeMax (LPPERSISTSTREAM iface, ULARGE_INTEGER* pcbSize);
/* i don't like M$'s idea about two different band item headers, so behold: universal one */
typedef struct _DMUS_PRIVATE_BAND_ITEM_HEADER {
DWORD dwVersion; /* 1 or 2 */
/* v.1 */
MUSIC_TIME lBandTime;
/* v.2 */
MUSIC_TIME lBandTimeLogical;
MUSIC_TIME lBandTimePhysical;
} DMUS_PRIVATE_BAND_ITEM_HEADER;
/***************************************************************************** /*****************************************************************************
* IDirectMusicBandTrack implementation structure * IDirectMusicBandTrack implementation structure
...@@ -172,19 +192,18 @@ struct IDirectMusicBandTrack ...@@ -172,19 +192,18 @@ struct IDirectMusicBandTrack
/* IDirectMusicBandTrack fields */ /* IDirectMusicBandTrack fields */
IDirectMusicBandTrackStream* pStream; IDirectMusicBandTrackStream* pStream;
DMUS_IO_BAND_TRACK_HEADER btkHeader; /* header */ DMUS_IO_BAND_TRACK_HEADER* btkHeader; /* header */
GUID guidID; /* unique id */ GUID* guidID; /* unique id */
DMUS_IO_VERSION vVersion; /* version */ DMUS_IO_VERSION* vVersion; /* version */
/* info from UNFO list */ /* info from UNFO list */
WCHAR* wszName; WCHAR* wzName;
WCHAR* wszArtist; WCHAR* wzArtist;
WCHAR* wszCopyright; WCHAR* wzCopyright;
WCHAR* wszSubject; WCHAR* wzSubject;
WCHAR* wszComment; WCHAR* wzComment;
/* data */ /* data */
DMUS_PRIVATE_BAND_ITEM_HEADER pBandHeaders[255]; /* band item headers for bands */ struct list Bands;
IDirectMusicBandImpl* ppBands[255]; /* bands */
DWORD dwBands; /* nr. of IDirectMusicBandImpl* and DMUS_PRIVATE_BAND_ITEM_HEADER */
}; };
/* IUnknown: */ /* IUnknown: */
...@@ -234,12 +253,11 @@ extern HRESULT WINAPI IDirectMusicBandTrackStream_Load (LPPERSISTSTREAM iface, I ...@@ -234,12 +253,11 @@ extern HRESULT WINAPI IDirectMusicBandTrackStream_Load (LPPERSISTSTREAM iface, I
extern HRESULT WINAPI IDirectMusicBandTrackStream_Save (LPPERSISTSTREAM iface, IStream* pStm, BOOL fClearDirty); extern HRESULT WINAPI IDirectMusicBandTrackStream_Save (LPPERSISTSTREAM iface, IStream* pStm, BOOL fClearDirty);
extern HRESULT WINAPI IDirectMusicBandTrackStream_GetSizeMax (LPPERSISTSTREAM iface, ULARGE_INTEGER* pcbSize); extern HRESULT WINAPI IDirectMusicBandTrackStream_GetSizeMax (LPPERSISTSTREAM iface, ULARGE_INTEGER* pcbSize);
static inline const char *debugstr_fourcc( DWORD fourcc ) static inline const char *debugstr_fourcc (DWORD fourcc) {
{
if (!fourcc) return "'null'"; if (!fourcc) return "'null'";
return wine_dbg_sprintf( "\'%c%c%c%c\'", return wine_dbg_sprintf ("\'%c%c%c%c\'",
(char)(fourcc), (char)(fourcc >> 8), (char)(fourcc), (char)(fourcc >> 8),
(char)(fourcc >> 16), (char)(fourcc >> 24) ); (char)(fourcc >> 16), (char)(fourcc >> 24));
} }
#endif /* __WINE_DMBAND_PRIVATE_H */ #endif /* __WINE_DMBAND_PRIVATE_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment