ReactOS 0.4.17-dev-934-g091855f
style.c File Reference
#include "dmstyle_private.h"
#include "dmobject.h"
Include dependency graph for style.c:

Go to the source code of this file.

Classes

struct  style_band
 
struct  style_part_ref
 
struct  style_part
 
struct  style_pattern
 
struct  style
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (dmstyle)
 
 WINE_DECLARE_DEBUG_CHANNEL (dmfile)
 
static void style_part_destroy (struct style_part *part)
 
static void style_pattern_destroy (struct style_pattern *pattern)
 
static struct style * impl_from_IDirectMusicStyle8 (IDirectMusicStyle8 *iface)
 
static HRESULT WINAPI style_QueryInterface (IDirectMusicStyle8 *iface, REFIID riid, void **ret_iface)
 
static ULONG WINAPI style_AddRef (IDirectMusicStyle8 *iface)
 
static ULONG WINAPI style_Release (IDirectMusicStyle8 *iface)
 
static HRESULT WINAPI style_GetBand (IDirectMusicStyle8 *iface, WCHAR *name, IDirectMusicBand **band)
 
static HRESULT WINAPI style_EnumBand (IDirectMusicStyle8 *iface, DWORD dwIndex, WCHAR *pwszName)
 
static HRESULT WINAPI style_GetDefaultBand (IDirectMusicStyle8 *iface, IDirectMusicBand **band)
 
static HRESULT WINAPI style_EnumMotif (IDirectMusicStyle8 *iface, DWORD index, WCHAR *name)
 
static HRESULT WINAPI style_GetMotif (IDirectMusicStyle8 *iface, WCHAR *pwszName, IDirectMusicSegment **ppSegment)
 
static HRESULT WINAPI style_GetDefaultChordMap (IDirectMusicStyle8 *iface, IDirectMusicChordMap **ppChordMap)
 
static HRESULT WINAPI style_EnumChordMap (IDirectMusicStyle8 *iface, DWORD dwIndex, WCHAR *pwszName)
 
static HRESULT WINAPI style_GetChordMap (IDirectMusicStyle8 *iface, WCHAR *pwszName, IDirectMusicChordMap **ppChordMap)
 
static HRESULT WINAPI style_GetTimeSignature (IDirectMusicStyle8 *iface, DMUS_TIMESIGNATURE *pTimeSig)
 
static HRESULT WINAPI style_GetEmbellishmentLength (IDirectMusicStyle8 *iface, DWORD dwType, DWORD dwLevel, DWORD *pdwMin, DWORD *pdwMax)
 
static HRESULT WINAPI style_GetTempo (IDirectMusicStyle8 *iface, double *pTempo)
 
static HRESULT WINAPI style_EnumPattern (IDirectMusicStyle8 *iface, DWORD dwIndex, DWORD dwPatternType, WCHAR *pwszName)
 
static HRESULT WINAPI style_IDirectMusicObject_ParseDescriptor (IDirectMusicObject *iface, IStream *stream, DMUS_OBJECTDESC *desc)
 
static struct style * impl_from_IPersistStream (IPersistStream *iface)
 
static HRESULT load_band (IStream *pClonedStream, IDirectMusicBand **ppBand)
 
static HRESULT parse_pref_list (struct style *This, IStream *stream, struct chunk_entry *parent, struct list *list)
 
static HRESULT parse_part_list (struct style *This, IStream *stream, struct chunk_entry *parent)
 
static HRESULT parse_pttn_list (struct style *This, IStream *stream, struct chunk_entry *parent)
 
static HRESULT parse_style_form (struct style *This, DMUS_PRIVATE_CHUNK *pChunk, IStream *pStm)
 
static HRESULT WINAPI IPersistStreamImpl_Load (IPersistStream *iface, IStream *pStm)
 
HRESULT create_dmstyle (REFIID lpcGUID, void **ppobj)
 

Variables

static const IDirectMusicStyle8Vtbl dmstyle8_vtbl
 
static const IDirectMusicObjectVtbl dmobject_vtbl
 
static const IPersistStreamVtbl persiststream_vtbl
 

Function Documentation

◆ create_dmstyle()

HRESULT create_dmstyle ( REFIID  lpcGUID,
void **  ppobj 
)

Definition at line 814 of file style.c.

815{
816 struct style *obj;
817 HRESULT hr;
818
819 *ppobj = NULL;
820 if (!(obj = calloc(1, sizeof(*obj)))) return E_OUTOFMEMORY;
821 obj->IDirectMusicStyle8_iface.lpVtbl = &dmstyle8_vtbl;
822 obj->ref = 1;
823 dmobject_init(&obj->dmobj, &CLSID_DirectMusicStyle, (IUnknown *)&obj->IDirectMusicStyle8_iface);
824 obj->dmobj.IDirectMusicObject_iface.lpVtbl = &dmobject_vtbl;
825 obj->dmobj.IPersistStream_iface.lpVtbl = &persiststream_vtbl;
826 list_init(&obj->parts);
827 list_init(&obj->bands);
828 list_init(&obj->patterns);
829
830 hr = IDirectMusicStyle8_QueryInterface(&obj->IDirectMusicStyle8_iface, lpcGUID, ppobj);
831 IDirectMusicStyle8_Release(&obj->IDirectMusicStyle8_iface);
832
833 return hr;
834}
static void list_init(struct list_entry *head)
Definition: list.h:51
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
HRESULT hr
Definition: delayimp.cpp:582
#define NULL
Definition: types.h:112
static const IDirectMusicObjectVtbl dmobject_vtbl
Definition: style.c:382
static const IPersistStreamVtbl persiststream_vtbl
Definition: style.c:803
static const IDirectMusicStyle8Vtbl dmstyle8_vtbl
Definition: style.c:333
void dmobject_init(struct dmobject *dmobj, const GUID *class, IUnknown *outer_unk)
Definition: dmobject.c:749
#define IDirectMusicStyle8_QueryInterface(p, a, b)
Definition: dmusici.h:1555
#define IDirectMusicStyle8_Release(p)
Definition: dmusici.h:1557
#define calloc
Definition: rosglue.h:14
Definition: style.c:91

◆ impl_from_IDirectMusicStyle8()

static struct style * impl_from_IDirectMusicStyle8 ( IDirectMusicStyle8 *  iface)
inlinestatic

◆ impl_from_IPersistStream()

static struct style * impl_from_IPersistStream ( IPersistStream *  iface)
inlinestatic

Definition at line 391 of file style.c.

392{
393 return CONTAINING_RECORD(iface, struct style, dmobj.IPersistStream_iface);
394}

Referenced by IPersistStreamImpl_Load().

◆ IPersistStreamImpl_Load()

static HRESULT WINAPI IPersistStreamImpl_Load ( IPersistStream *  iface,
IStream *  pStm 
)
static

Definition at line 760 of file style.c.

761{
762 struct style *This = impl_from_IPersistStream(iface);
763 DMUS_PRIVATE_CHUNK Chunk;
764 LARGE_INTEGER liMove; /* used when skipping chunks */
765 HRESULT hr;
766
767 FIXME("(%p, %p): Loading\n", This, pStm);
768
769 IStream_Read (pStm, &Chunk, sizeof(FOURCC)+sizeof(DWORD), NULL);
770 TRACE_(dmfile)(": %s chunk (size = %ld)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize);
771 switch (Chunk.fccID) {
772 case FOURCC_RIFF: {
773 IStream_Read (pStm, &Chunk.fccID, sizeof(FOURCC), NULL);
774 TRACE_(dmfile)(": %s chunk (size = %ld)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize);
775 switch (Chunk.fccID) {
777 TRACE_(dmfile)(": Style form\n");
778 hr = parse_style_form(This, &Chunk, pStm);
779 if (FAILED(hr)) return hr;
780 break;
781 }
782 default: {
783 TRACE_(dmfile)(": unexpected chunk; loading failed)\n");
784 liMove.QuadPart = Chunk.dwSize;
785 IStream_Seek (pStm, liMove, STREAM_SEEK_CUR, NULL); /* skip the rest of the chunk */
786 return E_FAIL;
787 }
788 }
789 TRACE_(dmfile)(": reading finished\n");
790 break;
791 }
792 default: {
793 TRACE_(dmfile)(": unexpected chunk; loading failed)\n");
794 liMove.QuadPart = Chunk.dwSize;
795 IStream_Seek (pStm, liMove, STREAM_SEEK_CUR, NULL); /* skip the rest of the chunk */
796 return E_FAIL;
797 }
798 }
799
800 return S_OK;
801}
#define FIXME(fmt,...)
Definition: precomp.h:53
#define E_FAIL
Definition: ddrawi.h:102
static struct style * impl_from_IPersistStream(IPersistStream *iface)
Definition: style.c:391
static HRESULT parse_style_form(struct style *This, DMUS_PRIVATE_CHUNK *pChunk, IStream *pStm)
Definition: style.c:605
#define TRACE_(x)
Definition: compat.h:76
DWORD FOURCC
Definition: dmdls.h:25
#define DMUS_FOURCC_STYLE_FORM
Definition: dmusicf.h:118
unsigned long DWORD
Definition: ntddk_ex.h:95
#define S_OK
Definition: intsafe.h:52
#define FAILED(hr)
Definition: intsafe.h:51
#define FOURCC_RIFF
Definition: mmsystem.h:564
static __inline const char * debugstr_fourcc(unsigned int cc)
Definition: debug.h:397
LONGLONG QuadPart
Definition: typedefs.h:114

◆ load_band()

static HRESULT load_band ( IStream *  pClonedStream,
IDirectMusicBand **  ppBand 
)
static

Definition at line 396 of file style.c.

397{
398 HRESULT hr = E_FAIL;
399 IPersistStream* pPersistStream = NULL;
400
401 hr = CoCreateInstance (&CLSID_DirectMusicBand, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusicBand, (LPVOID*) ppBand);
402 if (FAILED(hr)) {
403 ERR(": could not create object\n");
404 return hr;
405 }
406 /* acquire PersistStream interface */
407 hr = IDirectMusicBand_QueryInterface (*ppBand, &IID_IPersistStream, (LPVOID*) &pPersistStream);
408 if (FAILED(hr)) {
409 ERR(": could not acquire IPersistStream\n");
410 return hr;
411 }
412 /* load */
413 hr = IPersistStream_Load (pPersistStream, pClonedStream);
414 if (FAILED(hr)) {
415 ERR(": failed to load object\n");
416 return hr;
417 }
418
419 /* release all loading-related stuff */
420 IPersistStream_Release (pPersistStream);
421
422 return S_OK;
423}
#define ERR(fmt,...)
Definition: precomp.h:57
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, IUnknown *outer, DWORD cls_context, REFIID riid, void **obj)
Definition: combase.c:1685
#define IDirectMusicBand_QueryInterface(p, a, b)
Definition: dmusici.h:813
const GUID IID_IPersistStream
Definition: proxy.cpp:13

Referenced by parse_style_form().

◆ parse_part_list()

static HRESULT parse_part_list ( struct style *  This,
IStream *  stream,
struct chunk_entry *  parent 
)
static

Definition at line 466 of file style.c.

467{
468 struct chunk_entry chunk = {.parent = parent};
469 struct style_part *part;
471 HRESULT hr;
472
475 return hr;
476
477 if (!(part = calloc(1, sizeof(*part)))) return E_OUTOFMEMORY;
478 part->desc = desc;
479
480 while ((hr = stream_next_chunk(stream, &chunk)) == S_OK)
481 {
482 switch (MAKE_IDTYPE(chunk.id, chunk.type))
483 {
485 hr = stream_chunk_get_data(stream, &chunk, &part->header, sizeof(part->header));
486 break;
487
489 /* already parsed by dmobj_parsedescriptor */
490 break;
491
493 hr = stream_chunk_get_array(stream, &chunk, (void **)&part->notes,
494 &part->notes_count, sizeof(*part->notes));
495 break;
496
498 hr = stream_chunk_get_array(stream, &chunk, (void **)&part->curves,
499 &part->curves_count, sizeof(*part->curves));
500 break;
501
503 hr = stream_chunk_get_array(stream, &chunk, (void **)&part->markers,
504 &part->markers_count, sizeof(*part->markers));
505 break;
506
508 hr = stream_chunk_get_array(stream, &chunk, (void **)&part->resolutions,
509 &part->resolutions_count, sizeof(*part->resolutions));
510 break;
511
514 &part->anticipations_count, sizeof(*part->anticipations));
515 break;
516
517 default:
518 FIXME("Ignoring chunk %s %s\n", debugstr_fourcc(chunk.id), debugstr_fourcc(chunk.type));
519 break;
520 }
521
522 if (FAILED(hr)) break;
523 }
524
525 if (FAILED(hr)) style_part_destroy(part);
526 else list_add_tail(&This->parts, &part->entry);
527
528 return hr;
529}
static void list_add_tail(struct list_entry *head, struct list_entry *entry)
Definition: list.h:83
static void style_part_destroy(struct style_part *part)
Definition: style.c:55
HRESULT stream_chunk_get_data(IStream *stream, const struct chunk_entry *chunk, void *data, ULONG size)
Definition: dmobject.c:417
HRESULT stream_next_chunk(IStream *stream, struct chunk_entry *chunk)
Definition: dmobject.c:360
HRESULT dmobj_parsedescriptor(IStream *stream, const struct chunk_entry *riff, DMUS_OBJECTDESC *desc, DWORD supported)
Definition: dmobject.c:591
HRESULT stream_chunk_get_array(IStream *stream, const struct chunk_entry *chunk, void **array, unsigned int *count, DWORD elem_size)
Definition: dmobject.c:378
static HRESULT stream_reset_chunk_data(IStream *stream, const struct chunk_entry *chunk)
Definition: dmobject.h:50
#define MAKE_IDTYPE(id, type)
Definition: dmobject.h:33
#define DMUS_FOURCC_ANTICIPATION_CHUNK
Definition: dmusicf.h:126
#define DMUS_FOURCC_PART_CHUNK
Definition: dmusicf.h:121
#define DMUS_FOURCC_CURVE_CHUNK
Definition: dmusicf.h:123
#define DMUS_FOURCC_UNFO_LIST
Definition: dmusicf.h:44
#define DMUS_FOURCC_RESOLUTION_CHUNK
Definition: dmusicf.h:125
#define DMUS_FOURCC_NOTE_CHUNK
Definition: dmusicf.h:122
#define DMUS_FOURCC_MARKER_CHUNK
Definition: dmusicf.h:124
#define DMUS_OBJ_NAME
Definition: dmusici.h:267
r parent
Definition: btrfs.c:3010
#define FOURCC_LIST
Definition: mmsystem.h:565
D3D11_SHADER_VARIABLE_DESC desc
Definition: reflection.c:1683
Definition: dmobject.h:26
Definition: parse.h:23
DMUS_IO_STYLERESOLUTION * resolutions
Definition: style.c:49
DMUS_IO_STYLEMARKER * markers
Definition: style.c:47
struct list entry
Definition: style.c:40
UINT anticipations_count
Definition: style.c:52
UINT notes_count
Definition: style.c:44
DMUS_IO_STYLE_ANTICIPATION * anticipations
Definition: style.c:51
DMUS_IO_STYLECURVE * curves
Definition: style.c:45
UINT curves_count
Definition: style.c:46
UINT resolutions_count
Definition: style.c:50
DMUS_IO_STYLENOTE * notes
Definition: style.c:43
DMUS_IO_STYLEPART header
Definition: style.c:42
UINT markers_count
Definition: style.c:48
DMUS_OBJECTDESC desc
Definition: style.c:41

Referenced by parse_style_form().

◆ parse_pref_list()

static HRESULT parse_pref_list ( struct style *  This,
IStream *  stream,
struct chunk_entry *  parent,
struct list *  list 
)
static

Definition at line 425 of file style.c.

427{
428 struct chunk_entry chunk = {.parent = parent};
429 struct style_part_ref *part_ref;
431 HRESULT hr;
432
435 return hr;
436
437 if (!(part_ref = calloc(1, sizeof(*part_ref)))) return E_OUTOFMEMORY;
438 part_ref->desc = desc;
439
440 while ((hr = stream_next_chunk(stream, &chunk)) == S_OK)
441 {
442 switch (MAKE_IDTYPE(chunk.id, chunk.type))
443 {
445 hr = stream_chunk_get_data(stream, &chunk, &part_ref->header, sizeof(part_ref->header));
446 break;
447
449 /* already parsed by dmobj_parsedescriptor */
450 break;
451
452 default:
453 FIXME("Ignoring chunk %s %s\n", debugstr_fourcc(chunk.id), debugstr_fourcc(chunk.type));
454 break;
455 }
456
457 if (FAILED(hr)) break;
458 }
459
460 if (FAILED(hr)) free(part_ref);
461 else list_add_tail(list, &part_ref->entry);
462
463 return S_OK;
464}
Definition: list.h:39
#define free
Definition: debug_ros.c:5
#define DMUS_FOURCC_PARTREF_CHUNK
Definition: dmusicf.h:131
DMUS_OBJECTDESC desc
Definition: style.c:34
struct list entry
Definition: style.c:33
DMUS_IO_PARTREF header
Definition: style.c:35

Referenced by parse_pttn_list().

◆ parse_pttn_list()

static HRESULT parse_pttn_list ( struct style *  This,
IStream *  stream,
struct chunk_entry *  parent 
)
static

Definition at line 531 of file style.c.

532{
533 struct chunk_entry chunk = {.parent = parent};
534 struct style_pattern *pattern;
536 HRESULT hr;
537
540 return hr;
541
542 if (!(pattern = calloc(1, sizeof(*pattern)))) return E_OUTOFMEMORY;
543 list_init(&pattern->part_refs);
544 pattern->desc = desc;
545
546 while ((hr = stream_next_chunk(stream, &chunk)) == S_OK)
547 {
548 switch (MAKE_IDTYPE(chunk.id, chunk.type))
549 {
551 /* already parsed by dmobj_parsedescriptor */
552 break;
553
555 hr = stream_chunk_get_data(stream, &chunk, &pattern->pattern, sizeof(pattern->pattern));
556 break;
557
559 if (chunk.size > sizeof(pattern->dwRhythm)) FIXME("Unsupported rythm chunk size\n");
560 hr = stream_read(stream, &pattern->dwRhythm, sizeof(pattern->dwRhythm));
561 break;
562
564 hr = stream_chunk_get_data(stream, &chunk, &pattern->settings, sizeof(pattern->settings));
565 break;
566
568 {
569 IPersistStream *persist;
570
571 if (pattern->band) IDirectMusicBand_Release(pattern->band);
572
573 if (FAILED(hr = CoCreateInstance(&CLSID_DirectMusicBand, NULL, CLSCTX_INPROC_SERVER,
574 &IID_IDirectMusicBand, (void **)&pattern->band)))
575 break;
576
577 if (SUCCEEDED(hr = IDirectMusicBand_QueryInterface(pattern->band, &IID_IPersistStream, (void **)&persist)))
578 {
580 hr = IPersistStream_Load(persist, stream);
581 IPersistStream_Release(persist);
582 }
583
584 break;
585 }
586
589 break;
590
591 default:
592 FIXME("Ignoring chunk %s %s\n", debugstr_fourcc(chunk.id), debugstr_fourcc(chunk.type));
593 break;
594 }
595
596 if (FAILED(hr)) break;
597 }
598
600 else list_add_tail(&This->patterns, &pattern->entry);
601
602 return hr;
603}
static HRESULT parse_pref_list(struct style *This, IStream *stream, struct chunk_entry *parent, struct list *list)
Definition: style.c:425
static void style_pattern_destroy(struct style_pattern *pattern)
Definition: style.c:76
static HRESULT stream_reset_chunk_start(IStream *stream, const struct chunk_entry *chunk)
Definition: dmobject.h:61
#define DMUS_FOURCC_BAND_FORM
Definition: dmusicf.h:63
#define DMUS_FOURCC_RHYTHM_CHUNK
Definition: dmusicf.h:129
#define DMUS_FOURCC_PARTREF_LIST
Definition: dmusicf.h:130
#define DMUS_FOURCC_PATTERN_CHUNK
Definition: dmusicf.h:128
#define DMUS_FOURCC_MOTIFSETTINGS_CHUNK
Definition: dmusicf.h:133
#define IDirectMusicBand_Release(p)
Definition: dmusici.h:815
GLubyte * pattern
Definition: glext.h:7787
#define SUCCEEDED(hr)
Definition: intsafe.h:50
static int stream_read
Definition: htmldoc.c:205
uint16_t size
Definition: btrfs_drv.h:563
struct list part_refs
Definition: style.c:73

Referenced by parse_style_form().

◆ parse_style_form()

static HRESULT parse_style_form ( struct style *  This,
DMUS_PRIVATE_CHUNK *  pChunk,
IStream *  pStm 
)
static

TODO dump DMUS_IO_TIMESIG style.timeSig

should be embedded Bands into style

now safely move the cursor

Definition at line 605 of file style.c.

606{
607 HRESULT hr = E_FAIL;
608 DMUS_PRIVATE_CHUNK Chunk;
609 DWORD StreamSize, StreamCount, ListSize[3], ListCount[3];
610 LARGE_INTEGER liMove; /* used when skipping chunks */
611
612 IDirectMusicBand* pBand = NULL;
613
614 if (pChunk->fccID != DMUS_FOURCC_STYLE_FORM) {
615 ERR_(dmfile)(": %s chunk should be a STYLE form\n", debugstr_fourcc (pChunk->fccID));
616 return E_FAIL;
617 }
618
619 StreamSize = pChunk->dwSize - sizeof(FOURCC);
620 StreamCount = 0;
621
622 do {
623 IStream_Read (pStm, &Chunk, sizeof(FOURCC)+sizeof(DWORD), NULL);
624 StreamCount += sizeof(FOURCC) + sizeof(DWORD) + Chunk.dwSize;
625 TRACE_(dmfile)(": %s chunk (size = %ld)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize);
626
627 hr = IDirectMusicUtils_IPersistStream_ParseDescGeneric(&Chunk, pStm, &This->dmobj.desc);
628 if (FAILED(hr)) return hr;
629
630 if (hr == S_FALSE) {
631 switch (Chunk.fccID) {
633 TRACE_(dmfile)(": Style chunk\n");
634 IStream_Read (pStm, &This->style, sizeof(DMUS_IO_STYLE), NULL);
636 TRACE_(dmfile)(" - dblTempo: %g\n", This->style.dblTempo);
637 break;
638 }
639 case FOURCC_RIFF: {
643 IStream_Read (pStm, &Chunk.fccID, sizeof(FOURCC), NULL);
644 TRACE_(dmfile)(": RIFF chunk of type %s", debugstr_fourcc(Chunk.fccID));
645 ListSize[0] = Chunk.dwSize - sizeof(FOURCC);
646 ListCount[0] = 0;
647 switch (Chunk.fccID) {
648 case DMUS_FOURCC_BAND_FORM: {
649 ULARGE_INTEGER save;
650 struct style_band *pNewBand;
651
652 TRACE_(dmfile)(": BAND RIFF\n");
653
654 /* Can be application provided IStream without Clone method */
655 liMove.QuadPart = 0;
656 liMove.QuadPart -= sizeof(FOURCC) + (sizeof(FOURCC)+sizeof(DWORD));
657 IStream_Seek(pStm, liMove, STREAM_SEEK_CUR, &save);
658
659 hr = load_band(pStm, &pBand);
660 if (FAILED(hr)) {
661 ERR(": could not load track\n");
662 return hr;
663 }
664
665 if (!(pNewBand = calloc(1, sizeof(*pNewBand)))) return E_OUTOFMEMORY;
666 pNewBand->pBand = pBand;
668 list_add_tail(&This->bands, &pNewBand->entry);
669
670 IDirectMusicTrack_Release(pBand); pBand = NULL; /* now we can release it as it's inserted */
671
673 liMove.QuadPart = save.QuadPart - liMove.QuadPart + ListSize[0];
674 IStream_Seek(pStm, liMove, STREAM_SEEK_SET, NULL);
675
676 break;
677 }
678 default: {
679 TRACE_(dmfile)(": unknown chunk (irrelevant & skipping)\n");
680 liMove.QuadPart = ListSize[0];
681 IStream_Seek (pStm, liMove, STREAM_SEEK_CUR, NULL);
682 break;
683 }
684 }
685 break;
686 }
687 case FOURCC_LIST: {
688 IStream_Read (pStm, &Chunk.fccID, sizeof(FOURCC), NULL);
689 TRACE_(dmfile)(": LIST chunk of type %s", debugstr_fourcc(Chunk.fccID));
690 ListSize[0] = Chunk.dwSize - sizeof(FOURCC);
691 ListCount[0] = 0;
692 switch (Chunk.fccID) {
693 case DMUS_FOURCC_UNFO_LIST: {
694 TRACE_(dmfile)(": UNFO list\n");
695 do {
696 IStream_Read (pStm, &Chunk, sizeof(FOURCC)+sizeof(DWORD), NULL);
697 ListCount[0] += sizeof(FOURCC) + sizeof(DWORD) + Chunk.dwSize;
698 TRACE_(dmfile)(": %s chunk (size = %ld)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize);
699
700 hr = IDirectMusicUtils_IPersistStream_ParseUNFOGeneric(&Chunk, pStm, &This->dmobj.desc);
701 if (FAILED(hr)) return hr;
702
703 if (hr == S_FALSE) {
704 switch (Chunk.fccID) {
705 default: {
706 TRACE_(dmfile)(": unknown chunk (irrelevant & skipping)\n");
707 liMove.QuadPart = Chunk.dwSize;
708 IStream_Seek (pStm, liMove, STREAM_SEEK_CUR, NULL);
709 break;
710 }
711 }
712 }
713 TRACE_(dmfile)(": ListCount[0] = %ld < ListSize[0] = %ld\n", ListCount[0], ListSize[0]);
714 } while (ListCount[0] < ListSize[0]);
715 break;
716 }
718 static const LARGE_INTEGER zero = {0};
719 struct chunk_entry chunk = {FOURCC_LIST, .size = Chunk.dwSize, .type = Chunk.fccID};
720 TRACE_(dmfile)(": PART list\n");
721 IStream_Seek(pStm, zero, STREAM_SEEK_CUR, &chunk.offset);
722 chunk.offset.QuadPart -= 12;
723 hr = parse_part_list(This, pStm, &chunk);
724 if (FAILED(hr)) return hr;
725 break;
726 }
728 static const LARGE_INTEGER zero = {0};
729 struct chunk_entry chunk = {FOURCC_LIST, .size = Chunk.dwSize, .type = Chunk.fccID};
730 TRACE_(dmfile)(": PATTERN list\n");
731 IStream_Seek(pStm, zero, STREAM_SEEK_CUR, &chunk.offset);
732 chunk.offset.QuadPart -= 12;
733 hr = parse_pttn_list(This, pStm, &chunk);
734 if (FAILED(hr)) return hr;
735 break;
736 }
737 default: {
738 TRACE_(dmfile)(": unknown (skipping)\n");
739 liMove.QuadPart = Chunk.dwSize - sizeof(FOURCC);
740 IStream_Seek (pStm, liMove, STREAM_SEEK_CUR, NULL);
741 break;
742 }
743 }
744 break;
745 }
746 default: {
747 TRACE_(dmfile)(": unknown chunk (irrelevant & skipping)\n");
748 liMove.QuadPart = Chunk.dwSize;
749 IStream_Seek (pStm, liMove, STREAM_SEEK_CUR, NULL);
750 break;
751 }
752 }
753 }
754 TRACE_(dmfile)(": StreamCount[0] = %ld < StreamSize[0] = %ld\n", StreamCount, StreamSize);
755 } while (StreamCount < StreamSize);
756
757 return S_OK;
758}
static HRESULT parse_part_list(struct style *This, IStream *stream, struct chunk_entry *parent)
Definition: style.c:466
static HRESULT load_band(IStream *pClonedStream, IDirectMusicBand **ppBand)
Definition: style.c:396
static HRESULT parse_pttn_list(struct style *This, IStream *stream, struct chunk_entry *parent)
Definition: style.c:531
#define IDirectMusicTrack_Release(p)
Definition: dmplugin.h:226
#define DMUS_FOURCC_STYLE_CHUNK
Definition: dmusicf.h:119
#define DMUS_FOURCC_PATTERN_LIST
Definition: dmusicf.h:127
#define DMUS_FOURCC_PART_LIST
Definition: dmusicf.h:120
#define IDirectMusicBand_AddRef(p)
Definition: dmusici.h:814
HRESULT IDirectMusicUtils_IPersistStream_ParseUNFOGeneric(DMUS_PRIVATE_CHUNK *pChunk, IStream *pStm, LPDMUS_OBJECTDESC pDesc)
Definition: dmutils.c:92
HRESULT IDirectMusicUtils_IPersistStream_ParseDescGeneric(DMUS_PRIVATE_CHUNK *pChunk, IStream *pStm, LPDMUS_OBJECTDESC pDesc)
Definition: dmutils.c:45
#define FOURCC(a, b, c, d)
Definition: memtrack.h:4
#define DWORD
Definition: nt_native.h:44
#define ERR_(ch,...)
Definition: debug.h:156
int zero
Definition: sehframes.cpp:29
ULONGLONG QuadPart
Definition: ms-dtyp.idl:185
uint64_t offset
Definition: btrfs_drv.h:564
IDirectMusicBand * pBand
Definition: style.c:28
struct list entry
Definition: style.c:27
#define S_FALSE
Definition: winerror.h:3451

Referenced by IPersistStreamImpl_Load().

◆ style_AddRef()

static ULONG WINAPI style_AddRef ( IDirectMusicStyle8 *  iface)
static

Definition at line 131 of file style.c.

132{
133 struct style *This = impl_from_IDirectMusicStyle8(iface);
135
136 TRACE("(%p) ref=%ld\n", This, ref);
137
138 return ref;
139}
#define InterlockedIncrement
Definition: armddk.h:53
static struct style * impl_from_IDirectMusicStyle8(IDirectMusicStyle8 *iface)
Definition: style.c:101
long LONG
Definition: pedump.c:60
#define TRACE(s)
Definition: solgame.cpp:4
Definition: send.c:48
LONG ref
Definition: style.c:94

◆ style_EnumBand()

static HRESULT WINAPI style_EnumBand ( IDirectMusicStyle8 *  iface,
DWORD  dwIndex,
WCHAR *  pwszName 
)
static

Definition at line 214 of file style.c.

216{
217 struct style *This = impl_from_IDirectMusicStyle8(iface);
218 FIXME("(%p, %ld, %p): stub\n", This, dwIndex, pwszName);
219 return S_OK;
220}

◆ style_EnumChordMap()

static HRESULT WINAPI style_EnumChordMap ( IDirectMusicStyle8 *  iface,
DWORD  dwIndex,
WCHAR *  pwszName 
)
static

Definition at line 286 of file style.c.

288{
289 struct style *This = impl_from_IDirectMusicStyle8(iface);
290 FIXME("(%p, %ld, %p): stub\n", This, dwIndex, pwszName);
291 return S_OK;
292}

◆ style_EnumMotif()

static HRESULT WINAPI style_EnumMotif ( IDirectMusicStyle8 *  iface,
DWORD  index,
WCHAR *  name 
)
static

Definition at line 236 of file style.c.

238{
239 struct style *This = impl_from_IDirectMusicStyle8(iface);
240 const struct style_pattern *pattern = NULL;
241 const struct list *cursor;
242 unsigned int i = 0;
243
244 TRACE("(%p, %lu, %p)\n", This, index, name);
245
246 if (!name)
247 return E_POINTER;
248
249 /* index is zero based */
250 LIST_FOR_EACH(cursor, &This->patterns)
251 {
252 if (i == index) {
254 break;
255 }
256 i++;
257 }
258 if (!pattern)
259 return S_FALSE;
260
261 if (pattern->desc.dwValidData & DMUS_OBJ_NAME)
262 lstrcpynW(name, pattern->desc.wszName, DMUS_MAX_NAME);
263 else
264 name[0] = 0;
265
266 TRACE("returning name: %s\n", debugstr_w(name));
267 return S_OK;
268}
#define lstrcpynW
Definition: compat.h:738
#define DMUS_MAX_NAME
Definition: dmusici.h:245
GLuint index
Definition: glext.h:6031
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
const char cursor[]
Definition: icontest.c:13
uint32_t entry
Definition: isohybrid.c:63
#define debugstr_w
Definition: kernel32.h:32
#define LIST_FOR_EACH(cursor, list)
Definition: list.h:226
Definition: name.c:39
#define LIST_ENTRY(type)
Definition: queue.h:175
#define E_POINTER
Definition: winerror.h:3480

◆ style_EnumPattern()

static HRESULT WINAPI style_EnumPattern ( IDirectMusicStyle8 *  iface,
DWORD  dwIndex,
DWORD  dwPatternType,
WCHAR *  pwszName 
)
static

Definition at line 325 of file style.c.

327{
328 struct style *This = impl_from_IDirectMusicStyle8(iface);
329 FIXME("(%p, %ld, %ld, %p): stub\n", This, dwIndex, dwPatternType, pwszName);
330 return S_OK;
331}

◆ style_GetBand()

static HRESULT WINAPI style_GetBand ( IDirectMusicStyle8 *  iface,
WCHAR *  name,
IDirectMusicBand **  band 
)
static

Definition at line 179 of file style.c.

181{
182 struct style *This = impl_from_IDirectMusicStyle8(iface);
183 struct style_band *sband;
184 HRESULT hr;
185
186 TRACE("(%p, %s, %p)\n", This, debugstr_w(name), band);
187
188 if (!name)
189 return E_POINTER;
190
191 LIST_FOR_EACH_ENTRY(sband, &This->bands, struct style_band, entry) {
192 IDirectMusicObject *obj;
193
194 hr = IDirectMusicBand_QueryInterface(sband->pBand, &IID_IDirectMusicObject, (void**)&obj);
195 if (SUCCEEDED(hr)) {
197
199 if (desc.dwValidData & DMUS_OBJ_NAME && !lstrcmpW(name, desc.wszName)) {
202 *band = sband->pBand;
203 return S_OK;
204 }
205 }
206
208 }
209 }
210
211 return S_FALSE;
212}
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
Definition: locale.c:4152
#define IDirectMusicObject_Release(p)
Definition: dmusici.h:844
#define IDirectMusicObject_GetDescriptor(p, a)
Definition: dmusici.h:846
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:236
Definition: band.c:76

◆ style_GetChordMap()

static HRESULT WINAPI style_GetChordMap ( IDirectMusicStyle8 *  iface,
WCHAR *  pwszName,
IDirectMusicChordMap **  ppChordMap 
)
static

Definition at line 294 of file style.c.

296{
297 struct style *This = impl_from_IDirectMusicStyle8(iface);
298 FIXME("(%p, %p, %p): stub\n", This, pwszName, ppChordMap);
299 return S_OK;
300}

◆ style_GetDefaultBand()

static HRESULT WINAPI style_GetDefaultBand ( IDirectMusicStyle8 *  iface,
IDirectMusicBand **  band 
)
static

Definition at line 222 of file style.c.

224{
225 struct style *This = impl_from_IDirectMusicStyle8(iface);
226 FIXME("(%p, %p): stub\n", This, band);
227
228 if (!band)
229 return E_POINTER;
230
231 *band = NULL;
232
233 return S_FALSE;
234}

◆ style_GetDefaultChordMap()

static HRESULT WINAPI style_GetDefaultChordMap ( IDirectMusicStyle8 *  iface,
IDirectMusicChordMap **  ppChordMap 
)
static

Definition at line 278 of file style.c.

280{
281 struct style *This = impl_from_IDirectMusicStyle8(iface);
282 FIXME("(%p, %p): stub\n", This, ppChordMap);
283 return S_OK;
284}

◆ style_GetEmbellishmentLength()

static HRESULT WINAPI style_GetEmbellishmentLength ( IDirectMusicStyle8 *  iface,
DWORD  dwType,
DWORD  dwLevel,
DWORD *  pdwMin,
DWORD *  pdwMax 
)
static

Definition at line 310 of file style.c.

312{
313 struct style *This = impl_from_IDirectMusicStyle8(iface);
314 FIXME("(%p, %ld, %ld, %p, %p): stub\n", This, dwType, dwLevel, pdwMin, pdwMax);
315 return S_OK;
316}

◆ style_GetMotif()

static HRESULT WINAPI style_GetMotif ( IDirectMusicStyle8 *  iface,
WCHAR *  pwszName,
IDirectMusicSegment **  ppSegment 
)
static

Definition at line 270 of file style.c.

272{
273 struct style *This = impl_from_IDirectMusicStyle8(iface);
274 FIXME("(%p, %s, %p): stub\n", This, debugstr_w(pwszName), ppSegment);
275 return S_FALSE;
276}

◆ style_GetTempo()

static HRESULT WINAPI style_GetTempo ( IDirectMusicStyle8 *  iface,
double *  pTempo 
)
static

Definition at line 318 of file style.c.

319{
320 struct style *This = impl_from_IDirectMusicStyle8(iface);
321 FIXME("(%p, %p): stub\n", This, pTempo);
322 return S_OK;
323}

◆ style_GetTimeSignature()

static HRESULT WINAPI style_GetTimeSignature ( IDirectMusicStyle8 *  iface,
DMUS_TIMESIGNATURE *  pTimeSig 
)
static

Definition at line 302 of file style.c.

304{
305 struct style *This = impl_from_IDirectMusicStyle8(iface);
306 FIXME("(%p, %p): stub\n", This, pTimeSig);
307 return S_OK;
308}

◆ style_IDirectMusicObject_ParseDescriptor()

static HRESULT WINAPI style_IDirectMusicObject_ParseDescriptor ( IDirectMusicObject *  iface,
IStream *  stream,
DMUS_OBJECTDESC *  desc 
)
static

Definition at line 351 of file style.c.

353{
354 struct chunk_entry riff = {0};
355 HRESULT hr;
356
357 TRACE("(%p, %p, %p)\n", iface, stream, desc);
358
359 if (!stream || !desc)
360 return E_POINTER;
361
362 if ((hr = stream_get_chunk(stream, &riff)) != S_OK)
363 return hr;
364 if (riff.id != FOURCC_RIFF || riff.type != DMUS_FOURCC_STYLE_FORM) {
365 TRACE("loading failed: unexpected %s\n", debugstr_chunk(&riff));
368 }
369
372 if (FAILED(hr))
373 return hr;
374
375 desc->guidClass = CLSID_DirectMusicStyle;
376 desc->dwValidData |= DMUS_OBJ_CLASS;
377
379 return S_OK;
380}
#define DMUS_E_CHUNKNOTFOUND
Definition: dmerror.h:66
void dump_DMUS_OBJECTDESC(DMUS_OBJECTDESC *desc)
Definition: dmobject.c:222
const char * debugstr_chunk(const struct chunk_entry *chunk)
Definition: dmobject.c:279
HRESULT stream_skip_chunk(IStream *stream, const struct chunk_entry *chunk)
Definition: dmobject.c:351
HRESULT stream_get_chunk(IStream *stream, struct chunk_entry *chunk)
Definition: dmobject.c:307
#define DMUS_OBJ_NAME_INAM
Definition: dmobject.h:96
#define DMUS_OBJ_CLASS
Definition: dmusici.h:266
#define DMUS_OBJ_VERSION
Definition: dmusici.h:272
#define DMUS_OBJ_OBJECT
Definition: dmusici.h:265
FOURCC id
Definition: dmobject.h:27
FOURCC type
Definition: dmobject.h:29

◆ style_part_destroy()

static void style_part_destroy ( struct style_part *  part)
static

Definition at line 55 of file style.c.

56{
57 free(part->notes);
58 free(part->curves);
59 free(part->markers);
60 free(part->resolutions);
61 free(part->anticipations);
62 free(part);
63}

Referenced by parse_part_list(), and style_Release().

◆ style_pattern_destroy()

static void style_pattern_destroy ( struct style_pattern *  pattern)
static

Definition at line 76 of file style.c.

77{
78 struct style_part_ref *part_ref, *next;
79
80 LIST_FOR_EACH_ENTRY_SAFE(part_ref, next, &pattern->part_refs, struct style_part_ref, entry)
81 {
82 list_remove(&part_ref->entry);
83 free(part_ref);
84 }
85
88}
static void list_remove(struct list_entry *entry)
Definition: list.h:90
static unsigned __int64 next
Definition: rand_nt.c:6
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
Definition: list.h:242

Referenced by parse_pttn_list(), and style_Release().

◆ style_QueryInterface()

static HRESULT WINAPI style_QueryInterface ( IDirectMusicStyle8 *  iface,
REFIID  riid,
void **  ret_iface 
)
static

Definition at line 106 of file style.c.

108{
109 struct style *This = impl_from_IDirectMusicStyle8(iface);
110
111 TRACE("(%p, %s, %p)\n", This, debugstr_dmguid(riid), ret_iface);
112
113 *ret_iface = NULL;
114
115 if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IDirectMusicStyle) ||
116 IsEqualIID(riid, &IID_IDirectMusicStyle8))
117 *ret_iface = iface;
118 else if (IsEqualIID(riid, &IID_IDirectMusicObject))
119 *ret_iface = &This->dmobj.IDirectMusicObject_iface;
121 *ret_iface = &This->dmobj.IPersistStream_iface;
122 else {
123 WARN("(%p, %s, %p): not found\n", This, debugstr_dmguid(riid), ret_iface);
124 return E_NOINTERFACE;
125 }
126
127 IUnknown_AddRef((IUnknown*)*ret_iface);
128 return S_OK;
129}
#define WARN(fmt,...)
Definition: precomp.h:61
const GUID IID_IUnknown
const char * debugstr_dmguid(const GUID *id)
Definition: dmobject.c:36
REFIID riid
Definition: atlbase.h:39
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
#define E_NOINTERFACE
Definition: winerror.h:3479

◆ style_Release()

static ULONG WINAPI style_Release ( IDirectMusicStyle8 *  iface)
static

Definition at line 141 of file style.c.

142{
143 struct style *This = impl_from_IDirectMusicStyle8(iface);
145
146 TRACE("(%p) ref=%ld\n", This, ref);
147
148 if (!ref) {
149 struct style_band *band, *band2;
150 struct style_pattern *pattern;
151 struct style_part *part;
152 void *next;
153
154 LIST_FOR_EACH_ENTRY_SAFE(band, band2, &This->bands, struct style_band, entry) {
155 list_remove(&band->entry);
156 if (band->pBand)
158 free(band);
159 }
160
162 {
163 list_remove(&pattern->entry);
165 }
166
167 LIST_FOR_EACH_ENTRY_SAFE(part, next, &This->parts, struct style_part, entry)
168 {
169 list_remove(&part->entry);
170 style_part_destroy(part);
171 }
172
173 free(This);
174 }
175
176 return ref;
177}
#define InterlockedDecrement
Definition: armddk.h:52

◆ WINE_DECLARE_DEBUG_CHANNEL()

WINE_DECLARE_DEBUG_CHANNEL ( dmfile  )

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( dmstyle  )

Variable Documentation

◆ dmobject_vtbl

const IDirectMusicObjectVtbl dmobject_vtbl
static
Initial value:
= {
}
static HRESULT WINAPI style_IDirectMusicObject_ParseDescriptor(IDirectMusicObject *iface, IStream *stream, DMUS_OBJECTDESC *desc)
Definition: style.c:351
HRESULT WINAPI dmobj_IDirectMusicObject_GetDescriptor(IDirectMusicObject *iface, DMUS_OBJECTDESC *desc)
Definition: dmobject.c:503
ULONG WINAPI dmobj_IDirectMusicObject_Release(IDirectMusicObject *iface)
Definition: dmobject.c:497
HRESULT WINAPI dmobj_IDirectMusicObject_QueryInterface(IDirectMusicObject *iface, REFIID riid, void **ret_iface)
Definition: dmobject.c:484
HRESULT WINAPI dmobj_IDirectMusicObject_SetDescriptor(IDirectMusicObject *iface, DMUS_OBJECTDESC *desc)
Definition: dmobject.c:518
ULONG WINAPI dmobj_IDirectMusicObject_AddRef(IDirectMusicObject *iface)
Definition: dmobject.c:491

Definition at line 382 of file style.c.

Referenced by create_dmstyle().

◆ dmstyle8_vtbl

const IDirectMusicStyle8Vtbl dmstyle8_vtbl
static
Initial value:
= {
}
static HRESULT WINAPI style_EnumChordMap(IDirectMusicStyle8 *iface, DWORD dwIndex, WCHAR *pwszName)
Definition: style.c:286
static HRESULT WINAPI style_EnumPattern(IDirectMusicStyle8 *iface, DWORD dwIndex, DWORD dwPatternType, WCHAR *pwszName)
Definition: style.c:325
static ULONG WINAPI style_Release(IDirectMusicStyle8 *iface)
Definition: style.c:141
static HRESULT WINAPI style_GetTimeSignature(IDirectMusicStyle8 *iface, DMUS_TIMESIGNATURE *pTimeSig)
Definition: style.c:302
static HRESULT WINAPI style_GetChordMap(IDirectMusicStyle8 *iface, WCHAR *pwszName, IDirectMusicChordMap **ppChordMap)
Definition: style.c:294
static HRESULT WINAPI style_QueryInterface(IDirectMusicStyle8 *iface, REFIID riid, void **ret_iface)
Definition: style.c:106
static HRESULT WINAPI style_GetEmbellishmentLength(IDirectMusicStyle8 *iface, DWORD dwType, DWORD dwLevel, DWORD *pdwMin, DWORD *pdwMax)
Definition: style.c:310
static HRESULT WINAPI style_GetDefaultBand(IDirectMusicStyle8 *iface, IDirectMusicBand **band)
Definition: style.c:222
static HRESULT WINAPI style_EnumBand(IDirectMusicStyle8 *iface, DWORD dwIndex, WCHAR *pwszName)
Definition: style.c:214
static HRESULT WINAPI style_GetDefaultChordMap(IDirectMusicStyle8 *iface, IDirectMusicChordMap **ppChordMap)
Definition: style.c:278
static HRESULT WINAPI style_EnumMotif(IDirectMusicStyle8 *iface, DWORD index, WCHAR *name)
Definition: style.c:236
static HRESULT WINAPI style_GetTempo(IDirectMusicStyle8 *iface, double *pTempo)
Definition: style.c:318
static ULONG WINAPI style_AddRef(IDirectMusicStyle8 *iface)
Definition: style.c:131
static HRESULT WINAPI style_GetBand(IDirectMusicStyle8 *iface, WCHAR *name, IDirectMusicBand **band)
Definition: style.c:179
static HRESULT WINAPI style_GetMotif(IDirectMusicStyle8 *iface, WCHAR *pwszName, IDirectMusicSegment **ppSegment)
Definition: style.c:270

Definition at line 333 of file style.c.

Referenced by create_dmstyle().

◆ persiststream_vtbl

const IPersistStreamVtbl persiststream_vtbl
static
Initial value:
= {
}
static HRESULT WINAPI IPersistStreamImpl_Load(IPersistStream *iface, IStream *pStm)
Definition: style.c:760
ULONG WINAPI dmobj_IPersistStream_Release(IPersistStream *iface)
Definition: dmobject.c:702
HRESULT WINAPI unimpl_IPersistStream_GetSizeMax(IPersistStream *iface, ULARGE_INTEGER *size)
Definition: dmobject.c:742
HRESULT WINAPI dmobj_IPersistStream_GetClassID(IPersistStream *iface, CLSID *class)
Definition: dmobject.c:708
ULONG WINAPI dmobj_IPersistStream_AddRef(IPersistStream *iface)
Definition: dmobject.c:696
HRESULT WINAPI dmobj_IPersistStream_QueryInterface(IPersistStream *iface, REFIID riid, void **ret_iface)
Definition: dmobject.c:689
HRESULT WINAPI unimpl_IPersistStream_IsDirty(IPersistStream *iface)
Definition: dmobject.c:729
HRESULT WINAPI unimpl_IPersistStream_Save(IPersistStream *iface, IStream *stream, BOOL clear_dirty)
Definition: dmobject.c:735

Definition at line 803 of file style.c.

Referenced by create_dmstyle().