ReactOS 0.4.17-dev-934-g091855f
band.c
Go to the documentation of this file.
1/* IDirectMusicBand Implementation
2 *
3 * Copyright (C) 2003-2004 Rok Mandeljc
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
18 */
19
20#include "dmusic_private.h"
21
23
25{
26 TRACE("DMUS_IO_INSTRUMENT: %p\n", inst);
27 TRACE(" - dwPatch: %lu\n", inst->dwPatch);
28 TRACE(" - dwAssignPatch: %lu\n", inst->dwAssignPatch);
29 TRACE(" - dwNoteRanges[0]: %lu\n", inst->dwNoteRanges[0]);
30 TRACE(" - dwNoteRanges[1]: %lu\n", inst->dwNoteRanges[1]);
31 TRACE(" - dwNoteRanges[2]: %lu\n", inst->dwNoteRanges[2]);
32 TRACE(" - dwNoteRanges[3]: %lu\n", inst->dwNoteRanges[3]);
33 TRACE(" - dwPChannel: %lu\n", inst->dwPChannel);
34 TRACE(" - dwFlags: %lx\n", inst->dwFlags);
35 TRACE(" - bPan: %u\n", inst->bPan);
36 TRACE(" - bVolume: %u\n", inst->bVolume);
37 TRACE(" - nTranspose: %d\n", inst->nTranspose);
38 TRACE(" - dwChannelPriority: %lu\n", inst->dwChannelPriority);
39 TRACE(" - nPitchBendRange: %d\n", inst->nPitchBendRange);
40}
41
43{
44 struct list entry;
46 IDirectMusicCollection *collection;
47
48 IDirectMusicDownloadedInstrument *download;
49 IDirectMusicPort *download_port;
50};
51
53{
54 HRESULT hr;
55
56 if (!entry->download) return S_OK;
57
58 if (FAILED(hr = IDirectMusicPort_UnloadInstrument(entry->download_port, entry->download)))
59 WARN("Failed to unload entry instrument, hr %#lx\n", hr);
61 entry->download = NULL;
62 IDirectMusicPort_Release(entry->download_port);
63 entry->download_port = NULL;
64
65 return hr;
66}
67
69{
71 if (entry->collection) IDirectMusicCollection_Release(entry->collection);
72 free(entry);
73}
74
75struct band
76{
77 IDirectMusicBand IDirectMusicBand_iface;
81 IDirectMusicCollection *collection;
82};
83
84static inline struct band *impl_from_IDirectMusicBand(IDirectMusicBand *iface)
85{
86 return CONTAINING_RECORD(iface, struct band, IDirectMusicBand_iface);
87}
88
89static HRESULT WINAPI band_QueryInterface(IDirectMusicBand *iface, REFIID riid,
90 void **ret_iface)
91{
92 struct band *This = impl_from_IDirectMusicBand(iface);
93
94 TRACE("(%p, %s, %p)\n", This, debugstr_dmguid(riid), ret_iface);
95
96 *ret_iface = NULL;
97
98 if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IDirectMusicBand))
99 *ret_iface = iface;
100 else if (IsEqualIID(riid, &IID_IDirectMusicObject))
101 *ret_iface = &This->dmobj.IDirectMusicObject_iface;
103 *ret_iface = &This->dmobj.IPersistStream_iface;
104 else {
105 WARN("(%p, %s, %p): not found\n", This, debugstr_dmguid(riid), ret_iface);
106 return E_NOINTERFACE;
107 }
108
109 IDirectMusicBand_AddRef((IUnknown*)*ret_iface);
110 return S_OK;
111}
112
113static ULONG WINAPI band_AddRef(IDirectMusicBand *iface)
114{
115 struct band *This = impl_from_IDirectMusicBand(iface);
117
118 TRACE("(%p) ref=%ld\n", This, ref);
119
120 return ref;
121}
122
123static ULONG WINAPI band_Release(IDirectMusicBand *iface)
124{
125 struct band *This = impl_from_IDirectMusicBand(iface);
127
128 TRACE("(%p) ref=%ld\n", This, ref);
129
130 if (!ref)
131 {
132 struct instrument_entry *entry, *next;
133
135 {
136 list_remove(&entry->entry);
138 }
139
140 if (This->collection) IDirectMusicCollection_Release(This->collection);
141 free(This);
142 }
143
144 return ref;
145}
146
147static HRESULT WINAPI band_CreateSegment(IDirectMusicBand *iface,
148 IDirectMusicSegment **segment)
149{
150 struct band *This = impl_from_IDirectMusicBand(iface);
151 HRESULT hr;
152 DMUS_BAND_PARAM bandparam;
153
154 FIXME("(%p, %p): semi-stub\n", This, segment);
155
156 hr = CoCreateInstance(&CLSID_DirectMusicSegment, NULL, CLSCTX_INPROC,
157 &IID_IDirectMusicSegment, (void**)segment);
158 if (FAILED(hr))
159 return hr;
160
161 bandparam.mtTimePhysical = 0;
162 bandparam.pBand = &This->IDirectMusicBand_iface;
164 hr = IDirectMusicSegment_SetParam(*segment, &GUID_BandParam, 0xffffffff, DMUS_SEG_ALLTRACKS,
165 0, &bandparam);
167
168 return hr;
169}
170
171static HRESULT WINAPI band_Download(IDirectMusicBand *iface,
172 IDirectMusicPerformance *performance)
173{
174 struct band *This = impl_from_IDirectMusicBand(iface);
175 struct instrument_entry *entry;
176 HRESULT hr = S_OK;
177
178 TRACE("(%p, %p)\n", This, performance);
179
180 LIST_FOR_EACH_ENTRY(entry, &This->instruments, struct instrument_entry, entry)
181 {
182 IDirectMusicCollection *collection;
183 IDirectMusicInstrument *instrument;
184
185 if (FAILED(hr = instrument_entry_unload(entry))) break;
186 if (!(collection = entry->collection) && !(collection = This->collection)) continue;
187
189 {
191 &entry->download, NULL, 0, &entry->download_port, NULL, NULL);
193 }
194
195 if (FAILED(hr)) break;
196 }
197
198 if (FAILED(hr)) WARN("Failed to download instruments, hr %#lx\n", hr);
199 return hr;
200}
201
202static HRESULT WINAPI band_Unload(IDirectMusicBand *iface, IDirectMusicPerformance *performance)
203{
204 struct band *This = impl_from_IDirectMusicBand(iface);
205 struct instrument_entry *entry;
206 HRESULT hr = S_OK;
207
208 TRACE("(%p, %p)\n", This, performance);
209
210 if (performance) FIXME("performance parameter not implemented\n");
211
212 LIST_FOR_EACH_ENTRY(entry, &This->instruments, struct instrument_entry, entry)
213 if (FAILED(hr = instrument_entry_unload(entry))) break;
214
215 if (FAILED(hr)) WARN("Failed to unload instruments, hr %#lx\n", hr);
216 return hr;
217}
218
219static const IDirectMusicBandVtbl band_vtbl =
220{
227};
228
230{
231 struct chunk_entry chunk = {.parent = parent};
232 IDirectMusicCollection *collection = NULL;
233 struct instrument_entry *entry;
234 DMUS_IO_INSTRUMENT inst = {0};
235 HRESULT hr;
236
237 while ((hr = stream_next_chunk(stream, &chunk)) == S_OK)
238 {
239 switch (MAKE_IDTYPE(chunk.id, chunk.type))
240 {
242 {
243 UINT size = sizeof(inst);
244 if (chunk.size == offsetof(DMUS_IO_INSTRUMENT, nPitchBendRange)) size = chunk.size;
245 if (FAILED(hr = stream_chunk_get_data(stream, &chunk, &inst, size))) break;
246 break;
247 }
248
250 {
251 IDirectMusicObject *object;
252 if (FAILED(hr = dmobj_parsereference(stream, &chunk, &object))) break;
253 hr = IDirectMusicObject_QueryInterface(object, &IID_IDirectMusicCollection, (void **)&collection);
255 break;
256 }
257
258 default:
259 FIXME("Ignoring chunk %s %s\n", debugstr_fourcc(chunk.id), debugstr_fourcc(chunk.type));
260 break;
261 }
262
263 if (FAILED(hr)) break;
264 }
265
266 if (FAILED(hr)) return hr;
267
268 if (!(entry = calloc(1, sizeof(*entry)))) return E_OUTOFMEMORY;
269 memcpy(&entry->instrument, &inst, sizeof(DMUS_IO_INSTRUMENT));
270 entry->collection = collection;
271 list_add_tail(&This->instruments, &entry->entry);
272
273 return hr;
274}
275
277{
278 struct chunk_entry chunk = {.parent = parent};
279 HRESULT hr;
280
281 while ((hr = stream_next_chunk(stream, &chunk)) == S_OK)
282 {
283 switch (MAKE_IDTYPE(chunk.id, chunk.type))
284 {
287 break;
288
289 default:
290 FIXME("Ignoring chunk %s %s\n", debugstr_fourcc(chunk.id), debugstr_fourcc(chunk.type));
291 break;
292 }
293
294 if (FAILED(hr)) break;
295 }
296
297 return hr;
298}
299
301{
302 struct chunk_entry chunk = {.parent = parent};
303 HRESULT hr;
304
305 if (FAILED(hr = dmobj_parsedescriptor(stream, parent, &This->dmobj.desc,
308 return hr;
309
310 while ((hr = stream_next_chunk(stream, &chunk)) == S_OK)
311 {
312 switch (MAKE_IDTYPE(chunk.id, chunk.type))
313 {
317 /* already parsed by dmobj_parsedescriptor */
318 break;
319
322 break;
323
324 default:
325 FIXME("Ignoring chunk %s %s\n", debugstr_fourcc(chunk.id), debugstr_fourcc(chunk.type));
326 break;
327 }
328
329 if (FAILED(hr)) break;
330 }
331
332 return hr;
333}
334
335static HRESULT WINAPI band_object_ParseDescriptor(IDirectMusicObject *iface,
337{
338 struct chunk_entry riff = {0};
339 STATSTG stat;
340 HRESULT hr;
341
342 TRACE("(%p, %p, %p)\n", iface, stream, desc);
343
344 if (!stream || !desc)
345 return E_POINTER;
346
347 if ((hr = stream_get_chunk(stream, &riff)) != S_OK)
348 return hr;
349 if (riff.id != FOURCC_RIFF || riff.type != DMUS_FOURCC_BAND_FORM) {
350 TRACE("loading failed: unexpected %s\n", debugstr_chunk(&riff));
352 return DMUS_E_INVALID_BAND;
353 }
354
357 if (FAILED(hr))
358 return hr;
359
360 desc->guidClass = CLSID_DirectMusicBand;
361 desc->dwValidData |= DMUS_OBJ_CLASS;
362
363 if (desc->dwValidData & DMUS_OBJ_CATEGORY) {
364 IStream_Stat(stream, &stat, STATFLAG_NONAME);
365 desc->ftDate = stat.mtime;
366 desc->dwValidData |= DMUS_OBJ_DATE;
367 }
368
369 TRACE("returning descriptor:\n");
371 return S_OK;
372}
373
374static const IDirectMusicObjectVtbl band_object_vtbl =
375{
382};
383
384static inline struct band *impl_from_IPersistStream(IPersistStream *iface)
385{
386 return CONTAINING_RECORD(iface, struct band, dmobj.IPersistStream_iface);
387}
388
390{
391 struct band *This = impl_from_IPersistStream(iface);
392 DMUS_OBJECTDESC default_desc =
393 {
394 .dwSize = sizeof(DMUS_OBJECTDESC),
395 .dwValidData = DMUS_OBJ_OBJECT | DMUS_OBJ_CLASS,
396 .guidClass = CLSID_DirectMusicCollection,
397 .guidObject = GUID_DefaultGMCollection,
398 };
399 struct chunk_entry chunk = {0};
400 HRESULT hr;
401
402 TRACE("%p, %p\n", iface, stream);
403
404 if (This->collection) IDirectMusicCollection_Release(This->collection);
405 if (FAILED(hr = stream_get_object(stream, &default_desc, &IID_IDirectMusicCollection,
406 (void **)&This->collection)))
407 WARN("Failed to load default collection from loader, hr %#lx\n", hr);
408
409 if ((hr = stream_get_chunk(stream, &chunk)) == S_OK)
410 {
411 switch (MAKE_IDTYPE(chunk.id, chunk.type))
412 {
415 break;
416
417 default:
418 WARN("Invalid band chunk %s %s\n", debugstr_fourcc(chunk.id), debugstr_fourcc(chunk.type));
420 break;
421 }
422 }
423
425 if (FAILED(hr)) return hr;
426
427 if (TRACE_ON(dmband))
428 {
429 struct instrument_entry *entry;
430
431 TRACE("Loaded IDirectMusicBand %p\n", This);
432 dump_DMUS_OBJECTDESC(&This->dmobj.desc);
433
434 TRACE(" - Instruments:\n");
435 LIST_FOR_EACH_ENTRY(entry, &This->instruments, struct instrument_entry, entry)
436 {
437 dump_DMUS_IO_INSTRUMENT(&entry->instrument);
438 TRACE(" - collection: %p\n", entry->collection);
439 }
440 }
441
442 return S_OK;
443}
444
445static const IPersistStreamVtbl band_persist_stream_vtbl =
446{
455};
456
457HRESULT create_dmband(REFIID lpcGUID, void **ppobj)
458{
459 struct band* obj;
460 HRESULT hr;
461
462 *ppobj = NULL;
463 if (!(obj = calloc(1, sizeof(*obj)))) return E_OUTOFMEMORY;
464 obj->IDirectMusicBand_iface.lpVtbl = &band_vtbl;
465 obj->ref = 1;
466 dmobject_init(&obj->dmobj, &CLSID_DirectMusicBand, (IUnknown *)&obj->IDirectMusicBand_iface);
467 obj->dmobj.IDirectMusicObject_iface.lpVtbl = &band_object_vtbl;
468 obj->dmobj.IPersistStream_iface.lpVtbl = &band_persist_stream_vtbl;
469 list_init(&obj->instruments);
470
471 hr = IDirectMusicBand_QueryInterface(&obj->IDirectMusicBand_iface, lpcGUID, ppobj);
472 IDirectMusicBand_Release(&obj->IDirectMusicBand_iface);
473
474 return hr;
475}
476
477HRESULT band_connect_to_collection(IDirectMusicBand *iface, IDirectMusicCollection *collection)
478{
479 struct band *This = impl_from_IDirectMusicBand(iface);
480
481 TRACE("%p, %p\n", iface, collection);
482
483 if (This->collection) IDirectMusicCollection_Release(This->collection);
484 if ((This->collection = collection)) IDirectMusicCollection_AddRef(This->collection);
485
486 return S_OK;
487}
488
489HRESULT band_send_messages(IDirectMusicBand *iface, IDirectMusicPerformance *performance,
490 IDirectMusicGraph *graph, MUSIC_TIME time, DWORD track_id)
491{
492 struct band *This = impl_from_IDirectMusicBand(iface);
493 struct instrument_entry *entry;
494 HRESULT hr = S_OK;
495
497 {
498 DWORD patch = entry->instrument.dwPatch;
500
502 (DMUS_PMSG **)&msg)))
503 break;
504
505 msg->mtTime = time;
506 msg->dwFlags = DMUS_PMSGF_MUSICTIME;
507 msg->dwPChannel = entry->instrument.dwPChannel;
508 msg->dwVirtualTrackID = track_id;
509 msg->dwType = DMUS_PMSGT_PATCH;
510 msg->dwGroupID = 1;
511 msg->byInstrument = entry->instrument.dwPatch;
512
513 msg->byInstrument = patch & 0x7F;
514 patch >>= 8;
515 msg->byLSB = patch & 0x7f;
516 patch >>= 8;
517 msg->byMSB = patch & 0x7f;
518 patch >>= 8;
519
522 {
524 break;
525 }
526 }
527
528 return hr;
529}
530
532{
533 struct band *This = impl_from_IDirectMusicBand(iface);
534 struct instrument_entry *entry;
535
536 TRACE("%p, %p\n", iface, instrument);
537
538 if (!(entry = calloc(1, sizeof(*entry)))) return E_OUTOFMEMORY;
539 entry->instrument = *instrument;
540 list_add_tail(&This->instruments, &entry->entry);
541
542 return S_OK;
543}
#define stat
Definition: acwin.h:100
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
#define msg(x)
Definition: auth_time.c:54
static const IDirectMusicObjectVtbl band_object_vtbl
Definition: band.c:374
static const IDirectMusicBandVtbl band_vtbl
Definition: band.c:219
HRESULT band_connect_to_collection(IDirectMusicBand *iface, IDirectMusicCollection *collection)
Definition: band.c:477
HRESULT create_dmband(REFIID lpcGUID, void **ppobj)
Definition: band.c:457
static void instrument_entry_destroy(struct instrument_entry *entry)
Definition: band.c:68
static HRESULT instrument_entry_unload(struct instrument_entry *entry)
Definition: band.c:52
static HRESULT WINAPI band_Download(IDirectMusicBand *iface, IDirectMusicPerformance *performance)
Definition: band.c:171
static HRESULT parse_dmbd_chunk(struct band *This, IStream *stream, struct chunk_entry *parent)
Definition: band.c:300
static struct band * impl_from_IPersistStream(IPersistStream *iface)
Definition: band.c:384
static ULONG WINAPI band_AddRef(IDirectMusicBand *iface)
Definition: band.c:113
static HRESULT WINAPI band_QueryInterface(IDirectMusicBand *iface, REFIID riid, void **ret_iface)
Definition: band.c:89
static const IPersistStreamVtbl band_persist_stream_vtbl
Definition: band.c:445
static HRESULT parse_lbil_list(struct band *This, IStream *stream, struct chunk_entry *parent)
Definition: band.c:276
static HRESULT WINAPI band_persist_stream_Load(IPersistStream *iface, IStream *stream)
Definition: band.c:389
static struct band * impl_from_IDirectMusicBand(IDirectMusicBand *iface)
Definition: band.c:84
static HRESULT WINAPI band_Unload(IDirectMusicBand *iface, IDirectMusicPerformance *performance)
Definition: band.c:202
static HRESULT parse_lbin_list(struct band *This, IStream *stream, struct chunk_entry *parent)
Definition: band.c:229
static ULONG WINAPI band_Release(IDirectMusicBand *iface)
Definition: band.c:123
static HRESULT WINAPI band_CreateSegment(IDirectMusicBand *iface, IDirectMusicSegment **segment)
Definition: band.c:147
HRESULT band_send_messages(IDirectMusicBand *iface, IDirectMusicPerformance *performance, IDirectMusicGraph *graph, MUSIC_TIME time, DWORD track_id)
Definition: band.c:489
void dump_DMUS_IO_INSTRUMENT(DMUS_IO_INSTRUMENT *inst)
Definition: band.c:24
HRESULT band_add_instrument(IDirectMusicBand *iface, DMUS_IO_INSTRUMENT *instrument)
Definition: band.c:531
static HRESULT WINAPI band_object_ParseDescriptor(IDirectMusicObject *iface, IStream *stream, DMUS_OBJECTDESC *desc)
Definition: band.c:335
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
static void list_remove(struct list_entry *entry)
Definition: list.h:90
static void list_add_tail(struct list_entry *head, struct list_entry *entry)
Definition: list.h:83
static void list_init(struct list_entry *head)
Definition: list.h:51
#define FIXME(fmt,...)
Definition: precomp.h:53
#define WARN(fmt,...)
Definition: precomp.h:61
const GUID IID_IUnknown
Definition: list.h:39
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define free
Definition: debug_ros.c:5
HRESULT hr
Definition: delayimp.cpp:582
#define NULL
Definition: types.h:112
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, IUnknown *outer, DWORD cls_context, REFIID riid, void **obj)
Definition: combase.c:1685
#define TRACE_ON(x)
Definition: compat.h:75
#define DMUS_E_UNSUPPORTED_STREAM
Definition: dmerror.h:100
#define DMUS_E_INVALID_BAND
Definition: dmerror.h:102
HRESULT WINAPI dmobj_IDirectMusicObject_GetDescriptor(IDirectMusicObject *iface, DMUS_OBJECTDESC *desc)
Definition: dmobject.c:503
void dmobject_init(struct dmobject *dmobj, const GUID *class, IUnknown *outer_unk)
Definition: dmobject.c:749
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
ULONG WINAPI dmobj_IPersistStream_Release(IPersistStream *iface)
Definition: dmobject.c:702
ULONG WINAPI dmobj_IDirectMusicObject_Release(IDirectMusicObject *iface)
Definition: dmobject.c:497
HRESULT dmobj_parsedescriptor(IStream *stream, const struct chunk_entry *riff, DMUS_OBJECTDESC *desc, DWORD supported)
Definition: dmobject.c:591
HRESULT WINAPI dmobj_IDirectMusicObject_QueryInterface(IDirectMusicObject *iface, REFIID riid, void **ret_iface)
Definition: dmobject.c:484
HRESULT WINAPI unimpl_IPersistStream_GetClassID(IPersistStream *iface, CLSID *class)
Definition: dmobject.c:723
HRESULT WINAPI unimpl_IPersistStream_GetSizeMax(IPersistStream *iface, ULARGE_INTEGER *size)
Definition: dmobject.c:742
HRESULT WINAPI dmobj_IDirectMusicObject_SetDescriptor(IDirectMusicObject *iface, DMUS_OBJECTDESC *desc)
Definition: dmobject.c:518
void dump_DMUS_OBJECTDESC(DMUS_OBJECTDESC *desc)
Definition: dmobject.c:222
const char * debugstr_chunk(const struct chunk_entry *chunk)
Definition: dmobject.c:279
ULONG WINAPI dmobj_IPersistStream_AddRef(IPersistStream *iface)
Definition: dmobject.c:696
const char * debugstr_dmguid(const GUID *id)
Definition: dmobject.c:36
HRESULT dmobj_parsereference(IStream *stream, const struct chunk_entry *list, IDirectMusicObject **dmobj)
Definition: dmobject.c:654
HRESULT WINAPI dmobj_IPersistStream_QueryInterface(IPersistStream *iface, REFIID riid, void **ret_iface)
Definition: dmobject.c:689
ULONG WINAPI dmobj_IDirectMusicObject_AddRef(IDirectMusicObject *iface)
Definition: dmobject.c:491
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
HRESULT WINAPI unimpl_IPersistStream_IsDirty(IPersistStream *iface)
Definition: dmobject.c:729
HRESULT stream_get_object(IStream *stream, DMUS_OBJECTDESC *desc, REFIID iid, void **ret_iface)
Definition: dmobject.c:462
HRESULT WINAPI unimpl_IPersistStream_Save(IPersistStream *iface, IStream *stream, BOOL clear_dirty)
Definition: dmobject.c:735
static HRESULT stream_reset_chunk_data(IStream *stream, const struct chunk_entry *chunk)
Definition: dmobject.h:50
#define DMUS_OBJ_NAME_INAM
Definition: dmobject.h:96
#define MAKE_IDTYPE(id, type)
Definition: dmobject.h:33
LONG MUSIC_TIME
Definition: dmplugin.h:95
#define IDirectMusicCollection_GetInstrument(p, a, b)
Definition: dmusicc.h:580
#define IDirectMusicPort_Release(p)
Definition: dmusicc.h:680
#define IDirectMusicDownloadedInstrument_Release(p)
Definition: dmusicc.h:552
#define IDirectMusicCollection_AddRef(p)
Definition: dmusicc.h:577
#define IDirectMusicCollection_Release(p)
Definition: dmusicc.h:578
#define IDirectMusicInstrument_Release(p)
Definition: dmusicc.h:527
#define IDirectMusicPort_UnloadInstrument(p, a)
Definition: dmusicc.h:686
#define DMUS_FOURCC_BAND_FORM
Definition: dmusicf.h:63
#define DMUS_FOURCC_GUID_CHUNK
Definition: dmusicf.h:42
#define DMUS_FOURCC_VERSION_CHUNK
Definition: dmusicf.h:51
#define DMUS_FOURCC_INSTRUMENT_CHUNK
Definition: dmusicf.h:66
#define DMUS_FOURCC_REF_LIST
Definition: dmusicf.h:102
#define DMUS_FOURCC_INSTRUMENTS_LIST
Definition: dmusicf.h:64
#define DMUS_FOURCC_UNFO_LIST
Definition: dmusicf.h:44
#define DMUS_FOURCC_INSTRUMENT_LIST
Definition: dmusicf.h:65
#define DMUS_OBJ_DATE
Definition: dmusici.h:273
#define IDirectMusicObject_QueryInterface(p, a, b)
Definition: dmusici.h:842
#define IDirectMusicBand_AddRef(p)
Definition: dmusici.h:814
#define IDirectMusicObject_Release(p)
Definition: dmusici.h:844
#define DMUS_SEG_ALLTRACKS
Definition: dmusici.h:317
#define IDirectMusicBand_QueryInterface(p, a, b)
Definition: dmusici.h:813
#define IDirectMusicPerformance_DownloadInstrument(p, a, b, c, d, e, f, g, h)
Definition: dmusici.h:1307
struct _DMUS_OBJECTDESC DMUS_OBJECTDESC
Definition: dmusici.h:570
#define DMUS_OBJ_NAME
Definition: dmusici.h:267
@ DMUS_PMSGF_MUSICTIME
Definition: dmusici.h:446
#define IDirectMusicSegment_SetParam(p, a, b, c, d, e)
Definition: dmusici.h:1026
#define IDirectMusicPerformance_SendPMsg(p, a)
Definition: dmusici.h:1289
#define DMUS_OBJ_CLASS
Definition: dmusici.h:266
#define IDirectMusicBand_Release(p)
Definition: dmusici.h:815
#define DMUS_OBJ_VERSION
Definition: dmusici.h:272
#define IDirectMusicPerformance_FreePMsg(p, a)
Definition: dmusici.h:1295
#define IDirectMusicGraph_StampPMsg(p, a)
Definition: dmusici.h:1474
#define DMUS_OBJ_CATEGORY
Definition: dmusici.h:268
#define DMUS_OBJ_OBJECT
Definition: dmusici.h:265
#define IDirectMusicPerformance_AllocPMsg(p, a, b)
Definition: dmusici.h:1294
@ DMUS_PMSGT_PATCH
Definition: dmusici.h:463
r parent
Definition: btrfs.c:3010
unsigned long DWORD
Definition: ntddk_ex.h:95
GLsizeiptr size
Definition: glext.h:5919
unsigned int UINT
Definition: sysinfo.c:13
REFIID riid
Definition: atlbase.h:39
#define S_OK
Definition: intsafe.h:52
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define FAILED(hr)
Definition: intsafe.h:51
uint32_t entry
Definition: isohybrid.c:63
if(dx< 0)
Definition: linetemp.h:194
__u16 time
Definition: mkdosfs.c:8
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define FOURCC_RIFF
Definition: mmsystem.h:564
#define FOURCC_LIST
Definition: mmsystem.h:565
D3D11_SHADER_VARIABLE_DESC desc
Definition: reflection.c:1683
long LONG
Definition: pedump.c:60
const GUID IID_IPersistStream
Definition: proxy.cpp:13
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
#define REFIID
Definition: guiddef.h:118
static unsigned __int64 next
Definition: rand_nt.c:6
#define calloc
Definition: rosglue.h:14
#define offsetof(TYPE, MEMBER)
static __inline const char * debugstr_fourcc(unsigned int cc)
Definition: debug.h:397
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:236
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
Definition: list.h:242
#define LIST_FOR_EACH_ENTRY_REV(elem, list, type, field)
Definition: list.h:260
#define TRACE(s)
Definition: solgame.cpp:4
MUSIC_TIME mtTimePhysical
Definition: dmusici.h:783
struct IDirectMusicBand * pBand
Definition: dmusici.h:784
DWORD dwNoteRanges[4]
Definition: dmusicf.h:672
short nPitchBendRange
Definition: dmusicf.h:679
DWORD dwChannelPriority
Definition: dmusicf.h:678
Definition: band.c:76
IDirectMusicCollection * collection
Definition: band.c:81
IDirectMusicBand IDirectMusicBand_iface
Definition: band.c:77
struct list instruments
Definition: band.c:80
LONG ref
Definition: band.c:79
struct dmobject dmobj
Definition: band.c:78
Definition: dmobject.h:26
FOURCC id
Definition: dmobject.h:27
FOURCC type
Definition: dmobject.h:29
uint16_t size
Definition: btrfs_drv.h:563
Definition: graph.c:32
Definition: band.c:43
DWORD patch
Definition: collection.c:29
IDirectMusicCollection * collection
Definition: band.c:46
IDirectMusicDownloadedInstrument * download
Definition: band.c:48
DMUS_IO_INSTRUMENT instrument
Definition: band.c:45
IDirectMusicPort * download_port
Definition: band.c:49
struct list entry
Definition: band.c:44
Definition: send.c:48
Definition: stat.h:66
Definition: parse.h:23
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint32_t ULONG
Definition: typedefs.h:59
#define WINAPI
Definition: msvc.h:6
#define E_NOINTERFACE
Definition: winerror.h:3479
#define E_POINTER
Definition: winerror.h:3480