ntdll/tests: Get rid of "defined but not used" warnings on non-x86(_64) platforms.
[wine.git] / dlls / dmband / dmutils.c
blob760afe8af0997dbc58f4a3d3e8324e764ec63391
1 /* Debug and Helper Functions
3 * Copyright (C) 2004 Rok Mandeljc
4 * Copyright (C) 2004 Raphael Junqueira
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #define COBJMACROS
23 #include "config.h"
24 #include "wine/port.h"
26 #include <stdio.h>
27 #include <stdarg.h>
28 #include <string.h>
30 #include "windef.h"
31 #include "winbase.h"
32 #include "winnt.h"
33 #include "wingdi.h"
34 #include "winuser.h"
36 #include "wine/debug.h"
37 #include "wine/unicode.h"
38 #include "objbase.h"
40 #include "initguid.h"
41 #include "dmusici.h"
42 #include "dmusicf.h"
43 #include "dmusics.h"
45 #include "dmutils.h"
47 WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
48 WINE_DECLARE_DEBUG_CHANNEL(dmfile);
50 /* generic flag-dumping function */
51 static const char* debugstr_flags (DWORD flags, const flag_info* names, size_t num_names){
52 static char buffer[128] = "", *ptr = &buffer[0];
53 unsigned int i;
54 int size = sizeof(buffer);
56 for (i=0; i < num_names; i++) {
57 if ((flags & names[i].val)) {
58 int cnt = snprintf(ptr, size, "%s ", names[i].name);
59 if (cnt < 0 || cnt >= size) break;
60 size -= cnt;
61 ptr += cnt;
65 ptr = &buffer[0];
66 return ptr;
69 /* dump DMUS_OBJ flags */
70 static const char *debugstr_DMUS_OBJ_FLAGS (DWORD flagmask) {
71 static const flag_info flags[] = {
72 FE(DMUS_OBJ_OBJECT),
73 FE(DMUS_OBJ_CLASS),
74 FE(DMUS_OBJ_NAME),
75 FE(DMUS_OBJ_CATEGORY),
76 FE(DMUS_OBJ_FILENAME),
77 FE(DMUS_OBJ_FULLPATH),
78 FE(DMUS_OBJ_URL),
79 FE(DMUS_OBJ_VERSION),
80 FE(DMUS_OBJ_DATE),
81 FE(DMUS_OBJ_LOADED),
82 FE(DMUS_OBJ_MEMORY),
83 FE(DMUS_OBJ_STREAM)
85 return debugstr_flags (flagmask, flags, sizeof(flags)/sizeof(flags[0]));
88 /* month number into month name (for debugstr_filetime) */
89 static const char *debugstr_month (DWORD dwMonth) {
90 switch (dwMonth) {
91 case 1: return "January";
92 case 2: return "February";
93 case 3: return "March";
94 case 4: return "April";
95 case 5: return "May";
96 case 6: return "June";
97 case 7: return "July";
98 case 8: return "August";
99 case 9: return "September";
100 case 10: return "October";
101 case 11: return "November";
102 case 12: return "December";
103 default: return "Invalid";
107 /* FILETIME struct to string conversion for debug messages */
108 static const char *debugstr_filetime (const FILETIME *time) {
109 SYSTEMTIME sysTime;
111 if (!time) return "'null'";
113 FileTimeToSystemTime (time, &sysTime);
115 return wine_dbg_sprintf ("\'%02i. %s %04i %02i:%02i:%02i\'",
116 sysTime.wDay, debugstr_month(sysTime.wMonth), sysTime.wYear,
117 sysTime.wHour, sysTime.wMinute, sysTime.wSecond);
120 /* DMUS_VERSION struct to string conversion for debug messages */
121 static const char *debugstr_dmversion (const DMUS_VERSION *version) {
122 if (!version) return "'null'";
123 return wine_dbg_sprintf ("\'%i,%i,%i,%i\'",
124 HIWORD(version->dwVersionMS),LOWORD(version->dwVersionMS),
125 HIWORD(version->dwVersionLS), LOWORD(version->dwVersionLS));
128 /* dump whole DMUS_OBJECTDESC struct */
129 static const char *debugstr_DMUS_OBJECTDESC (LPDMUS_OBJECTDESC pDesc) {
130 if (pDesc) {
131 char buffer[1024] = "", *ptr = &buffer[0];
133 ptr += sprintf(ptr, "DMUS_OBJECTDESC (%p):\n", pDesc);
134 ptr += sprintf(ptr, " - dwSize = 0x%08X\n", pDesc->dwSize);
135 ptr += sprintf(ptr, " - dwValidData = 0x%08X ( %s)\n", pDesc->dwValidData, debugstr_DMUS_OBJ_FLAGS (pDesc->dwValidData));
136 if (pDesc->dwValidData & DMUS_OBJ_CLASS) ptr += sprintf(ptr, " - guidClass = %s\n", debugstr_dmguid(&pDesc->guidClass));
137 if (pDesc->dwValidData & DMUS_OBJ_OBJECT) ptr += sprintf(ptr, " - guidObject = %s\n", debugstr_guid(&pDesc->guidObject));
138 if (pDesc->dwValidData & DMUS_OBJ_DATE) ptr += sprintf(ptr, " - ftDate = %s\n", debugstr_filetime (&pDesc->ftDate));
139 if (pDesc->dwValidData & DMUS_OBJ_VERSION) ptr += sprintf(ptr, " - vVersion = %s\n", debugstr_dmversion(&pDesc->vVersion));
140 if (pDesc->dwValidData & DMUS_OBJ_NAME) ptr += sprintf(ptr, " - wszName = %s\n", debugstr_w(pDesc->wszName));
141 if (pDesc->dwValidData & DMUS_OBJ_CATEGORY) ptr += sprintf(ptr, " - wszCategory = %s\n", debugstr_w(pDesc->wszCategory));
142 if (pDesc->dwValidData & DMUS_OBJ_FILENAME) ptr += sprintf(ptr, " - wszFileName = %s\n", debugstr_w(pDesc->wszFileName));
143 if (pDesc->dwValidData & DMUS_OBJ_MEMORY) ptr += sprintf(ptr, " - llMemLength = 0x%s\n - pbMemData = %p\n",
144 wine_dbgstr_longlong(pDesc->llMemLength), pDesc->pbMemData);
145 if (pDesc->dwValidData & DMUS_OBJ_STREAM) ptr += sprintf(ptr, " - pStream = %p\n", pDesc->pStream);
147 return wine_dbg_sprintf("%s", buffer);
148 } else {
149 return "(NULL)";
153 HRESULT IDirectMusicUtils_IPersistStream_ParseDescGeneric (DMUS_PRIVATE_CHUNK* pChunk, IStream* pStm, LPDMUS_OBJECTDESC pDesc) {
155 switch (pChunk->fccID) {
156 case DMUS_FOURCC_GUID_CHUNK: {
157 TRACE_(dmfile)(": GUID chunk\n");
158 pDesc->dwValidData |= DMUS_OBJ_OBJECT;
159 IStream_Read (pStm, &pDesc->guidObject, pChunk->dwSize, NULL);
160 break;
162 case DMUS_FOURCC_DATE_CHUNK: {
163 TRACE_(dmfile)(": file date chunk\n");
164 pDesc->dwValidData |= DMUS_OBJ_DATE;
165 IStream_Read (pStm, &pDesc->ftDate, pChunk->dwSize, NULL);
166 break;
168 case DMUS_FOURCC_NAME_CHUNK: {
169 TRACE_(dmfile)(": name chunk\n");
170 pDesc->dwValidData |= DMUS_OBJ_NAME;
171 IStream_Read (pStm, pDesc->wszName, pChunk->dwSize, NULL);
172 break;
174 case DMUS_FOURCC_FILE_CHUNK: {
175 TRACE_(dmfile)(": file name chunk\n");
176 pDesc->dwValidData |= DMUS_OBJ_FILENAME;
177 IStream_Read (pStm, pDesc->wszFileName, pChunk->dwSize, NULL);
178 break;
180 case DMUS_FOURCC_VERSION_CHUNK: {
181 TRACE_(dmfile)(": version chunk\n");
182 pDesc->dwValidData |= DMUS_OBJ_VERSION;
183 IStream_Read (pStm, &pDesc->vVersion, pChunk->dwSize, NULL);
184 break;
186 case DMUS_FOURCC_CATEGORY_CHUNK: {
187 TRACE_(dmfile)(": category chunk\n");
188 pDesc->dwValidData |= DMUS_OBJ_CATEGORY;
189 IStream_Read (pStm, pDesc->wszCategory, pChunk->dwSize, NULL);
190 break;
192 default:
193 /* not handled */
194 return S_FALSE;
197 return S_OK;
200 HRESULT IDirectMusicUtils_IPersistStream_ParseUNFOGeneric (DMUS_PRIVATE_CHUNK* pChunk, IStream* pStm, LPDMUS_OBJECTDESC pDesc) {
202 LARGE_INTEGER liMove; /* used when skipping chunks */
205 * don't ask me why, but M$ puts INFO elements in UNFO list sometimes
206 * (though strings seem to be valid unicode)
208 switch (pChunk->fccID) {
210 case mmioFOURCC('I','N','A','M'):
211 case DMUS_FOURCC_UNAM_CHUNK: {
212 TRACE_(dmfile)(": name chunk\n");
213 pDesc->dwValidData |= DMUS_OBJ_NAME;
214 IStream_Read (pStm, pDesc->wszName, pChunk->dwSize, NULL);
215 TRACE_(dmfile)(" - wszName: %s\n", debugstr_w(pDesc->wszName));
216 break;
219 case mmioFOURCC('I','A','R','T'):
220 case DMUS_FOURCC_UART_CHUNK: {
221 TRACE_(dmfile)(": artist chunk (ignored)\n");
222 liMove.QuadPart = pChunk->dwSize;
223 IStream_Seek (pStm, liMove, STREAM_SEEK_CUR, NULL);
224 break;
226 case mmioFOURCC('I','C','O','P'):
227 case DMUS_FOURCC_UCOP_CHUNK: {
228 TRACE_(dmfile)(": copyright chunk (ignored)\n");
229 liMove.QuadPart = pChunk->dwSize;
230 IStream_Seek (pStm, liMove, STREAM_SEEK_CUR, NULL);
231 break;
233 case mmioFOURCC('I','S','B','J'):
234 case DMUS_FOURCC_USBJ_CHUNK: {
235 TRACE_(dmfile)(": subject chunk (ignored)\n");
236 liMove.QuadPart = pChunk->dwSize;
237 IStream_Seek (pStm, liMove, STREAM_SEEK_CUR, NULL);
238 break;
240 case mmioFOURCC('I','C','M','T'):
241 case DMUS_FOURCC_UCMT_CHUNK: {
242 TRACE_(dmfile)(": comment chunk (ignored)\n");
243 liMove.QuadPart = pChunk->dwSize;
244 IStream_Seek (pStm, liMove, STREAM_SEEK_CUR, NULL);
245 break;
247 default:
248 /* not handled */
249 return S_FALSE;
252 return S_OK;
255 HRESULT IDirectMusicUtils_IPersistStream_ParseReference (LPPERSISTSTREAM iface, DMUS_PRIVATE_CHUNK* pChunk, IStream* pStm, IDirectMusicObject** ppObject) {
256 DMUS_PRIVATE_CHUNK Chunk;
257 DWORD ListSize[3], ListCount[3];
258 LARGE_INTEGER liMove; /* used when skipping chunks */
259 HRESULT hr;
261 DMUS_IO_REFERENCE ref;
262 DMUS_OBJECTDESC ref_desc;
264 memset(&ref, 0, sizeof(ref));
265 memset(&ref_desc, 0, sizeof(ref_desc));
267 if (pChunk->fccID != DMUS_FOURCC_REF_LIST) {
268 ERR_(dmfile)(": %s chunk should be a REF list\n", debugstr_fourcc (pChunk->fccID));
269 return E_FAIL;
272 ListSize[0] = pChunk->dwSize - sizeof(FOURCC);
273 ListCount[0] = 0;
275 do {
276 IStream_Read (pStm, &Chunk, sizeof(FOURCC)+sizeof(DWORD), NULL);
277 ListCount[0] += sizeof(FOURCC) + sizeof(DWORD) + Chunk.dwSize;
278 TRACE_(dmfile)(": %s chunk (size = %d)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize);
280 hr = IDirectMusicUtils_IPersistStream_ParseDescGeneric(&Chunk, pStm, &ref_desc);
281 if (FAILED(hr)) return hr;
283 if (hr == S_FALSE) {
284 switch (Chunk.fccID) {
285 case DMUS_FOURCC_REF_CHUNK: {
286 TRACE_(dmfile)(": Reference chunk\n");
287 if (Chunk.dwSize != sizeof(DMUS_IO_REFERENCE)) return E_FAIL;
288 IStream_Read (pStm, &ref, sizeof(DMUS_IO_REFERENCE), NULL);
289 TRACE_(dmfile)(" - guidClassID: %s\n", debugstr_dmguid(&ref.guidClassID));
290 TRACE_(dmfile)(" - dwValidData: %u\n", ref.dwValidData);
291 break;
293 default: {
294 TRACE_(dmfile)(": unknown chunk (irrelevant & skipping)\n");
295 liMove.QuadPart = Chunk.dwSize;
296 IStream_Seek (pStm, liMove, STREAM_SEEK_CUR, NULL);
297 break;
301 TRACE_(dmfile)(": ListCount[0] = %d < ListSize[0] = %d\n", ListCount[0], ListSize[0]);
302 } while (ListCount[0] < ListSize[0]);
304 ref_desc.dwValidData |= DMUS_OBJ_CLASS;
305 ref_desc.guidClass = ref.guidClassID;
307 TRACE_(dmfile)("** DM Reference Begin of Load ***\n");
308 TRACE_(dmfile)("With Desc:\n");
309 debugstr_DMUS_OBJECTDESC(&ref_desc);
312 LPDIRECTMUSICGETLOADER pGetLoader = NULL;
313 LPDIRECTMUSICLOADER pLoader = NULL;
315 IStream_QueryInterface (pStm, &IID_IDirectMusicGetLoader, (LPVOID*)&pGetLoader);
316 IDirectMusicGetLoader_GetLoader (pGetLoader, &pLoader);
317 IDirectMusicGetLoader_Release (pGetLoader);
319 hr = IDirectMusicLoader_GetObject (pLoader, &ref_desc, &IID_IDirectMusicObject, (LPVOID*)ppObject);
320 IDirectMusicLoader_Release (pLoader); /* release loader */
322 TRACE_(dmfile)("** DM Reference End of Load ***\n");
324 return S_OK;
327 /* FOURCC to string conversion for debug messages */
328 const char *debugstr_fourcc (DWORD fourcc) {
329 if (!fourcc) return "'null'";
330 return wine_dbg_sprintf ("\'%c%c%c%c\'",
331 (char)(fourcc), (char)(fourcc >> 8),
332 (char)(fourcc >> 16), (char)(fourcc >> 24));
335 /* returns name of given GUID */
336 const char *debugstr_dmguid (const GUID *id) {
337 static const guid_info guids[] = {
338 /* CLSIDs */
339 GE(CLSID_AudioVBScript),
340 GE(CLSID_DirectMusic),
341 GE(CLSID_DirectMusicAudioPathConfig),
342 GE(CLSID_DirectMusicAuditionTrack),
343 GE(CLSID_DirectMusicBand),
344 GE(CLSID_DirectMusicBandTrack),
345 GE(CLSID_DirectMusicChordMapTrack),
346 GE(CLSID_DirectMusicChordMap),
347 GE(CLSID_DirectMusicChordTrack),
348 GE(CLSID_DirectMusicCollection),
349 GE(CLSID_DirectMusicCommandTrack),
350 GE(CLSID_DirectMusicComposer),
351 GE(CLSID_DirectMusicContainer),
352 GE(CLSID_DirectMusicGraph),
353 GE(CLSID_DirectMusicLoader),
354 GE(CLSID_DirectMusicLyricsTrack),
355 GE(CLSID_DirectMusicMarkerTrack),
356 GE(CLSID_DirectMusicMelodyFormulationTrack),
357 GE(CLSID_DirectMusicMotifTrack),
358 GE(CLSID_DirectMusicMuteTrack),
359 GE(CLSID_DirectMusicParamControlTrack),
360 GE(CLSID_DirectMusicPatternTrack),
361 GE(CLSID_DirectMusicPerformance),
362 GE(CLSID_DirectMusicScript),
363 GE(CLSID_DirectMusicScriptAutoImpSegment),
364 GE(CLSID_DirectMusicScriptAutoImpPerformance),
365 GE(CLSID_DirectMusicScriptAutoImpSegmentState),
366 GE(CLSID_DirectMusicScriptAutoImpAudioPathConfig),
367 GE(CLSID_DirectMusicScriptAutoImpAudioPath),
368 GE(CLSID_DirectMusicScriptAutoImpSong),
369 GE(CLSID_DirectMusicScriptSourceCodeLoader),
370 GE(CLSID_DirectMusicScriptTrack),
371 GE(CLSID_DirectMusicSection),
372 GE(CLSID_DirectMusicSegment),
373 GE(CLSID_DirectMusicSegmentState),
374 GE(CLSID_DirectMusicSegmentTriggerTrack),
375 GE(CLSID_DirectMusicSegTriggerTrack),
376 GE(CLSID_DirectMusicSeqTrack),
377 GE(CLSID_DirectMusicSignPostTrack),
378 GE(CLSID_DirectMusicSong),
379 GE(CLSID_DirectMusicStyle),
380 GE(CLSID_DirectMusicStyleTrack),
381 GE(CLSID_DirectMusicSynth),
382 GE(CLSID_DirectMusicSynthSink),
383 GE(CLSID_DirectMusicSysExTrack),
384 GE(CLSID_DirectMusicTemplate),
385 GE(CLSID_DirectMusicTempoTrack),
386 GE(CLSID_DirectMusicTimeSigTrack),
387 GE(CLSID_DirectMusicWaveTrack),
388 GE(CLSID_DirectSoundWave),
389 /* IIDs */
390 GE(IID_IDirectMusic),
391 GE(IID_IDirectMusic2),
392 GE(IID_IDirectMusic8),
393 GE(IID_IDirectMusicAudioPath),
394 GE(IID_IDirectMusicBand),
395 GE(IID_IDirectMusicBuffer),
396 GE(IID_IDirectMusicChordMap),
397 GE(IID_IDirectMusicCollection),
398 GE(IID_IDirectMusicComposer),
399 GE(IID_IDirectMusicContainer),
400 GE(IID_IDirectMusicDownload),
401 GE(IID_IDirectMusicDownloadedInstrument),
402 GE(IID_IDirectMusicGetLoader),
403 GE(IID_IDirectMusicGraph),
404 GE(IID_IDirectMusicInstrument),
405 GE(IID_IDirectMusicLoader),
406 GE(IID_IDirectMusicLoader8),
407 GE(IID_IDirectMusicObject),
408 GE(IID_IDirectMusicPatternTrack),
409 GE(IID_IDirectMusicPerformance),
410 GE(IID_IDirectMusicPerformance2),
411 GE(IID_IDirectMusicPerformance8),
412 GE(IID_IDirectMusicPort),
413 GE(IID_IDirectMusicPortDownload),
414 GE(IID_IDirectMusicScript),
415 GE(IID_IDirectMusicSegment),
416 GE(IID_IDirectMusicSegment2),
417 GE(IID_IDirectMusicSegment8),
418 GE(IID_IDirectMusicSegmentState),
419 GE(IID_IDirectMusicSegmentState8),
420 GE(IID_IDirectMusicStyle),
421 GE(IID_IDirectMusicStyle8),
422 GE(IID_IDirectMusicSynth),
423 GE(IID_IDirectMusicSynth8),
424 GE(IID_IDirectMusicSynthSink),
425 GE(IID_IDirectMusicThru),
426 GE(IID_IDirectMusicTool),
427 GE(IID_IDirectMusicTool8),
428 GE(IID_IDirectMusicTrack),
429 GE(IID_IDirectMusicTrack8),
430 GE(IID_IUnknown),
431 GE(IID_IPersistStream),
432 GE(IID_IStream),
433 GE(IID_IClassFactory),
434 /* GUIDs */
435 GE(GUID_DirectMusicAllTypes),
436 GE(GUID_NOTIFICATION_CHORD),
437 GE(GUID_NOTIFICATION_COMMAND),
438 GE(GUID_NOTIFICATION_MEASUREANDBEAT),
439 GE(GUID_NOTIFICATION_PERFORMANCE),
440 GE(GUID_NOTIFICATION_RECOMPOSE),
441 GE(GUID_NOTIFICATION_SEGMENT),
442 GE(GUID_BandParam),
443 GE(GUID_ChordParam),
444 GE(GUID_CommandParam),
445 GE(GUID_CommandParam2),
446 GE(GUID_CommandParamNext),
447 GE(GUID_IDirectMusicBand),
448 GE(GUID_IDirectMusicChordMap),
449 GE(GUID_IDirectMusicStyle),
450 GE(GUID_MuteParam),
451 GE(GUID_Play_Marker),
452 GE(GUID_RhythmParam),
453 GE(GUID_TempoParam),
454 GE(GUID_TimeSignature),
455 GE(GUID_Valid_Start_Time),
456 GE(GUID_Clear_All_Bands),
457 GE(GUID_ConnectToDLSCollection),
458 GE(GUID_Disable_Auto_Download),
459 GE(GUID_DisableTempo),
460 GE(GUID_DisableTimeSig),
461 GE(GUID_Download),
462 GE(GUID_DownloadToAudioPath),
463 GE(GUID_Enable_Auto_Download),
464 GE(GUID_EnableTempo),
465 GE(GUID_EnableTimeSig),
466 GE(GUID_IgnoreBankSelectForGM),
467 GE(GUID_SeedVariations),
468 GE(GUID_StandardMIDIFile),
469 GE(GUID_Unload),
470 GE(GUID_UnloadFromAudioPath),
471 GE(GUID_Variations),
472 GE(GUID_PerfMasterTempo),
473 GE(GUID_PerfMasterVolume),
474 GE(GUID_PerfMasterGrooveLevel),
475 GE(GUID_PerfAutoDownload),
476 GE(GUID_DefaultGMCollection),
477 GE(GUID_Synth_Default),
478 GE(GUID_Buffer_Reverb),
479 GE(GUID_Buffer_EnvReverb),
480 GE(GUID_Buffer_Stereo),
481 GE(GUID_Buffer_3D_Dry),
482 GE(GUID_Buffer_Mono),
483 GE(GUID_DMUS_PROP_GM_Hardware),
484 GE(GUID_DMUS_PROP_GS_Capable),
485 GE(GUID_DMUS_PROP_GS_Hardware),
486 GE(GUID_DMUS_PROP_DLS1),
487 GE(GUID_DMUS_PROP_DLS2),
488 GE(GUID_DMUS_PROP_Effects),
489 GE(GUID_DMUS_PROP_INSTRUMENT2),
490 GE(GUID_DMUS_PROP_LegacyCaps),
491 GE(GUID_DMUS_PROP_MemorySize),
492 GE(GUID_DMUS_PROP_SampleMemorySize),
493 GE(GUID_DMUS_PROP_SamplePlaybackRate),
494 GE(GUID_DMUS_PROP_SetSynthSink),
495 GE(GUID_DMUS_PROP_SinkUsesDSound),
496 GE(GUID_DMUS_PROP_SynthSink_DSOUND),
497 GE(GUID_DMUS_PROP_SynthSink_WAVE),
498 GE(GUID_DMUS_PROP_Volume),
499 GE(GUID_DMUS_PROP_WavesReverb),
500 GE(GUID_DMUS_PROP_WriteLatency),
501 GE(GUID_DMUS_PROP_WritePeriod),
502 GE(GUID_DMUS_PROP_XG_Capable),
503 GE(GUID_DMUS_PROP_XG_Hardware)
506 unsigned int i;
508 if (!id) return "(null)";
509 for (i = 0; i < sizeof(guids)/sizeof(guids[0]); i++) {
510 if (IsEqualGUID(id, guids[i].guid))
511 return guids[i].name;
514 /* if we didn't find it, act like standard debugstr_guid */
515 return debugstr_guid(id);
519 void debug_DMUS_OBJECTDESC (LPDMUS_OBJECTDESC pDesc) {
520 if (pDesc) {
521 TRACE("DMUS_OBJECTDESC (%p):\n", pDesc);
522 TRACE(" - dwSize = %d\n", pDesc->dwSize);
523 TRACE(" - dwValidData = %s\n", debugstr_DMUS_OBJ_FLAGS (pDesc->dwValidData));
524 if (pDesc->dwValidData & DMUS_OBJ_NAME) TRACE(" - wszName = %s\n", debugstr_w(pDesc->wszName));
525 if (pDesc->dwValidData & DMUS_OBJ_CLASS) TRACE(" - guidClass = %s\n", debugstr_dmguid(&pDesc->guidClass));
526 if (pDesc->dwValidData & DMUS_OBJ_OBJECT) TRACE(" - guidObject = %s\n", debugstr_guid(&pDesc->guidObject));
527 if (pDesc->dwValidData & DMUS_OBJ_DATE) TRACE(" - ftDate = FIXME\n");
528 if (pDesc->dwValidData & DMUS_OBJ_VERSION) TRACE(" - vVersion = %s\n", debugstr_dmversion(&pDesc->vVersion));
529 if (pDesc->dwValidData & DMUS_OBJ_CATEGORY) TRACE(" - wszCategory = %s\n", debugstr_w(pDesc->wszCategory));
530 if (pDesc->dwValidData & DMUS_OBJ_FILENAME) TRACE(" - wszFileName = %s\n", debugstr_w(pDesc->wszFileName));
531 if (pDesc->dwValidData & DMUS_OBJ_MEMORY) TRACE(" - llMemLength = 0x%s\n - pbMemData = %p\n",
532 wine_dbgstr_longlong(pDesc->llMemLength), pDesc->pbMemData);
533 if (pDesc->dwValidData & DMUS_OBJ_STREAM) TRACE(" - pStream = %p\n", pDesc->pStream);
534 } else {
535 TRACE("(NULL)\n");