222{
225 DWORD StreamSize, StreamCount, ListSize[2], ListCount[2];
227 ULARGE_INTEGER dlibCollectionPosition, dlibInstrumentPosition, dlibWavePoolPosition;
228
231 IStream_Seek(
stream, liMove, STREAM_SEEK_CUR, &dlibCollectionPosition);
232 This->liCollectionPosition.QuadPart = dlibCollectionPosition.
QuadPart;
234
237
239 TRACE_(dmfile)(
": unexpected chunk; loading failed)\n");
241 IStream_Seek(
stream, liMove, STREAM_SEEK_CUR,
NULL);
243 }
244
248 StreamCount = 0;
249
251 TRACE_(dmfile)(
": unexpected chunk; loading failed)\n");
253 IStream_Seek(
stream, liMove, STREAM_SEEK_CUR,
NULL);
255 }
256
257 TRACE_(dmfile)(
": collection form\n");
258 do {
262 switch (
chunk.fccID) {
264 TRACE_(dmfile)(
": collection header chunk\n");
267 break;
268 }
270 TRACE_(dmfile)(
": DLID (GUID) chunk\n");
273 break;
274 }
276 TRACE_(dmfile)(
": version chunk\n");
279 break;
280 }
282 TRACE_(dmfile)(
": pool table chunk\n");
288 break;
289 }
294 ListCount[0] = 0;
295 switch (
chunk.fccID) {
297 TRACE_(dmfile)(
": INFO list\n");
298 do {
302 switch (
chunk.fccID) {
305 TRACE_(dmfile)(
": name chunk\n");
310 ListCount[0]++;
312 IStream_Seek(
stream, liMove, STREAM_SEEK_CUR,
NULL);
313 }
314 break;
315 }
317 TRACE_(dmfile)(
": artist chunk (ignored)\n");
319 ListCount[0]++;
321 }
323 IStream_Seek(
stream, liMove, STREAM_SEEK_CUR,
NULL);
324 break;
325 }
327 TRACE_(dmfile)(
": copyright chunk\n");
331 ListCount[0]++;
333 IStream_Seek(
stream, liMove, STREAM_SEEK_CUR,
NULL);
334 }
335 break;
336 }
338 TRACE_(dmfile)(
": subject chunk (ignored)\n");
340 ListCount[0]++;
342 }
344 IStream_Seek(
stream, liMove, STREAM_SEEK_CUR,
NULL);
345 break;
346 }
348 TRACE_(dmfile)(
": comment chunk (ignored)\n");
350 ListCount[0]++;
352 }
354 IStream_Seek(
stream, liMove, STREAM_SEEK_CUR,
NULL);
355 break;
356 }
357 default: {
358 TRACE_(dmfile)(
": unknown chunk (irrelevant & skipping)\n");
360 ListCount[0]++;
362 }
364 IStream_Seek(
stream, liMove, STREAM_SEEK_CUR,
NULL);
365 break;
366 }
367 }
368 TRACE_(dmfile)(
": ListCount[0] = %d < ListSize[0] = %d\n", ListCount[0], ListSize[0]);
369 } while (ListCount[0] < ListSize[0]);
370 break;
371 }
373 TRACE_(dmfile)(
": wave pool list (mark & skip)\n");
375 IStream_Seek(
stream, liMove, STREAM_SEEK_CUR, &dlibWavePoolPosition);
376 This->liWavePoolTablePosition.QuadPart = dlibWavePoolPosition.
QuadPart;
378 IStream_Seek(
stream, liMove, STREAM_SEEK_CUR,
NULL);
379 break;
380 }
382 TRACE_(dmfile)(
": instruments list\n");
383 do {
387 switch (
chunk.fccID) {
392 ListCount[1] = 0;
393 switch (
chunk.fccID) {
396 TRACE_(dmfile)(
": instrument list\n");
397
399 {
401
403 IStream_Seek(
stream, liMove, STREAM_SEEK_CUR, &dlibInstrumentPosition);
405 instrument->
length = ListSize[1];
406 do {
410 switch (
chunk.fccID) {
412 TRACE_(dmfile)(
": instrument header chunk\n");
414 break;
415 }
417 TRACE_(dmfile)(
": DLID (GUID) chunk\n");
419 break;
420 }
424 switch (
chunk.fccID) {
425 default: {
426 TRACE_(dmfile)(
": unknown (skipping)\n");
428 IStream_Seek(
stream, liMove, STREAM_SEEK_CUR,
NULL);
429 break;
430 }
431 }
432 break;
433 }
434 default: {
435 TRACE_(dmfile)(
": unknown chunk (irrelevant & skipping)\n");
437 IStream_Seek(
stream, liMove, STREAM_SEEK_CUR,
NULL);
438 break;
439 }
440 }
441 TRACE_(dmfile)(
": ListCount[1] = %d < ListSize[1] = %d\n", ListCount[1], ListSize[1]);
442 } while (ListCount[1] < ListSize[1]);
443
445 TRACE(
"*** IDirectMusicInstrument (%p) ***\n", instrument);
448 TRACE(
" - Instrument header:\n");
450 TRACE(
" - Locale:\n");
454 }
456 }
457 break;
458 }
459 }
460 break;
461 }
462 default: {
463 TRACE_(dmfile)(
": unknown chunk (irrelevant & skipping)\n");
465 IStream_Seek(
stream, liMove, STREAM_SEEK_CUR,
NULL);
466 break;
467 }
468 }
469 TRACE_(dmfile)(
": ListCount[0] = %d < ListSize[0] = %d\n", ListCount[0], ListSize[0]);
470 } while (ListCount[0] < ListSize[0]);
471 break;
472 }
473 default: {
474 TRACE_(dmfile)(
": unknown (skipping)\n");
476 IStream_Seek(
stream, liMove, STREAM_SEEK_CUR,
NULL);
477 break;
478 }
479 }
480 break;
481 }
482 default: {
483 TRACE_(dmfile)(
": unknown chunk (irrelevant & skipping)\n");
485 IStream_Seek(
stream, liMove, STREAM_SEEK_CUR,
NULL);
486 break;
487 }
488 }
489 TRACE_(dmfile)(
": StreamCount = %d < StreamSize = %d\n", StreamCount, StreamSize);
490 } while (StreamCount < StreamSize);
491
492 TRACE_(dmfile)(
": reading finished\n");
493
494
495
499 struct list *listEntry;
500
501 TRACE(
"*** IDirectMusicCollection (%p) ***\n", &
This->IDirectMusicCollection_iface);
503
504 TRACE(
" - Collection header:\n");
505 TRACE(
" - cInstruments: %d\n",
This->pHeader->cInstruments);
506 TRACE(
" - Instruments:\n");
507
512 }
513 }
514
516}
static void list_add_tail(struct list_entry *head, struct list_entry *entry)
static IDirectMusicCollectionImpl * impl_from_IPersistStream(IPersistStream *iface)
#define MultiByteToWideChar
struct _POOLTABLE POOLTABLE
int even_or_odd(DWORD number)
DWORD MIDILOCALE2Patch(const MIDILOCALE *pLocale)
HRESULT DMUSIC_CreateDirectMusicInstrumentImpl(LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter) DECLSPEC_HIDDEN
#define DMUS_FOURCC_INFO_LIST
GLdouble GLdouble GLdouble r
#define FOURCC(a, b, c, d)
#define mmioFOURCC(c0, c1, c2, c3)
static const char * debugstr_fourcc(DWORD fourcc)
static const WCHAR szName[]
#define IsEqualGUID(rguid1, rguid2)
LARGE_INTEGER liInstrumentPosition