Commit f8f41d81 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

dmband: Use only the 'dmfile' debug channel in dmutils.c.

parent 864e373c
...@@ -42,8 +42,7 @@ ...@@ -42,8 +42,7 @@
#include "dmutils.h" #include "dmutils.h"
#include "dmobject.h" #include "dmobject.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmusic); WINE_DEFAULT_DEBUG_CHANNEL(dmfile);
WINE_DECLARE_DEBUG_CHANNEL(dmfile);
/* generic flag-dumping function */ /* generic flag-dumping function */
static const char* debugstr_flags (DWORD flags, const flag_info* names, size_t num_names){ static const char* debugstr_flags (DWORD flags, const flag_info* names, size_t num_names){
...@@ -127,37 +126,37 @@ HRESULT IDirectMusicUtils_IPersistStream_ParseDescGeneric (DMUS_PRIVATE_CHUNK* p ...@@ -127,37 +126,37 @@ HRESULT IDirectMusicUtils_IPersistStream_ParseDescGeneric (DMUS_PRIVATE_CHUNK* p
switch (pChunk->fccID) { switch (pChunk->fccID) {
case DMUS_FOURCC_GUID_CHUNK: { case DMUS_FOURCC_GUID_CHUNK: {
TRACE_(dmfile)(": GUID chunk\n"); TRACE(": GUID chunk\n");
pDesc->dwValidData |= DMUS_OBJ_OBJECT; pDesc->dwValidData |= DMUS_OBJ_OBJECT;
IStream_Read (pStm, &pDesc->guidObject, pChunk->dwSize, NULL); IStream_Read (pStm, &pDesc->guidObject, pChunk->dwSize, NULL);
break; break;
} }
case DMUS_FOURCC_DATE_CHUNK: { case DMUS_FOURCC_DATE_CHUNK: {
TRACE_(dmfile)(": file date chunk\n"); TRACE(": file date chunk\n");
pDesc->dwValidData |= DMUS_OBJ_DATE; pDesc->dwValidData |= DMUS_OBJ_DATE;
IStream_Read (pStm, &pDesc->ftDate, pChunk->dwSize, NULL); IStream_Read (pStm, &pDesc->ftDate, pChunk->dwSize, NULL);
break; break;
} }
case DMUS_FOURCC_NAME_CHUNK: { case DMUS_FOURCC_NAME_CHUNK: {
TRACE_(dmfile)(": name chunk\n"); TRACE(": name chunk\n");
pDesc->dwValidData |= DMUS_OBJ_NAME; pDesc->dwValidData |= DMUS_OBJ_NAME;
IStream_Read (pStm, pDesc->wszName, pChunk->dwSize, NULL); IStream_Read (pStm, pDesc->wszName, pChunk->dwSize, NULL);
break; break;
} }
case DMUS_FOURCC_FILE_CHUNK: { case DMUS_FOURCC_FILE_CHUNK: {
TRACE_(dmfile)(": file name chunk\n"); TRACE(": file name chunk\n");
pDesc->dwValidData |= DMUS_OBJ_FILENAME; pDesc->dwValidData |= DMUS_OBJ_FILENAME;
IStream_Read (pStm, pDesc->wszFileName, pChunk->dwSize, NULL); IStream_Read (pStm, pDesc->wszFileName, pChunk->dwSize, NULL);
break; break;
} }
case DMUS_FOURCC_VERSION_CHUNK: { case DMUS_FOURCC_VERSION_CHUNK: {
TRACE_(dmfile)(": version chunk\n"); TRACE(": version chunk\n");
pDesc->dwValidData |= DMUS_OBJ_VERSION; pDesc->dwValidData |= DMUS_OBJ_VERSION;
IStream_Read (pStm, &pDesc->vVersion, pChunk->dwSize, NULL); IStream_Read (pStm, &pDesc->vVersion, pChunk->dwSize, NULL);
break; break;
} }
case DMUS_FOURCC_CATEGORY_CHUNK: { case DMUS_FOURCC_CATEGORY_CHUNK: {
TRACE_(dmfile)(": category chunk\n"); TRACE(": category chunk\n");
pDesc->dwValidData |= DMUS_OBJ_CATEGORY; pDesc->dwValidData |= DMUS_OBJ_CATEGORY;
IStream_Read (pStm, pDesc->wszCategory, pChunk->dwSize, NULL); IStream_Read (pStm, pDesc->wszCategory, pChunk->dwSize, NULL);
break; break;
...@@ -182,37 +181,37 @@ HRESULT IDirectMusicUtils_IPersistStream_ParseUNFOGeneric (DMUS_PRIVATE_CHUNK* p ...@@ -182,37 +181,37 @@ HRESULT IDirectMusicUtils_IPersistStream_ParseUNFOGeneric (DMUS_PRIVATE_CHUNK* p
case mmioFOURCC('I','N','A','M'): case mmioFOURCC('I','N','A','M'):
case DMUS_FOURCC_UNAM_CHUNK: { case DMUS_FOURCC_UNAM_CHUNK: {
TRACE_(dmfile)(": name chunk\n"); TRACE(": name chunk\n");
pDesc->dwValidData |= DMUS_OBJ_NAME; pDesc->dwValidData |= DMUS_OBJ_NAME;
IStream_Read (pStm, pDesc->wszName, pChunk->dwSize, NULL); IStream_Read (pStm, pDesc->wszName, pChunk->dwSize, NULL);
TRACE_(dmfile)(" - wszName: %s\n", debugstr_w(pDesc->wszName)); TRACE(" - wszName: %s\n", debugstr_w(pDesc->wszName));
break; break;
} }
case mmioFOURCC('I','A','R','T'): case mmioFOURCC('I','A','R','T'):
case DMUS_FOURCC_UART_CHUNK: { case DMUS_FOURCC_UART_CHUNK: {
TRACE_(dmfile)(": artist chunk (ignored)\n"); TRACE(": artist chunk (ignored)\n");
liMove.QuadPart = pChunk->dwSize; liMove.QuadPart = pChunk->dwSize;
IStream_Seek (pStm, liMove, STREAM_SEEK_CUR, NULL); IStream_Seek (pStm, liMove, STREAM_SEEK_CUR, NULL);
break; break;
} }
case mmioFOURCC('I','C','O','P'): case mmioFOURCC('I','C','O','P'):
case DMUS_FOURCC_UCOP_CHUNK: { case DMUS_FOURCC_UCOP_CHUNK: {
TRACE_(dmfile)(": copyright chunk (ignored)\n"); TRACE(": copyright chunk (ignored)\n");
liMove.QuadPart = pChunk->dwSize; liMove.QuadPart = pChunk->dwSize;
IStream_Seek (pStm, liMove, STREAM_SEEK_CUR, NULL); IStream_Seek (pStm, liMove, STREAM_SEEK_CUR, NULL);
break; break;
} }
case mmioFOURCC('I','S','B','J'): case mmioFOURCC('I','S','B','J'):
case DMUS_FOURCC_USBJ_CHUNK: { case DMUS_FOURCC_USBJ_CHUNK: {
TRACE_(dmfile)(": subject chunk (ignored)\n"); TRACE(": subject chunk (ignored)\n");
liMove.QuadPart = pChunk->dwSize; liMove.QuadPart = pChunk->dwSize;
IStream_Seek (pStm, liMove, STREAM_SEEK_CUR, NULL); IStream_Seek (pStm, liMove, STREAM_SEEK_CUR, NULL);
break; break;
} }
case mmioFOURCC('I','C','M','T'): case mmioFOURCC('I','C','M','T'):
case DMUS_FOURCC_UCMT_CHUNK: { case DMUS_FOURCC_UCMT_CHUNK: {
TRACE_(dmfile)(": comment chunk (ignored)\n"); TRACE(": comment chunk (ignored)\n");
liMove.QuadPart = pChunk->dwSize; liMove.QuadPart = pChunk->dwSize;
IStream_Seek (pStm, liMove, STREAM_SEEK_CUR, NULL); IStream_Seek (pStm, liMove, STREAM_SEEK_CUR, NULL);
break; break;
...@@ -248,7 +247,7 @@ HRESULT IDirectMusicUtils_IPersistStream_ParseReference (LPPERSISTSTREAM iface, ...@@ -248,7 +247,7 @@ HRESULT IDirectMusicUtils_IPersistStream_ParseReference (LPPERSISTSTREAM iface,
do { do {
IStream_Read (pStm, &Chunk, sizeof(FOURCC)+sizeof(DWORD), NULL); IStream_Read (pStm, &Chunk, sizeof(FOURCC)+sizeof(DWORD), NULL);
ListCount[0] += sizeof(FOURCC) + sizeof(DWORD) + Chunk.dwSize; ListCount[0] += sizeof(FOURCC) + sizeof(DWORD) + Chunk.dwSize;
TRACE_(dmfile)(": %s chunk (size = %d)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize); TRACE(": %s chunk (size = %d)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize);
hr = IDirectMusicUtils_IPersistStream_ParseDescGeneric(&Chunk, pStm, &ref_desc); hr = IDirectMusicUtils_IPersistStream_ParseDescGeneric(&Chunk, pStm, &ref_desc);
if (FAILED(hr)) return hr; if (FAILED(hr)) return hr;
...@@ -256,29 +255,29 @@ HRESULT IDirectMusicUtils_IPersistStream_ParseReference (LPPERSISTSTREAM iface, ...@@ -256,29 +255,29 @@ HRESULT IDirectMusicUtils_IPersistStream_ParseReference (LPPERSISTSTREAM iface,
if (hr == S_FALSE) { if (hr == S_FALSE) {
switch (Chunk.fccID) { switch (Chunk.fccID) {
case DMUS_FOURCC_REF_CHUNK: { case DMUS_FOURCC_REF_CHUNK: {
TRACE_(dmfile)(": Reference chunk\n"); TRACE(": Reference chunk\n");
if (Chunk.dwSize != sizeof(DMUS_IO_REFERENCE)) return E_FAIL; if (Chunk.dwSize != sizeof(DMUS_IO_REFERENCE)) return E_FAIL;
IStream_Read (pStm, &ref, sizeof(DMUS_IO_REFERENCE), NULL); IStream_Read (pStm, &ref, sizeof(DMUS_IO_REFERENCE), NULL);
TRACE_(dmfile)(" - guidClassID: %s\n", debugstr_dmguid(&ref.guidClassID)); TRACE(" - guidClassID: %s\n", debugstr_dmguid(&ref.guidClassID));
TRACE_(dmfile)(" - dwValidData: %u\n", ref.dwValidData); TRACE(" - dwValidData: %u\n", ref.dwValidData);
break; break;
} }
default: { default: {
TRACE_(dmfile)(": unknown chunk (irrelevant & skipping)\n"); TRACE(": unknown chunk (irrelevant & skipping)\n");
liMove.QuadPart = Chunk.dwSize; liMove.QuadPart = Chunk.dwSize;
IStream_Seek (pStm, liMove, STREAM_SEEK_CUR, NULL); IStream_Seek (pStm, liMove, STREAM_SEEK_CUR, NULL);
break; break;
} }
} }
} }
TRACE_(dmfile)(": ListCount[0] = %d < ListSize[0] = %d\n", ListCount[0], ListSize[0]); TRACE(": ListCount[0] = %d < ListSize[0] = %d\n", ListCount[0], ListSize[0]);
} while (ListCount[0] < ListSize[0]); } while (ListCount[0] < ListSize[0]);
ref_desc.dwValidData |= DMUS_OBJ_CLASS; ref_desc.dwValidData |= DMUS_OBJ_CLASS;
ref_desc.guidClass = ref.guidClassID; ref_desc.guidClass = ref.guidClassID;
TRACE_(dmfile)("** DM Reference Begin of Load ***\n"); TRACE("** DM Reference Begin of Load ***\n");
TRACE_(dmfile)("With Desc:\n"); TRACE("With Desc:\n");
debug_DMUS_OBJECTDESC(&ref_desc); debug_DMUS_OBJECTDESC(&ref_desc);
{ {
...@@ -292,7 +291,7 @@ HRESULT IDirectMusicUtils_IPersistStream_ParseReference (LPPERSISTSTREAM iface, ...@@ -292,7 +291,7 @@ HRESULT IDirectMusicUtils_IPersistStream_ParseReference (LPPERSISTSTREAM iface,
hr = IDirectMusicLoader_GetObject (pLoader, &ref_desc, &IID_IDirectMusicObject, (LPVOID*)ppObject); hr = IDirectMusicLoader_GetObject (pLoader, &ref_desc, &IID_IDirectMusicObject, (LPVOID*)ppObject);
IDirectMusicLoader_Release (pLoader); /* release loader */ IDirectMusicLoader_Release (pLoader); /* release loader */
} }
TRACE_(dmfile)("** DM Reference End of Load ***\n"); TRACE("** DM Reference End of Load ***\n");
return hr; return hr;
} }
......
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