Go to the source code of this file.
|
| | WINE_DEFAULT_DEBUG_CHANNEL (dmband) |
| |
| void | dump_DMUS_IO_INSTRUMENT (DMUS_IO_INSTRUMENT *inst) |
| |
| static HRESULT | instrument_entry_unload (struct instrument_entry *entry) |
| |
| static void | instrument_entry_destroy (struct instrument_entry *entry) |
| |
| static struct band * | impl_from_IDirectMusicBand (IDirectMusicBand *iface) |
| |
| static HRESULT WINAPI | band_QueryInterface (IDirectMusicBand *iface, REFIID riid, void **ret_iface) |
| |
| static ULONG WINAPI | band_AddRef (IDirectMusicBand *iface) |
| |
| static ULONG WINAPI | band_Release (IDirectMusicBand *iface) |
| |
| static HRESULT WINAPI | band_CreateSegment (IDirectMusicBand *iface, IDirectMusicSegment **segment) |
| |
| static HRESULT WINAPI | band_Download (IDirectMusicBand *iface, IDirectMusicPerformance *performance) |
| |
| static HRESULT WINAPI | band_Unload (IDirectMusicBand *iface, IDirectMusicPerformance *performance) |
| |
| static HRESULT | parse_lbin_list (struct band *This, IStream *stream, struct chunk_entry *parent) |
| |
| static HRESULT | parse_lbil_list (struct band *This, IStream *stream, struct chunk_entry *parent) |
| |
| static HRESULT | parse_dmbd_chunk (struct band *This, IStream *stream, struct chunk_entry *parent) |
| |
| static HRESULT WINAPI | band_object_ParseDescriptor (IDirectMusicObject *iface, IStream *stream, DMUS_OBJECTDESC *desc) |
| |
| static struct band * | impl_from_IPersistStream (IPersistStream *iface) |
| |
| static HRESULT WINAPI | band_persist_stream_Load (IPersistStream *iface, IStream *stream) |
| |
| HRESULT | create_dmband (REFIID lpcGUID, void **ppobj) |
| |
| HRESULT | band_connect_to_collection (IDirectMusicBand *iface, IDirectMusicCollection *collection) |
| |
| HRESULT | band_send_messages (IDirectMusicBand *iface, IDirectMusicPerformance *performance, IDirectMusicGraph *graph, MUSIC_TIME time, DWORD track_id) |
| |
| HRESULT | band_add_instrument (IDirectMusicBand *iface, DMUS_IO_INSTRUMENT *instrument) |
| |
◆ band_add_instrument()
Definition at line 531 of file band.c.
532{
535
537
541
543}
static struct band * impl_from_IDirectMusicBand(IDirectMusicBand *iface)
static void list_add_tail(struct list_entry *head, struct list_entry *entry)
DMUS_IO_INSTRUMENT instrument
Referenced by midi_parser_handle_program_change().
◆ band_AddRef()
| static ULONG WINAPI band_AddRef |
( |
IDirectMusicBand * |
iface | ) |
|
|
static |
Definition at line 113 of file band.c.
114{
117
119
121}
#define InterlockedIncrement
◆ band_connect_to_collection()
| HRESULT band_connect_to_collection |
( |
IDirectMusicBand * |
iface, |
|
|
IDirectMusicCollection * |
collection |
|
) |
| |
Definition at line 477 of file band.c.
478{
480
482
485
487}
#define IDirectMusicCollection_AddRef(p)
#define IDirectMusicCollection_Release(p)
Referenced by band_track_SetParam().
◆ band_CreateSegment()
| static HRESULT WINAPI band_CreateSegment |
( |
IDirectMusicBand * |
iface, |
|
|
IDirectMusicSegment ** |
segment |
|
) |
| |
|
static |
Definition at line 147 of file band.c.
149{
153
155
157 &IID_IDirectMusicSegment, (
void**)
segment);
160
162 bandparam.
pBand = &
This->IDirectMusicBand_iface;
165 0, &bandparam);
167
169}
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, IUnknown *outer, DWORD cls_context, REFIID riid, void **obj)
#define IDirectMusicBand_AddRef(p)
#define DMUS_SEG_ALLTRACKS
#define IDirectMusicSegment_SetParam(p, a, b, c, d, e)
#define IDirectMusicBand_Release(p)
MUSIC_TIME mtTimePhysical
struct IDirectMusicBand * pBand
◆ band_Download()
| static HRESULT WINAPI band_Download |
( |
IDirectMusicBand * |
iface, |
|
|
IDirectMusicPerformance * |
performance |
|
) |
| |
|
static |
Definition at line 171 of file band.c.
173{
177
179
181 {
184
187
189 {
193 }
194
196 }
197
198 if (
FAILED(
hr))
WARN(
"Failed to download instruments, hr %#lx\n",
hr);
200}
static HRESULT instrument_entry_unload(struct instrument_entry *entry)
#define IDirectMusicCollection_GetInstrument(p, a, b)
#define IDirectMusicInstrument_Release(p)
#define IDirectMusicPerformance_DownloadInstrument(p, a, b, c, d, e, f, g, h)
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
IDirectMusicCollection * collection
◆ band_object_ParseDescriptor()
Definition at line 335 of file band.c.
337{
341
343
346
353 }
354
359
360 desc->guidClass = CLSID_DirectMusicBand;
362
367 }
368
369 TRACE(
"returning descriptor:\n");
372}
#define DMUS_E_INVALID_BAND
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_INAM
#define DMUS_FOURCC_BAND_FORM
#define DMUS_OBJ_CATEGORY
D3D11_SHADER_VARIABLE_DESC desc
◆ band_persist_stream_Load()
Definition at line 389 of file band.c.
390{
393 {
396 .guidClass = CLSID_DirectMusicCollection,
397 .guidObject = GUID_DefaultGMCollection,
398 };
401
403
406 (
void **)&
This->collection)))
407 WARN(
"Failed to load default collection from loader, hr %#lx\n",
hr);
408
410 {
412 {
415 break;
416
417 default:
420 break;
421 }
422 }
423
426
428 {
430
431 TRACE(
"Loaded IDirectMusicBand %p\n",
This);
433
434 TRACE(
" - Instruments:\n");
436 {
438 TRACE(
" - collection: %p\n",
entry->collection);
439 }
440 }
441
443}
static HRESULT parse_dmbd_chunk(struct band *This, IStream *stream, struct chunk_entry *parent)
static struct band * impl_from_IPersistStream(IPersistStream *iface)
void dump_DMUS_IO_INSTRUMENT(DMUS_IO_INSTRUMENT *inst)
#define DMUS_E_UNSUPPORTED_STREAM
HRESULT stream_get_object(IStream *stream, DMUS_OBJECTDESC *desc, REFIID iid, void **ret_iface)
#define MAKE_IDTYPE(id, type)
struct _DMUS_OBJECTDESC DMUS_OBJECTDESC
static __inline const char * debugstr_fourcc(unsigned int cc)
◆ band_QueryInterface()
Definition at line 89 of file band.c.
91{
93
95
97
99 *ret_iface = iface;
101 *ret_iface = &
This->dmobj.IDirectMusicObject_iface;
103 *ret_iface = &
This->dmobj.IPersistStream_iface;
104 else {
107 }
108
111}
const char * debugstr_dmguid(const GUID *id)
const GUID IID_IPersistStream
#define IsEqualIID(riid1, riid2)
◆ band_Release()
| static ULONG WINAPI band_Release |
( |
IDirectMusicBand * |
iface | ) |
|
|
static |
Definition at line 123 of file band.c.
124{
127
129
131 {
133
135 {
138 }
139
142 }
143
145}
#define InterlockedDecrement
static void instrument_entry_destroy(struct instrument_entry *entry)
static void list_remove(struct list_entry *entry)
static unsigned __int64 next
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
◆ band_send_messages()
| HRESULT band_send_messages |
( |
IDirectMusicBand * |
iface, |
|
|
IDirectMusicPerformance * |
performance, |
|
|
IDirectMusicGraph * |
graph, |
|
|
MUSIC_TIME |
time, |
|
|
DWORD |
track_id |
|
) |
| |
Definition at line 489 of file band.c.
491{
495
497 {
500
503 break;
504
507 msg->dwPChannel =
entry->instrument.dwPChannel;
508 msg->dwVirtualTrackID = track_id;
511 msg->byInstrument =
entry->instrument.dwPatch;
512
519
522 {
524 break;
525 }
526 }
527
529}
#define IDirectMusicPerformance_SendPMsg(p, a)
#define IDirectMusicPerformance_FreePMsg(p, a)
#define IDirectMusicGraph_StampPMsg(p, a)
#define IDirectMusicPerformance_AllocPMsg(p, a, b)
#define LIST_FOR_EACH_ENTRY_REV(elem, list, type, field)
Referenced by band_track_Play().
◆ band_Unload()
| static HRESULT WINAPI band_Unload |
( |
IDirectMusicBand * |
iface, |
|
|
IDirectMusicPerformance * |
performance |
|
) |
| |
|
static |
Definition at line 202 of file band.c.
203{
207
209
211
214
215 if (
FAILED(
hr))
WARN(
"Failed to unload instruments, hr %#lx\n",
hr);
217}
◆ create_dmband()
Definition at line 457 of file band.c.
458{
461
470
473
475}
static const IDirectMusicObjectVtbl band_object_vtbl
static const IDirectMusicBandVtbl band_vtbl
static const IPersistStreamVtbl band_persist_stream_vtbl
static void list_init(struct list_entry *head)
void dmobject_init(struct dmobject *dmobj, const GUID *class, IUnknown *outer_unk)
#define IDirectMusicBand_QueryInterface(p, a, b)
◆ dump_DMUS_IO_INSTRUMENT()
◆ impl_from_IDirectMusicBand()
| static struct band * impl_from_IDirectMusicBand |
( |
IDirectMusicBand * |
iface | ) |
|
|
inlinestatic |
Definition at line 84 of file band.c.
85{
87}
#define CONTAINING_RECORD(address, type, field)
Referenced by band_add_instrument(), band_AddRef(), band_connect_to_collection(), band_CreateSegment(), band_Download(), band_QueryInterface(), band_Release(), band_send_messages(), and band_Unload().
◆ impl_from_IPersistStream()
◆ instrument_entry_destroy()
◆ instrument_entry_unload()
◆ parse_dmbd_chunk()
Definition at line 300 of file band.c.
301{
304
309
311 {
313 {
317
318 break;
319
322 break;
323
324 default:
326 break;
327 }
328
330 }
331
333}
static HRESULT parse_lbil_list(struct band *This, IStream *stream, struct chunk_entry *parent)
HRESULT stream_next_chunk(IStream *stream, struct chunk_entry *chunk)
static HRESULT stream_reset_chunk_data(IStream *stream, const struct chunk_entry *chunk)
#define DMUS_FOURCC_GUID_CHUNK
#define DMUS_FOURCC_VERSION_CHUNK
#define DMUS_FOURCC_INSTRUMENTS_LIST
#define DMUS_FOURCC_UNFO_LIST
Referenced by band_persist_stream_Load().
◆ parse_lbil_list()
Definition at line 276 of file band.c.
277{
280
282 {
284 {
287 break;
288
289 default:
291 break;
292 }
293
295 }
296
298}
static HRESULT parse_lbin_list(struct band *This, IStream *stream, struct chunk_entry *parent)
#define DMUS_FOURCC_INSTRUMENT_LIST
Referenced by parse_dmbd_chunk().
◆ parse_lbin_list()
Definition at line 229 of file band.c.
230{
236
238 {
240 {
242 {
246 break;
247 }
248
250 {
251 IDirectMusicObject *
object;
255 break;
256 }
257
258 default:
260 break;
261 }
262
264 }
265
267
272
274}
HRESULT stream_chunk_get_data(IStream *stream, const struct chunk_entry *chunk, void *data, ULONG size)
HRESULT dmobj_parsereference(IStream *stream, const struct chunk_entry *list, IDirectMusicObject **dmobj)
#define DMUS_FOURCC_INSTRUMENT_CHUNK
#define DMUS_FOURCC_REF_LIST
#define IDirectMusicObject_QueryInterface(p, a, b)
#define IDirectMusicObject_Release(p)
#define memcpy(s1, s2, n)
#define offsetof(TYPE, MEMBER)
Referenced by parse_lbil_list().
◆ WINE_DEFAULT_DEBUG_CHANNEL()
| WINE_DEFAULT_DEBUG_CHANNEL |
( |
dmband |
| ) |
|
◆ band_object_vtbl
| const IDirectMusicObjectVtbl band_object_vtbl |
|
static |
Initial value:=
{
}
static HRESULT WINAPI band_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 374 of file band.c.
Referenced by create_dmband().
◆ band_persist_stream_vtbl
| const IPersistStreamVtbl band_persist_stream_vtbl |
|
static |
Initial value:=
{
}
static HRESULT WINAPI band_persist_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 445 of file band.c.
Referenced by create_dmband().
◆ band_vtbl
| const IDirectMusicBandVtbl band_vtbl |
|
static |
Initial value:=
{
}
static HRESULT WINAPI band_Download(IDirectMusicBand *iface, IDirectMusicPerformance *performance)
static ULONG WINAPI band_AddRef(IDirectMusicBand *iface)
static HRESULT WINAPI band_QueryInterface(IDirectMusicBand *iface, REFIID riid, void **ret_iface)
static HRESULT WINAPI band_Unload(IDirectMusicBand *iface, IDirectMusicPerformance *performance)
static ULONG WINAPI band_Release(IDirectMusicBand *iface)
static HRESULT WINAPI band_CreateSegment(IDirectMusicBand *iface, IDirectMusicSegment **segment)
Definition at line 219 of file band.c.
Referenced by create_dmband().