Go to the source code of this file.
|
| | WINE_DEFAULT_DEBUG_CHANNEL (dmusic) |
| |
| | C_ASSERT (sizeof(struct pool)==offsetof(struct pool, cues[0])) |
| |
| void | collection_internal_addref (struct collection *collection) |
| |
| void | collection_internal_release (struct collection *collection) |
| |
| HRESULT | collection_get_wave (struct collection *collection, DWORD index, IDirectMusicObject **out) |
| |
| static struct collection * | impl_from_IDirectMusicCollection (IDirectMusicCollection *iface) |
| |
| static struct collection * | impl_from_IPersistStream (IPersistStream *iface) |
| |
| static HRESULT WINAPI | collection_QueryInterface (IDirectMusicCollection *iface, REFIID riid, void **ret_iface) |
| |
| static ULONG WINAPI | collection_AddRef (IDirectMusicCollection *iface) |
| |
| static ULONG WINAPI | collection_Release (IDirectMusicCollection *iface) |
| |
| static HRESULT WINAPI | collection_GetInstrument (IDirectMusicCollection *iface, DWORD patch, IDirectMusicInstrument **instrument) |
| |
| static HRESULT WINAPI | collection_EnumInstrument (IDirectMusicCollection *iface, DWORD index, DWORD *patch, LPWSTR name, DWORD name_length) |
| |
| static HRESULT | parse_lins_list (struct collection *This, IStream *stream, struct chunk_entry *parent) |
| |
| static HRESULT | parse_wvpl_list (struct collection *This, IStream *stream, struct chunk_entry *parent) |
| |
| static HRESULT | parse_ptbl_chunk (struct collection *This, IStream *stream, struct chunk_entry *chunk) |
| |
| static HRESULT | parse_dls_chunk (struct collection *This, IStream *stream, struct chunk_entry *parent) |
| |
| static HRESULT | parse_sdta_list (struct collection *This, IStream *stream, struct chunk_entry *parent, struct soundfont *soundfont) |
| |
| static HRESULT | parse_pdta_list (struct collection *This, IStream *stream, struct chunk_entry *parent, struct soundfont *soundfont) |
| |
| static HRESULT | parse_sfbk_chunk (struct collection *This, IStream *stream, struct chunk_entry *parent) |
| |
| static HRESULT WINAPI | collection_object_ParseDescriptor (IDirectMusicObject *iface, IStream *stream, DMUS_OBJECTDESC *desc) |
| |
| static HRESULT WINAPI | collection_stream_Load (IPersistStream *iface, IStream *stream) |
| |
| HRESULT | collection_create (IUnknown **ret_iface) |
| |
◆ C_ASSERT()
◆ collection_AddRef()
| static ULONG WINAPI collection_AddRef |
( |
IDirectMusicCollection * |
iface | ) |
|
|
static |
Definition at line 137 of file collection.c.
138{
141
142 TRACE(
"(%p): new ref = %lu\n", iface,
ref);
143
145}
#define InterlockedIncrement
static struct collection * impl_from_IDirectMusicCollection(IDirectMusicCollection *iface)
◆ collection_create()
Definition at line 749 of file collection.c.
750{
752
764
768}
static void list_init(struct list_entry *head)
static const IDirectMusicCollectionVtbl collection_vtbl
static const IPersistStreamVtbl collection_stream_vtbl
static const IDirectMusicObjectVtbl collection_object_vtbl
void dmobject_init(struct dmobject *dmobj, const GUID *class, IUnknown *outer_unk)
IDirectMusicCollection IDirectMusicCollection_iface
◆ collection_EnumInstrument()
Definition at line 203 of file collection.c.
205{
208
210
212 {
213 if (
index--)
continue;
217 }
218
220}
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
◆ collection_get_wave()
Definition at line 81 of file collection.c.
82{
85
88
90 {
92 {
96 }
97 }
98
100}
IDirectMusicObject * wave
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
Referenced by instrument_download_to_port().
◆ collection_GetInstrument()
| static HRESULT WINAPI collection_GetInstrument |
( |
IDirectMusicCollection * |
iface, |
|
|
DWORD |
patch, |
|
|
IDirectMusicInstrument ** |
instrument |
|
) |
| |
|
static |
Definition at line 180 of file collection.c.
182{
185
187
189 {
191 {
194 TRACE(
": returning instrument %p\n",
entry->instrument);
196 }
197 }
198
199 TRACE(
": instrument not found\n");
201}
#define DMUS_E_INVALIDPATCH
#define IDirectMusicInstrument_AddRef(p)
◆ collection_internal_addref()
◆ collection_internal_release()
◆ collection_object_ParseDescriptor()
Definition at line 635 of file collection.c.
637{
640
642
645
652 }
653
657
658 desc->guidClass = CLSID_DirectMusicCollection;
660
661 TRACE(
"returning descriptor:\n");
664}
#define DMUS_E_NOTADLSCOL
HRESULT dmobj_parsedescriptor(IStream *stream, const struct chunk_entry *riff, DMUS_OBJECTDESC *desc, DWORD supported)
void dump_DMUS_OBJECTDESC(DMUS_OBJECTDESC *desc)
const char * debugstr_chunk(const struct chunk_entry *chunk)
HRESULT stream_skip_chunk(IStream *stream, const struct chunk_entry *chunk)
HRESULT stream_get_chunk(IStream *stream, struct chunk_entry *chunk)
#define DMUS_OBJ_NAME_INFO
#define mmioFOURCC(c0, c1, c2, c3)
D3D11_SHADER_VARIABLE_DESC desc
◆ collection_QueryInterface()
Definition at line 112 of file collection.c.
114{
116
118
120
122 *ret_iface = iface;
124 *ret_iface = &
This->dmobj.IDirectMusicObject_iface;
126 *ret_iface = &
This->dmobj.IPersistStream_iface;
127 else
128 {
131 }
132
133 IUnknown_AddRef((
IUnknown*)*ret_iface);
135}
const char * debugstr_dmguid(const GUID *id)
const GUID IID_IPersistStream
#define IsEqualIID(riid1, riid2)
◆ collection_Release()
| static ULONG WINAPI collection_Release |
( |
IDirectMusicCollection * |
iface | ) |
|
|
static |
Definition at line 147 of file collection.c.
148{
151
152 TRACE(
"(%p): new ref = %lu\n", iface,
ref);
153
155 {
159
161 {
165 }
166
168 {
172 }
173
175 }
176
178}
static void list_remove(struct list_entry *entry)
void collection_internal_release(struct collection *collection)
#define IDirectMusicInstrument_Release(p)
static unsigned __int64 next
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
DMUS_IO_INSTRUMENT instrument
◆ collection_stream_Load()
Definition at line 676 of file collection.c.
677{
681
683
685 {
687 {
690 break;
691
694 break;
695
696 default:
699 break;
700 }
701 }
702
704
706 {
710
711 TRACE(
"*** IDirectMusicCollection (%p) ***\n", &
This->IDirectMusicCollection_iface);
713
714 TRACE(
" - Collection header:\n");
715 TRACE(
" - cInstruments: %ld\n",
This->header.cInstruments);
716 TRACE(
" - Instruments:\n");
717
719 {
720 TRACE(
" - Instrument[%i]: %p\n",
i,
entry->instrument);
722 }
723
725 for (
i = 0;
This->pool &&
i <
This->pool->table.cCues;
i++)
726 TRACE(
" - index: %u, offset: %lu\n",
i,
This->pool->cues[
i].ulOffset);
727
728 TRACE(
" - waves:\n");
731 }
732
735}
static struct collection * impl_from_IPersistStream(IPersistStream *iface)
static HRESULT parse_dls_chunk(struct collection *This, IStream *stream, struct chunk_entry *parent)
static HRESULT parse_sfbk_chunk(struct collection *This, IStream *stream, struct chunk_entry *parent)
#define DMUS_E_UNSUPPORTED_STREAM
HRESULT stream_next_chunk(IStream *stream, struct chunk_entry *chunk)
#define MAKE_IDTYPE(id, type)
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
static __inline const char * debugstr_fourcc(unsigned int cc)
◆ impl_from_IDirectMusicCollection()
| static struct collection * impl_from_IDirectMusicCollection |
( |
IDirectMusicCollection * |
iface | ) |
|
|
inlinestatic |
◆ impl_from_IPersistStream()
◆ parse_dls_chunk()
Definition at line 314 of file collection.c.
315{
318
323
325 {
327 {
331
332 break;
333
336 break;
337
340 break;
341
344 break;
345
348 break;
349
350 default:
352 break;
353 }
354
356 }
357
359}
static HRESULT parse_ptbl_chunk(struct collection *This, IStream *stream, struct chunk_entry *chunk)
static HRESULT parse_wvpl_list(struct collection *This, IStream *stream, struct chunk_entry *parent)
static HRESULT parse_lins_list(struct collection *This, IStream *stream, struct chunk_entry *parent)
HRESULT stream_chunk_get_data(IStream *stream, const struct chunk_entry *chunk, void *data, ULONG size)
static HRESULT stream_reset_chunk_data(IStream *stream, const struct chunk_entry *chunk)
#define DMUS_OBJ_GUID_DLID
#define DMUS_FOURCC_INFO_LIST
Referenced by collection_stream_Load().
◆ parse_lins_list()
Definition at line 231 of file collection.c.
232{
236
238 {
240 {
247 break;
248
249 default:
251 break;
252 }
253
255 }
256
258}
static void list_add_tail(struct list_entry *head, struct list_entry *entry)
HRESULT instrument_create_from_chunk(IStream *stream, struct chunk_entry *parent, struct collection *collection, DMUS_OBJECTDESC *desc, IDirectMusicInstrument **ret_iface)
#define IDirectMusicInstrument_GetPatch(p, a)
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList
Referenced by parse_dls_chunk().
◆ parse_pdta_list()
Definition at line 388 of file collection.c.
390{
393
395 {
397 {
403 break;
404
409 break;
410
415 break;
416
421 break;
422
428 break;
429
434 break;
435
440 break;
441
446 break;
447
453 break;
454
455 default:
457 break;
458 }
459
461 }
462
464}
struct sf_instrument * inst
Referenced by parse_sfbk_chunk().
◆ parse_ptbl_chunk()
◆ parse_sdta_list()
◆ parse_sfbk_chunk()
Definition at line 466 of file collection.c.
467{
472
477
479 {
481 {
483
484 break;
485
488 break;
489
492 break;
493
494 default:
496 break;
497 }
498
500 }
501
503 {
506 {
508
509 TRACE(
"preset[%u]:\n",
i);
516 TRACE(
" - morphology: %#lx\n",
preset->morphology);
517
519 {
521 TRACE(
" - bag[%u]:\n",
j);
524
525 for (
k = bag->
gen_ndx;
k < (bag + 1)->gen_ndx;
k++)
526 {
529 }
530
531 for (
k = bag->
mod_ndx;
k < (bag + 1)->mod_ndx;
k++)
532 {
535 }
536 }
537 }
538
539 TRACE(
"instruments:\n");
541 {
543 TRACE(
"instrument[%u]:\n",
i);
546
548 {
550 TRACE(
" - bag[%u]:\n",
j);
553
554 for (
k = bag->
gen_ndx;
k < (bag + 1)->gen_ndx;
k++)
555 {
558 }
559
560 for (
k = bag->
mod_ndx;
k < (bag + 1)->mod_ndx;
k++)
561 {
564 }
565 }
566 }
567
570 {
572
573 TRACE(
"sample[%u]:\n",
i);
579 TRACE(
" - sample_rate: %lu\n",
sample->sample_rate);
580 TRACE(
" - original_key: %u\n",
sample->original_key);
582 TRACE(
" - sample_link: %#x\n",
sample->sample_link);
583 TRACE(
" - sample_type: %#x\n",
sample->sample_type);
584 }
585 }
586
588 {
590
596 }
597
599 {
602 This->pool->table.cbSize =
sizeof(
This->pool->table);
603 }
604
606 {
608
612 else
613 {
615 This->pool->table.cCues++;
616 This->pool->cues[
i].ulOffset =
i;
618 }
619 }
620
631
633}
std::map< E_MODULE, HMODULE > mod
static HRESULT parse_sdta_list(struct collection *This, IStream *stream, struct chunk_entry *parent, struct soundfont *soundfont)
static HRESULT parse_pdta_list(struct collection *This, IStream *stream, struct chunk_entry *parent, struct soundfont *soundfont)
HRESULT instrument_create_from_soundfont(struct soundfont *soundfont, UINT index, struct collection *collection, DMUS_OBJECTDESC *desc, IDirectMusicInstrument **ret_iface)
HRESULT wave_create_from_soundfont(struct soundfont *soundfont, UINT index, IDirectMusicObject **out)
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 GLint GLint j
static const char * debugstr_sf_gen(struct sf_gen *gen)
static const char * debugstr_sf_mod(struct sf_mod *mod)
Referenced by collection_stream_Load().
◆ parse_wvpl_list()
Definition at line 260 of file collection.c.
261{
265
267 {
269 {
273 else
274 {
277 }
278 break;
279
280 default:
282 break;
283 }
284
286 }
287
289}
HRESULT wave_create_from_chunk(IStream *stream, struct chunk_entry *parent, IDirectMusicObject **out)
Referenced by parse_dls_chunk().
◆ WINE_DEFAULT_DEBUG_CHANNEL()
| WINE_DEFAULT_DEBUG_CHANNEL |
( |
dmusic |
| ) |
|
◆ collection_object_vtbl
| const IDirectMusicObjectVtbl collection_object_vtbl |
|
static |
Initial value:=
{
}
static HRESULT WINAPI collection_object_ParseDescriptor(IDirectMusicObject *iface, IStream *stream, DMUS_OBJECTDESC *desc)
HRESULT WINAPI dmobj_IDirectMusicObject_GetDescriptor(IDirectMusicObject *iface, DMUS_OBJECTDESC *desc)
ULONG WINAPI dmobj_IDirectMusicObject_Release(IDirectMusicObject *iface)
HRESULT WINAPI dmobj_IDirectMusicObject_QueryInterface(IDirectMusicObject *iface, REFIID riid, void **ret_iface)
HRESULT WINAPI dmobj_IDirectMusicObject_SetDescriptor(IDirectMusicObject *iface, DMUS_OBJECTDESC *desc)
ULONG WINAPI dmobj_IDirectMusicObject_AddRef(IDirectMusicObject *iface)
Definition at line 666 of file collection.c.
Referenced by collection_create().
◆ collection_stream_vtbl
| const IPersistStreamVtbl collection_stream_vtbl |
|
static |
Initial value:=
{
}
static HRESULT WINAPI collection_stream_Load(IPersistStream *iface, IStream *stream)
ULONG WINAPI dmobj_IPersistStream_Release(IPersistStream *iface)
HRESULT WINAPI unimpl_IPersistStream_GetClassID(IPersistStream *iface, CLSID *class)
HRESULT WINAPI unimpl_IPersistStream_GetSizeMax(IPersistStream *iface, ULARGE_INTEGER *size)
ULONG WINAPI dmobj_IPersistStream_AddRef(IPersistStream *iface)
HRESULT WINAPI dmobj_IPersistStream_QueryInterface(IPersistStream *iface, REFIID riid, void **ret_iface)
HRESULT WINAPI unimpl_IPersistStream_IsDirty(IPersistStream *iface)
HRESULT WINAPI unimpl_IPersistStream_Save(IPersistStream *iface, IStream *stream, BOOL clear_dirty)
Definition at line 737 of file collection.c.
Referenced by collection_create().
◆ collection_vtbl
| const IDirectMusicCollectionVtbl collection_vtbl |
|
static |
Initial value:=
{
}
static ULONG WINAPI collection_Release(IDirectMusicCollection *iface)
static HRESULT WINAPI collection_GetInstrument(IDirectMusicCollection *iface, DWORD patch, IDirectMusicInstrument **instrument)
static HRESULT WINAPI collection_QueryInterface(IDirectMusicCollection *iface, REFIID riid, void **ret_iface)
static ULONG WINAPI collection_AddRef(IDirectMusicCollection *iface)
static HRESULT WINAPI collection_EnumInstrument(IDirectMusicCollection *iface, DWORD index, DWORD *patch, LPWSTR name, DWORD name_length)
Definition at line 222 of file collection.c.
Referenced by collection_create().