ReactOS 0.4.17-dev-966-gf06eace
port.c
Go to the documentation of this file.
1/*
2 * IDirectMusicPort Implementation
3 *
4 * Copyright (C) 2003-2004 Rok Mandeljc
5 * Copyright (C) 2012 Christian Costa
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 */
21
22#include <assert.h>
23#include "dmusic_private.h"
24
26
28{
29 struct list entry;
30 IDirectMusicDownload *download;
33};
34
35struct synth_port {
36 IDirectMusicPort IDirectMusicPort_iface;
37 IDirectMusicPortDownload IDirectMusicPortDownload_iface;
38 IDirectMusicThru IDirectMusicThru_iface;
42 IDirectSound *dsound;
43 IDirectSoundBuffer *dsbuffer;
44 IDirectMusicSynth *synth;
45 IDirectMusicSynthSink *synth_sink;
50
53};
54
55static inline struct synth_port *synth_from_IDirectMusicPort(IDirectMusicPort *iface)
56{
58}
59
60static inline struct synth_port *synth_from_IDirectMusicPortDownload(IDirectMusicPortDownload *iface)
61{
63}
64
65static inline struct synth_port *synth_from_IDirectMusicThru(IDirectMusicThru *iface)
66{
68}
69
70static inline struct synth_port *synth_from_IKsControl(IKsControl *iface)
71{
72 return CONTAINING_RECORD(iface, struct synth_port, IKsControl_iface);
73}
74
75static HRESULT WINAPI synth_port_QueryInterface(IDirectMusicPort *iface, REFIID riid, void **ret_iface)
76{
78
79 TRACE("(%p, %s, %p)\n", iface, debugstr_dmguid(riid), ret_iface);
80
81 if (IsEqualIID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicPort))
82 *ret_iface = &This->IDirectMusicPort_iface;
83 else if (IsEqualGUID(riid, &IID_IDirectMusicPortDownload))
84 *ret_iface = &This->IDirectMusicPortDownload_iface;
85 else if (IsEqualGUID(riid, &IID_IDirectMusicThru))
86 *ret_iface = &This->IDirectMusicThru_iface;
88 *ret_iface = &This->IKsControl_iface;
89 else {
90 WARN("(%p, %s, %p): not found\n", This, debugstr_dmguid(riid), ret_iface);
91 *ret_iface = NULL;
92 return E_NOINTERFACE;
93 }
94
95 IUnknown_AddRef((IUnknown*)*ret_iface);
96
97 return S_OK;
98}
99
100static ULONG WINAPI synth_port_AddRef(IDirectMusicPort *iface)
101{
104
105 TRACE("(%p): new ref = %lu\n", This, ref);
106
107 return ref;
108}
109
110static ULONG WINAPI synth_port_Release(IDirectMusicPort *iface)
111{
114
115 TRACE("(%p): new ref = %lu\n", This, ref);
116
117 if (!ref)
118 {
119 struct download_entry *entry, *next;
120
122 {
123 list_remove(&entry->entry);
125 free(entry);
126 }
127
128 dmusic_remove_port(This->parent, iface);
133 if (This->dsbuffer)
135 if (This->dsound)
136 IDirectSound_Release(This->dsound);
137 free(This);
138 }
139
140 return ref;
141}
142
143static HRESULT WINAPI synth_port_PlayBuffer(IDirectMusicPort *iface, IDirectMusicBuffer *buffer)
144{
146 HRESULT hr;
148 LPBYTE data;
149 DWORD size;
150
151 TRACE("(%p, %p)\n", iface, buffer);
152
153 if (!buffer)
154 return E_POINTER;
155
157
158 if (SUCCEEDED(hr))
160
161 if (SUCCEEDED(hr))
163
164 if (SUCCEEDED(hr))
166
167 return hr;
168}
169
171{
172 TRACE("(%p, %p): method not implemented\n", iface, event);
173 return E_NOTIMPL;
174}
175
176static HRESULT WINAPI synth_port_Read(IDirectMusicPort *iface, IDirectMusicBuffer *buffer)
177{
178 TRACE("(%p, %p): method not implemented\n", iface, buffer);
179 return E_NOTIMPL;
180}
181
182static HRESULT WINAPI synth_port_DownloadInstrument(IDirectMusicPort *iface, IDirectMusicInstrument *instrument,
183 IDirectMusicDownloadedInstrument **downloaded_instrument, DMUS_NOTERANGE *note_ranges, DWORD num_note_ranges)
184{
186
187 TRACE("(%p, %p, %p, %p, %ld)\n", iface, instrument, downloaded_instrument, note_ranges, num_note_ranges);
188
189 if (!instrument || !downloaded_instrument || (num_note_ranges && !note_ranges))
190 return E_POINTER;
191
192 return instrument_download_to_port(instrument, &This->IDirectMusicPortDownload_iface, downloaded_instrument);
193}
194
195static HRESULT WINAPI synth_port_UnloadInstrument(IDirectMusicPort *iface,
196 IDirectMusicDownloadedInstrument *downloaded_instrument)
197{
199
200 TRACE("(%p, %p)\n", iface, downloaded_instrument);
201
202 if (!downloaded_instrument)
203 return E_POINTER;
204
205 return instrument_unload_from_port(downloaded_instrument, &This->IDirectMusicPortDownload_iface);
206}
207
209{
211
212 TRACE("(%p, %p)\n", iface, clock);
213
215}
216
217static HRESULT WINAPI synth_port_GetRunningStats(IDirectMusicPort *iface, DMUS_SYNTHSTATS *stats)
218{
220
221 FIXME("(%p/%p)->(%p): stub\n", iface, This, stats);
222
223 return S_OK;
224}
225
226static HRESULT WINAPI synth_port_Compact(IDirectMusicPort *iface)
227{
228 TRACE("(%p): method not implemented\n", iface);
229 return E_NOTIMPL;
230}
231
232static HRESULT WINAPI synth_port_GetCaps(IDirectMusicPort *iface, DMUS_PORTCAPS *port_caps)
233{
235
236 TRACE("(%p, %p)\n", iface, port_caps);
237
238 return IDirectMusicSynth_GetPortCaps(This->synth, port_caps);
239}
240
241static HRESULT WINAPI synth_port_DeviceIoControl(IDirectMusicPort *iface, DWORD io_control_code,
242 void *in_buffer, DWORD in_buffer_size, void *out_buffer, DWORD out_buffer_size,
243 DWORD *bytes_returned, OVERLAPPED *overlapped)
244{
246
247 FIXME("(%p/%p, %ld, %p, %ld, %p, %ld, %p, %p): stub\n", iface, This, io_control_code, in_buffer, in_buffer_size, out_buffer, out_buffer_size, bytes_returned, overlapped);
248
249 return S_OK;
250}
251
252static HRESULT WINAPI synth_port_SetNumChannelGroups(IDirectMusicPort *iface, DWORD channel_groups)
253{
255
256 FIXME("(%p, %ld): semi-stub\n", iface, channel_groups);
257
258 This->nrofgroups = channel_groups;
259
260 return S_OK;
261}
262
263static HRESULT WINAPI synth_port_GetNumChannelGroups(IDirectMusicPort *iface, DWORD *channel_groups)
264{
266
267 TRACE("(%p, %p)\n", iface, channel_groups);
268
269 *channel_groups = This->nrofgroups;
270
271 return S_OK;
272}
273
274static HRESULT WINAPI synth_port_Activate(IDirectMusicPort *iface, BOOL active)
275{
277 HRESULT hr;
278
279 TRACE("(%p/%p)->(%d)\n", iface, This, active);
280
281 if (This->active == active) return S_FALSE;
282
283 if (active)
284 {
285 if (!This->dsound && FAILED(hr = IDirectMusicPort_SetDirectSound(iface,
286 This->parent->dsound, NULL)))
287 return hr;
289 This->dsound, This->dsbuffer)))
290 return hr;
291
293 return hr;
294 This->active = TRUE;
295 }
296 else
297 {
298 if (FAILED(hr = IDirectMusicSynth_Activate(This->synth, FALSE))) return hr;
299 This->active = FALSE;
300
302 return hr;
304 }
305
306 return hr;
307}
308
309static HRESULT WINAPI synth_port_SetChannelPriority(IDirectMusicPort *iface, DWORD channel_group,
311{
313
314 FIXME("(%p/%p, %ld, %ld, %ld): semi-stub\n", iface, This, channel_group, channel, priority);
315
316 if (channel > 16)
317 {
318 WARN("isn't there supposed to be 16 channels (no. %ld requested)?! (faking as it is ok)\n", channel);
319 /*return E_INVALIDARG;*/
320 }
321
322 return S_OK;
323}
324
325static HRESULT WINAPI synth_port_GetChannelPriority(IDirectMusicPort *iface, DWORD channel_group,
327{
329
330 TRACE("(%p, %lu, %lu, %p)\n", iface, channel_group, channel, priority);
331
332 *priority = This->group[channel_group - 1].channel[channel].priority;
333
334 return S_OK;
335}
336
337static HRESULT WINAPI synth_port_SetDirectSound(IDirectMusicPort *iface, IDirectSound *dsound,
338 IDirectSoundBuffer *dsbuffer)
339{
341
342 FIXME("(%p/%p)->(%p, %p): semi-stub\n", iface, This, dsound, dsbuffer);
343
344 if (This->active)
346
347 if (This->dsound) {
348 if (This->dsound != This->parent->dsound)
349 ERR("Not the same dsound in the port (%p) and parent dmusic (%p), expect trouble!\n",
350 This->dsound, This->parent->dsound);
351 if (!IDirectSound_Release(This->parent->dsound))
352 This->parent->dsound = NULL;
353 }
354 if (This->dsbuffer)
356
357 This->dsound = dsound;
358 This->dsbuffer = dsbuffer;
359
360 if (This->dsound)
361 IDirectSound_AddRef(This->dsound);
362 if (This->dsbuffer)
364
365 return S_OK;
366}
367
368static HRESULT WINAPI synth_port_GetFormat(IDirectMusicPort *iface, WAVEFORMATEX *format,
369 DWORD *fmtsize, DWORD *bufsize)
370{
372 HRESULT hr;
373
374 TRACE("(%p, %p, %p, %p)\n", This, format, fmtsize, bufsize);
375
376 if (FAILED(hr = IDirectMusicSynth_GetFormat(This->synth, format, fmtsize)))
377 return hr;
378
379 if (bufsize)
381
382 return hr;
383}
384
385static const IDirectMusicPortVtbl synth_port_vtbl = {
386 /**** IDirectMusicPort IUnknown part methods ***/
390 /**** IDirectMusicPort methods ***/
408};
409
410static HRESULT WINAPI synth_port_download_QueryInterface(IDirectMusicPortDownload *iface, REFIID riid, void **ret_iface)
411{
413
414 TRACE("(%p, %s, %p)\n", iface, debugstr_dmguid(riid), ret_iface);
415
416 return IDirectMusicPort_QueryInterface(&This->IDirectMusicPort_iface, riid, ret_iface);
417}
418
419static ULONG WINAPI synth_port_download_AddRef(IDirectMusicPortDownload *iface)
420{
422
423 TRACE("(%p)\n", iface);
424
425 return IDirectMusicPort_AddRef(&This->IDirectMusicPort_iface);
426}
427
428static ULONG WINAPI synth_port_download_Release(IDirectMusicPortDownload *iface)
429{
431
432 TRACE("(%p)\n", iface);
433
434 return IDirectMusicPort_Release(&This->IDirectMusicPort_iface);
435}
436
437static HRESULT WINAPI synth_port_download_GetBuffer(IDirectMusicPortDownload *iface, DWORD id,
438 IDirectMusicDownload **download)
439{
441 struct download_entry *entry;
442
443 TRACE("(%p/%p, %lu, %p)\n", iface, This, id, download);
444
445 if (!download) return E_POINTER;
446 if (id >= This->next_dlid) return DMUS_E_INVALID_DOWNLOADID;
447
448 LIST_FOR_EACH_ENTRY(entry, &This->downloads, struct download_entry, entry)
449 {
450 if (entry->id == id)
451 {
452 *download = entry->download;
454 return S_OK;
455 }
456 }
457
459}
460
461static HRESULT WINAPI synth_port_download_AllocateBuffer(IDirectMusicPortDownload *iface, DWORD size,
462 IDirectMusicDownload **download)
463{
465
466 TRACE("(%p/%p, %lu, %p)\n", iface, This, size, download);
467
468 if (!download) return E_POINTER;
469 if (!size) return E_INVALIDARG;
470
472}
473
474static HRESULT WINAPI synth_port_download_GetDLId(IDirectMusicPortDownload *iface, DWORD *first, DWORD count)
475{
477
478 TRACE("(%p/%p, %p, %lu)\n", iface, This, first, count);
479
480 if (!first) return E_POINTER;
481 if (!count) return E_INVALIDARG;
482
483 *first = This->next_dlid;
484 This->next_dlid += count;
485
486 return S_OK;
487}
488
489static HRESULT WINAPI synth_port_download_GetAppend(IDirectMusicPortDownload *iface, DWORD *append)
490{
492
493 FIXME("(%p/%p)->(%p): stub\n", iface, This, append);
494
495 return S_OK;
496}
497
498static HRESULT WINAPI synth_port_download_Download(IDirectMusicPortDownload *iface, IDirectMusicDownload *download)
499{
501 struct download_entry *entry;
504 BOOL can_free;
505 DWORD size;
506 HRESULT hr;
507
508 TRACE("(%p/%p)->(%p)\n", iface, This, download);
509
510 if (!download) return E_POINTER;
511
512 LIST_FOR_EACH_ENTRY(entry, &This->downloads, struct download_entry, entry)
513 if (entry->download == download) return DMUS_E_ALREADY_DOWNLOADED;
514
515 if (!(entry = malloc(sizeof(*entry)))) return E_OUTOFMEMORY;
517 && SUCCEEDED(hr = IDirectMusicSynth_Download(This->synth, &handle, info, &can_free)))
518 {
519 entry->download = download;
521 entry->id = info->dwDLId;
522 entry->handle = handle;
523 list_add_tail(&This->downloads, &entry->entry);
524 }
525
526 if (FAILED(hr)) free(entry);
527 return hr;
528}
529
530static HRESULT WINAPI synth_port_download_Unload(IDirectMusicPortDownload *iface, IDirectMusicDownload *download)
531{
533 struct download_entry *entry;
534 HANDLE handle = 0;
535
536 TRACE("(%p/%p)->(%p)\n", iface, This, download);
537
538 if (!download) return E_POINTER;
539
540 LIST_FOR_EACH_ENTRY(entry, &This->downloads, struct download_entry, entry)
541 {
542 if (entry->download == download)
543 {
544 list_remove(&entry->entry);
546 handle = entry->handle;
547 free(entry);
548 break;
549 }
550 }
551
552 if (!handle) return S_OK;
553 return IDirectMusicSynth_Unload(This->synth, handle, NULL, NULL);
554}
555
556static const IDirectMusicPortDownloadVtbl synth_port_download_vtbl = {
557 /*** IDirectMusicPortDownload IUnknown part methods ***/
561 /*** IDirectMusicPortDownload methods ***/
568};
569
570static HRESULT WINAPI synth_port_thru_QueryInterface(IDirectMusicThru *iface, REFIID riid, void **ret_iface)
571{
573
574 TRACE("(%p, %s, %p)\n", iface, debugstr_dmguid(riid), ret_iface);
575
576 return IDirectMusicPort_QueryInterface(&This->IDirectMusicPort_iface, riid, ret_iface);
577}
578
579static ULONG WINAPI synth_port_thru_AddRef(IDirectMusicThru *iface)
580{
582
583 TRACE("(%p)\n", iface);
584
585 return IDirectMusicPort_AddRef(&This->IDirectMusicPort_iface);
586}
587
588static ULONG WINAPI synth_port_thru_Release(IDirectMusicThru *iface)
589{
591
592 TRACE("(%p)\n", iface);
593
594 return IDirectMusicPort_Release(&This->IDirectMusicPort_iface);
595}
596
597static HRESULT WINAPI synth_port_thru_ThruChannel(IDirectMusicThru *iface, DWORD source_channel_group,
598 DWORD source_channel, DWORD destination_channel_group, DWORD destination_channel,
599 IDirectMusicPort *destination_port)
600{
602
603 FIXME("(%p/%p, %ld, %ld, %ld, %ld, %p): stub\n", iface, This, source_channel_group, source_channel, destination_channel_group, destination_channel, destination_port);
604
605 return S_OK;
606}
607
608static const IDirectMusicThruVtbl synth_port_thru_vtbl = {
609 /*** IDirectMusicThru IUnknown part methods */
613 /*** IDirectMusicThru methods ***/
615};
616
618 void **ret_iface)
619{
620 struct synth_port *This = synth_from_IKsControl(iface);
621
622 return IDirectMusicPort_QueryInterface(&This->IDirectMusicPort_iface, riid, ret_iface);
623}
624
626{
627 struct synth_port *This = synth_from_IKsControl(iface);
628
629 return IDirectMusicPort_AddRef(&This->IDirectMusicPort_iface);
630}
631
633{
634 struct synth_port *This = synth_from_IKsControl(iface);
635
636 return IDirectMusicPort_Release(&This->IDirectMusicPort_iface);
637}
638
640 ULONG prop_len, void *data, ULONG data_len, ULONG *ret_len)
641{
642 TRACE("(%p, %p, %lu, %p, %lu, %p)\n", iface, prop, prop_len, data, data_len, ret_len);
643 TRACE("prop = %s - %lu - %lu\n", debugstr_guid(&prop->Set), prop->Id, prop->Flags);
644
645 if (prop->Flags != KSPROPERTY_TYPE_GET)
646 {
647 FIXME("prop flags %lu not yet supported\n", prop->Flags);
648 return S_FALSE;
649 }
650
651 if (data_len < sizeof(DWORD))
653
654 FIXME("Unknown property %s\n", debugstr_guid(&prop->Set));
655 *(DWORD*)data = FALSE;
656 *ret_len = sizeof(DWORD);
657
658 return S_OK;
659}
660
662 ULONG method_len, void *data, ULONG data_len, ULONG *ret_len)
663{
664 FIXME("(%p, %p, %lu, %p, %lu, %p): stub\n", iface, method, method_len, data, data_len, ret_len);
665
666 return E_NOTIMPL;
667}
668
670 void *data, ULONG data_len, ULONG *ret_len)
671{
672 FIXME("(%p, %p, %lu, %p, %lu, %p): stub\n", iface, event, event_len, data, data_len, ret_len);
673
674 return E_NOTIMPL;
675}
676
677static const IKsControlVtbl ikscontrol_vtbl = {
684};
685
687 DMUS_PORTCAPS *port_caps, IDirectMusicPort **port)
688{
689 struct synth_port *obj;
690 HRESULT hr = E_FAIL;
691 int i;
692
693 TRACE("(%p, %p)\n", port_params, port);
694
695 *port = NULL;
696
697 obj = calloc(1, sizeof(*obj));
698 if (!obj)
699 return E_OUTOFMEMORY;
700
701 obj->IDirectMusicPort_iface.lpVtbl = &synth_port_vtbl;
702 obj->IDirectMusicPortDownload_iface.lpVtbl = &synth_port_download_vtbl;
703 obj->IDirectMusicThru_iface.lpVtbl = &synth_port_thru_vtbl;
704 obj->IKsControl_iface.lpVtbl = &ikscontrol_vtbl;
705 obj->ref = 1;
706 obj->parent = parent;
707 obj->active = FALSE;
708 obj->params = *port_params;
709 list_init(&obj->downloads);
710
711 hr = CoCreateInstance(&CLSID_DirectMusicSynth, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusicSynth,
712 (void **)&obj->synth);
713
714 if (SUCCEEDED(hr))
715 hr = CoCreateInstance(&CLSID_DirectMusicSynthSink, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusicSynthSink, (void**)&obj->synth_sink);
716
717 if (SUCCEEDED(hr))
718 hr = IDirectMusicSynth_SetSynthSink(obj->synth, obj->synth_sink);
719
720 if (SUCCEEDED(hr))
721 hr = IDirectMusicSynth_SetMasterClock(obj->synth, obj->parent->master_clock);
722
723 if (SUCCEEDED(hr))
724 hr = IDirectMusicSynthSink_SetMasterClock(obj->synth_sink, obj->parent->master_clock);
725
726 if (SUCCEEDED(hr))
727 hr = IDirectMusicSynth_Open(obj->synth, port_params);
728
729 if (0)
730 {
731 if (port_params->dwValidParams & DMUS_PORTPARAMS_CHANNELGROUPS) {
732 obj->nrofgroups = port_params->dwChannelGroups;
733 /* Setting default priorities */
734 for (i = 0; i < obj->nrofgroups; i++) {
735 TRACE ("Setting default channel priorities on channel group %i\n", i + 1);
736 obj->group[i].channel[0].priority = DAUD_CHAN1_DEF_VOICE_PRIORITY;
737 obj->group[i].channel[1].priority = DAUD_CHAN2_DEF_VOICE_PRIORITY;
738 obj->group[i].channel[2].priority = DAUD_CHAN3_DEF_VOICE_PRIORITY;
739 obj->group[i].channel[3].priority = DAUD_CHAN4_DEF_VOICE_PRIORITY;
740 obj->group[i].channel[4].priority = DAUD_CHAN5_DEF_VOICE_PRIORITY;
741 obj->group[i].channel[5].priority = DAUD_CHAN6_DEF_VOICE_PRIORITY;
742 obj->group[i].channel[6].priority = DAUD_CHAN7_DEF_VOICE_PRIORITY;
743 obj->group[i].channel[7].priority = DAUD_CHAN8_DEF_VOICE_PRIORITY;
744 obj->group[i].channel[8].priority = DAUD_CHAN9_DEF_VOICE_PRIORITY;
745 obj->group[i].channel[9].priority = DAUD_CHAN10_DEF_VOICE_PRIORITY;
746 obj->group[i].channel[10].priority = DAUD_CHAN11_DEF_VOICE_PRIORITY;
747 obj->group[i].channel[11].priority = DAUD_CHAN12_DEF_VOICE_PRIORITY;
748 obj->group[i].channel[12].priority = DAUD_CHAN13_DEF_VOICE_PRIORITY;
749 obj->group[i].channel[13].priority = DAUD_CHAN14_DEF_VOICE_PRIORITY;
750 obj->group[i].channel[14].priority = DAUD_CHAN15_DEF_VOICE_PRIORITY;
751 obj->group[i].channel[15].priority = DAUD_CHAN16_DEF_VOICE_PRIORITY;
752 }
753 }
754 }
755
756 if (SUCCEEDED(hr)) {
757 *port = &obj->IDirectMusicPort_iface;
758 return S_OK;
759 }
760
761 if (obj->synth)
763 if (obj->synth_sink)
765 free(obj);
766
767 return hr;
768}
769
770struct midi_port {
771 IDirectMusicPort IDirectMusicPort_iface;
772 IDirectMusicThru IDirectMusicThru_iface;
775};
776
777static inline struct midi_port *impl_from_IDirectMusicPort(IDirectMusicPort *iface)
778{
780}
781
783 void **ret_iface)
784{
786
787 TRACE("(%p, %s, %p)\n", iface, debugstr_dmguid(riid), ret_iface);
788
789 if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IDirectMusicPort))
790 *ret_iface = iface;
791 else if (IsEqualIID(riid, &IID_IDirectMusicThru))
792 *ret_iface = &This->IDirectMusicThru_iface;
793 else {
794 WARN("no interface for %s\n", debugstr_dmguid(riid));
795 *ret_iface = NULL;
796 return E_NOINTERFACE;
797 }
798
799 IUnknown_AddRef((IUnknown *)*ret_iface);
800
801 return S_OK;
802}
803
804static ULONG WINAPI midi_IDirectMusicPort_AddRef(IDirectMusicPort *iface)
805{
808
809 TRACE("(%p) ref = %lu\n", iface, ref);
810
811 return ref;
812}
813
814static ULONG WINAPI midi_IDirectMusicPort_Release(IDirectMusicPort *iface)
815{
818
819 TRACE("(%p) ref = %lu\n", iface, ref);
820
821 if (!ref) {
822 if (This->clock)
823 IReferenceClock_Release(This->clock);
824 free(This);
825 }
826
827 return ref;
828}
829
830static HRESULT WINAPI midi_IDirectMusicPort_PlayBuffer(IDirectMusicPort *iface,
831 IDirectMusicBuffer *buffer)
832{
833 FIXME("(%p, %p) stub!\n", iface, buffer);
834
835 return E_NOTIMPL;
836}
837
840{
841 FIXME("(%p, %p) stub!\n", iface, event);
842
843 return S_OK;
844}
845
846static HRESULT WINAPI midi_IDirectMusicPort_Read(IDirectMusicPort *iface,
847 IDirectMusicBuffer *buffer)
848{
849 FIXME("(%p, %p) stub!\n", iface, buffer);
850
851 return E_NOTIMPL;
852}
853
855 IDirectMusicInstrument *instrument, IDirectMusicDownloadedInstrument **downloaded,
856 DMUS_NOTERANGE *ranges, DWORD num_ranges)
857{
858 FIXME("(%p, %p, %p, %p, %lu) stub!\n", iface, instrument, downloaded, ranges, num_ranges);
859
860 return E_NOTIMPL;
861}
862
864 IDirectMusicDownloadedInstrument *downloaded)
865{
866 FIXME("(%p, %p) stub!\n", iface, downloaded);
867
868 return E_NOTIMPL;
869}
870
873{
875
876 TRACE("(%p, %p)\n", iface, clock);
877
878 if (!clock)
879 return E_POINTER;
880
881 *clock = This->clock;
882 IReferenceClock_AddRef(*clock);
883
884 return S_OK;
885}
886
888 DMUS_SYNTHSTATS *stats)
889{
890 FIXME("(%p, %p) stub!\n", iface, stats);
891
892 return E_NOTIMPL;
893}
894
895static HRESULT WINAPI midi_IDirectMusicPort_Compact(IDirectMusicPort *iface)
896{
897 FIXME("(%p) stub!\n", iface);
898
899 return E_NOTIMPL;
900}
901
902static HRESULT WINAPI midi_IDirectMusicPort_GetCaps(IDirectMusicPort *iface, DMUS_PORTCAPS *caps)
903{
904 FIXME("(%p, %p) stub!\n", iface, caps);
905
906 return E_NOTIMPL;
907}
908
910 DWORD io_control_code, void *in, DWORD size_in, void *out, DWORD size_out, DWORD *ret_len,
912{
913 FIXME("(%p, %lu, %p, %lu, %p, %lu, %p, %p) stub!\n", iface, io_control_code, in, size_in, out
914 , size_out, ret_len, overlapped);
915
916 return E_NOTIMPL;
917}
918
920 DWORD cgroups)
921{
922 FIXME("(%p, %lu) stub!\n", iface, cgroups);
923
924 return E_NOTIMPL;
925}
926
928 DWORD *cgroups)
929{
930 FIXME("(%p, %p) stub!\n", iface, cgroups);
931
932 return E_NOTIMPL;
933}
934
935static HRESULT WINAPI midi_IDirectMusicPort_Activate(IDirectMusicPort *iface, BOOL active)
936{
937 FIXME("(%p, %u) stub!\n", iface, active);
938
939 return S_OK;
940}
941
943 DWORD channel_group, DWORD channel, DWORD priority)
944{
945 FIXME("(%p, %lu, %lu, %lu) stub!\n", iface, channel_group, channel, priority);
946
947 return E_NOTIMPL;
948}
949
951 DWORD channel_group, DWORD channel, DWORD *priority)
952{
953 FIXME("(%p, %lu, %lu, %p) stub!\n", iface, channel_group, channel, priority);
954
955 return E_NOTIMPL;
956}
957
959 IDirectSound *dsound, IDirectSoundBuffer *dsbuffer)
960{
961 FIXME("(%p, %p, %p) stub!\n", iface, dsound, dsbuffer);
962
963 return E_NOTIMPL;
964}
965
968{
969 FIXME("(%p, %p, %p, %p) stub!\n", iface, format, format_size, buffer_size);
970
971 return E_NOTIMPL;
972}
973
974static const IDirectMusicPortVtbl midi_port_vtbl = {
995};
996
997static inline struct midi_port *impl_from_IDirectMusicThru(IDirectMusicThru *iface)
998{
1000}
1001
1003 void **ret_iface)
1004{
1005 struct midi_port *This = impl_from_IDirectMusicThru(iface);
1006
1007 return IDirectMusicPort_QueryInterface(&This->IDirectMusicPort_iface, riid, ret_iface);
1008}
1009
1010static ULONG WINAPI midi_IDirectMusicThru_AddRef(IDirectMusicThru *iface)
1011{
1012 struct midi_port *This = impl_from_IDirectMusicThru(iface);
1013
1014 return IDirectMusicPort_AddRef(&This->IDirectMusicPort_iface);
1015}
1016
1017static ULONG WINAPI midi_IDirectMusicThru_Release(IDirectMusicThru *iface)
1018{
1019 struct midi_port *This = impl_from_IDirectMusicThru(iface);
1020
1021 return IDirectMusicPort_Release(&This->IDirectMusicPort_iface);
1022}
1023
1024static HRESULT WINAPI midi_IDirectMusicThru_ThruChannel(IDirectMusicThru *iface, DWORD src_group,
1025 DWORD src_channel, DWORD dest_group, DWORD dest_channel, IDirectMusicPort *dest_port)
1026{
1027 FIXME("(%p, %lu, %lu, %lu, %lu, %p) stub!\n", iface, src_group, src_channel, dest_group,
1028 dest_channel, dest_port);
1029
1030 return S_OK;
1031}
1032
1033static const IDirectMusicThruVtbl midi_thru_vtbl = {
1038};
1039
1041 DMUS_PORTCAPS *caps, IDirectMusicPort **port)
1042{
1043 struct midi_port *obj;
1044 HRESULT hr;
1045
1046 if (!(obj = calloc(1, sizeof(*obj))))
1047 return E_OUTOFMEMORY;
1048
1049 obj->IDirectMusicPort_iface.lpVtbl = &midi_port_vtbl;
1050 obj->IDirectMusicThru_iface.lpVtbl = &midi_thru_vtbl;
1051 obj->ref = 1;
1052
1053 hr = DMUSIC_CreateReferenceClockImpl(&IID_IReferenceClock, (void **)&obj->clock, NULL);
1054 if (hr != S_OK) {
1055 free(obj);
1056 return hr;
1057 }
1058
1059 *port = &obj->IDirectMusicPort_iface;
1060
1061 return S_OK;
1062}
1063
1065 DMUS_PORTCAPS *caps, IDirectMusicPort **port)
1066{
1067 TRACE("(%p, %p, %p, %p)\n", parent, params, caps, port);
1068
1069 return midi_port_create(parent, params, caps, port);
1070}
1071
1073 DMUS_PORTCAPS *caps, IDirectMusicPort **port)
1074{
1075 TRACE("(%p, %p, %p, %p)\n", parent, params, caps, port);
1076
1077 return midi_port_create(parent, params, caps, port);
1078}
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
#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
#define ERR(fmt,...)
Definition: precomp.h:57
const GUID IID_IUnknown
Definition: list.h:39
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_INVALIDARG
Definition: ddrawi.h:101
#define E_NOTIMPL
Definition: ddrawi.h:99
#define E_FAIL
Definition: ddrawi.h:102
#define free
Definition: debug_ros.c:5
#define malloc
Definition: debug_ros.c:4
HRESULT hr
Definition: delayimp.cpp:582
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
HRESULT DMUSIC_CreateReferenceClockImpl(LPCGUID riid, LPVOID *ret_iface, LPUNKNOWN unkouter)
Definition: clock.c:116
static ULONG WINAPI synth_port_Release(IDirectMusicPort *iface)
Definition: port.c:110
static HRESULT WINAPI midi_IDirectMusicThru_QueryInterface(IDirectMusicThru *iface, REFIID riid, void **ret_iface)
Definition: port.c:1002
static HRESULT WINAPI IKsControlImpl_KsMethod(IKsControl *iface, KSMETHOD *method, ULONG method_len, void *data, ULONG data_len, ULONG *ret_len)
Definition: port.c:661
static HRESULT WINAPI midi_IDirectMusicPort_DeviceIoControl(IDirectMusicPort *iface, DWORD io_control_code, void *in, DWORD size_in, void *out, DWORD size_out, DWORD *ret_len, OVERLAPPED *overlapped)
Definition: port.c:909
static const IDirectMusicPortDownloadVtbl synth_port_download_vtbl
Definition: port.c:556
static HRESULT WINAPI midi_IDirectMusicPort_SetChannelPriority(IDirectMusicPort *iface, DWORD channel_group, DWORD channel, DWORD priority)
Definition: port.c:942
static HRESULT WINAPI midi_IDirectMusicPort_GetRunningStats(IDirectMusicPort *iface, DMUS_SYNTHSTATS *stats)
Definition: port.c:887
static HRESULT WINAPI synth_port_download_GetDLId(IDirectMusicPortDownload *iface, DWORD *first, DWORD count)
Definition: port.c:474
static ULONG WINAPI midi_IDirectMusicThru_Release(IDirectMusicThru *iface)
Definition: port.c:1017
static HRESULT WINAPI synth_port_GetCaps(IDirectMusicPort *iface, DMUS_PORTCAPS *port_caps)
Definition: port.c:232
static struct synth_port * synth_from_IKsControl(IKsControl *iface)
Definition: port.c:70
static ULONG WINAPI synth_port_thru_AddRef(IDirectMusicThru *iface)
Definition: port.c:579
static HRESULT WINAPI synth_port_SetReadNotificationHandle(IDirectMusicPort *iface, HANDLE event)
Definition: port.c:170
static HRESULT WINAPI synth_port_SetDirectSound(IDirectMusicPort *iface, IDirectSound *dsound, IDirectSoundBuffer *dsbuffer)
Definition: port.c:337
static HRESULT WINAPI synth_port_download_QueryInterface(IDirectMusicPortDownload *iface, REFIID riid, void **ret_iface)
Definition: port.c:410
static ULONG WINAPI IKsControlImpl_Release(IKsControl *iface)
Definition: port.c:632
static const IDirectMusicThruVtbl synth_port_thru_vtbl
Definition: port.c:608
static HRESULT WINAPI synth_port_download_Download(IDirectMusicPortDownload *iface, IDirectMusicDownload *download)
Definition: port.c:498
static struct synth_port * synth_from_IDirectMusicPort(IDirectMusicPort *iface)
Definition: port.c:55
static HRESULT WINAPI midi_IDirectMusicPort_Compact(IDirectMusicPort *iface)
Definition: port.c:895
HRESULT synth_port_create(IDirectMusic8Impl *parent, DMUS_PORTPARAMS *port_params, DMUS_PORTCAPS *port_caps, IDirectMusicPort **port)
Definition: port.c:686
static ULONG WINAPI synth_port_download_Release(IDirectMusicPortDownload *iface)
Definition: port.c:428
static HRESULT WINAPI midi_IDirectMusicPort_GetCaps(IDirectMusicPort *iface, DMUS_PORTCAPS *caps)
Definition: port.c:902
static struct synth_port * synth_from_IDirectMusicThru(IDirectMusicThru *iface)
Definition: port.c:65
static HRESULT WINAPI synth_port_GetFormat(IDirectMusicPort *iface, WAVEFORMATEX *format, DWORD *fmtsize, DWORD *bufsize)
Definition: port.c:368
static HRESULT WINAPI synth_port_download_AllocateBuffer(IDirectMusicPortDownload *iface, DWORD size, IDirectMusicDownload **download)
Definition: port.c:461
static HRESULT WINAPI synth_port_PlayBuffer(IDirectMusicPort *iface, IDirectMusicBuffer *buffer)
Definition: port.c:143
static HRESULT WINAPI synth_port_GetChannelPriority(IDirectMusicPort *iface, DWORD channel_group, DWORD channel, DWORD *priority)
Definition: port.c:325
static HRESULT WINAPI synth_port_Compact(IDirectMusicPort *iface)
Definition: port.c:226
static HRESULT WINAPI midi_IDirectMusicPort_GetLatencyClock(IDirectMusicPort *iface, IReferenceClock **clock)
Definition: port.c:871
static HRESULT WINAPI synth_port_download_Unload(IDirectMusicPortDownload *iface, IDirectMusicDownload *download)
Definition: port.c:530
static HRESULT WINAPI synth_port_thru_QueryInterface(IDirectMusicThru *iface, REFIID riid, void **ret_iface)
Definition: port.c:570
static HRESULT WINAPI synth_port_Read(IDirectMusicPort *iface, IDirectMusicBuffer *buffer)
Definition: port.c:176
static ULONG WINAPI midi_IDirectMusicThru_AddRef(IDirectMusicThru *iface)
Definition: port.c:1010
static HRESULT WINAPI midi_IDirectMusicPort_GetFormat(IDirectMusicPort *iface, WAVEFORMATEX *format, DWORD *format_size, DWORD *buffer_size)
Definition: port.c:966
static HRESULT WINAPI midi_IDirectMusicThru_ThruChannel(IDirectMusicThru *iface, DWORD src_group, DWORD src_channel, DWORD dest_group, DWORD dest_channel, IDirectMusicPort *dest_port)
Definition: port.c:1024
static struct synth_port * synth_from_IDirectMusicPortDownload(IDirectMusicPortDownload *iface)
Definition: port.c:60
static struct midi_port * impl_from_IDirectMusicThru(IDirectMusicThru *iface)
Definition: port.c:997
static HRESULT WINAPI synth_port_thru_ThruChannel(IDirectMusicThru *iface, DWORD source_channel_group, DWORD source_channel, DWORD destination_channel_group, DWORD destination_channel, IDirectMusicPort *destination_port)
Definition: port.c:597
static HRESULT WINAPI synth_port_GetRunningStats(IDirectMusicPort *iface, DMUS_SYNTHSTATS *stats)
Definition: port.c:217
static HRESULT WINAPI midi_IDirectMusicPort_GetChannelPriority(IDirectMusicPort *iface, DWORD channel_group, DWORD channel, DWORD *priority)
Definition: port.c:950
static ULONG WINAPI synth_port_AddRef(IDirectMusicPort *iface)
Definition: port.c:100
static HRESULT WINAPI synth_port_SetNumChannelGroups(IDirectMusicPort *iface, DWORD channel_groups)
Definition: port.c:252
static ULONG WINAPI midi_IDirectMusicPort_AddRef(IDirectMusicPort *iface)
Definition: port.c:804
static ULONG WINAPI synth_port_download_AddRef(IDirectMusicPortDownload *iface)
Definition: port.c:419
static HRESULT WINAPI synth_port_QueryInterface(IDirectMusicPort *iface, REFIID riid, void **ret_iface)
Definition: port.c:75
static HRESULT WINAPI midi_IDirectMusicPort_Activate(IDirectMusicPort *iface, BOOL active)
Definition: port.c:935
static HRESULT WINAPI synth_port_GetNumChannelGroups(IDirectMusicPort *iface, DWORD *channel_groups)
Definition: port.c:263
static HRESULT WINAPI synth_port_SetChannelPriority(IDirectMusicPort *iface, DWORD channel_group, DWORD channel, DWORD priority)
Definition: port.c:309
HRESULT midi_out_port_create(IDirectMusic8Impl *parent, DMUS_PORTPARAMS *params, DMUS_PORTCAPS *caps, IDirectMusicPort **port)
Definition: port.c:1064
static const IDirectMusicPortVtbl synth_port_vtbl
Definition: port.c:385
static HRESULT WINAPI synth_port_DeviceIoControl(IDirectMusicPort *iface, DWORD io_control_code, void *in_buffer, DWORD in_buffer_size, void *out_buffer, DWORD out_buffer_size, DWORD *bytes_returned, OVERLAPPED *overlapped)
Definition: port.c:241
static ULONG WINAPI IKsControlImpl_AddRef(IKsControl *iface)
Definition: port.c:625
static HRESULT WINAPI midi_IDirectMusicPort_SetReadNotificationHandle(IDirectMusicPort *iface, HANDLE event)
Definition: port.c:838
static ULONG WINAPI synth_port_thru_Release(IDirectMusicThru *iface)
Definition: port.c:588
static HRESULT WINAPI midi_IDirectMusicPort_Read(IDirectMusicPort *iface, IDirectMusicBuffer *buffer)
Definition: port.c:846
static HRESULT WINAPI midi_IDirectMusicPort_SetDirectSound(IDirectMusicPort *iface, IDirectSound *dsound, IDirectSoundBuffer *dsbuffer)
Definition: port.c:958
static HRESULT WINAPI synth_port_Activate(IDirectMusicPort *iface, BOOL active)
Definition: port.c:274
static HRESULT WINAPI IKsControlImpl_KsProperty(IKsControl *iface, KSPROPERTY *prop, ULONG prop_len, void *data, ULONG data_len, ULONG *ret_len)
Definition: port.c:639
static HRESULT WINAPI midi_IDirectMusicPort_QueryInterface(IDirectMusicPort *iface, REFIID riid, void **ret_iface)
Definition: port.c:782
static HRESULT WINAPI synth_port_GetLatencyClock(IDirectMusicPort *iface, IReferenceClock **clock)
Definition: port.c:208
static HRESULT WINAPI IKsControlImpl_KsEvent(IKsControl *iface, KSEVENT *event, ULONG event_len, void *data, ULONG data_len, ULONG *ret_len)
Definition: port.c:669
static HRESULT WINAPI midi_IDirectMusicPort_SetNumChannelGroups(IDirectMusicPort *iface, DWORD cgroups)
Definition: port.c:919
static const IKsControlVtbl ikscontrol_vtbl
Definition: port.c:677
static HRESULT WINAPI midi_IDirectMusicPort_DownloadInstrument(IDirectMusicPort *iface, IDirectMusicInstrument *instrument, IDirectMusicDownloadedInstrument **downloaded, DMUS_NOTERANGE *ranges, DWORD num_ranges)
Definition: port.c:854
HRESULT midi_in_port_create(IDirectMusic8Impl *parent, DMUS_PORTPARAMS *params, DMUS_PORTCAPS *caps, IDirectMusicPort **port)
Definition: port.c:1072
static HRESULT WINAPI midi_IDirectMusicPort_GetNumChannelGroups(IDirectMusicPort *iface, DWORD *cgroups)
Definition: port.c:927
static const IDirectMusicPortVtbl midi_port_vtbl
Definition: port.c:974
static const IDirectMusicThruVtbl midi_thru_vtbl
Definition: port.c:1033
static HRESULT WINAPI synth_port_UnloadInstrument(IDirectMusicPort *iface, IDirectMusicDownloadedInstrument *downloaded_instrument)
Definition: port.c:195
static HRESULT midi_port_create(IDirectMusic8Impl *parent, DMUS_PORTPARAMS *params, DMUS_PORTCAPS *caps, IDirectMusicPort **port)
Definition: port.c:1040
static HRESULT WINAPI midi_IDirectMusicPort_UnloadInstrument(IDirectMusicPort *iface, IDirectMusicDownloadedInstrument *downloaded)
Definition: port.c:863
static HRESULT WINAPI IKsControlImpl_QueryInterface(IKsControl *iface, REFIID riid, void **ret_iface)
Definition: port.c:617
static struct midi_port * impl_from_IDirectMusicPort(IDirectMusicPort *iface)
Definition: port.c:777
static ULONG WINAPI midi_IDirectMusicPort_Release(IDirectMusicPort *iface)
Definition: port.c:814
static HRESULT WINAPI midi_IDirectMusicPort_PlayBuffer(IDirectMusicPort *iface, IDirectMusicBuffer *buffer)
Definition: port.c:830
static HRESULT WINAPI synth_port_DownloadInstrument(IDirectMusicPort *iface, IDirectMusicInstrument *instrument, IDirectMusicDownloadedInstrument **downloaded_instrument, DMUS_NOTERANGE *note_ranges, DWORD num_note_ranges)
Definition: port.c:182
static HRESULT WINAPI synth_port_download_GetAppend(IDirectMusicPortDownload *iface, DWORD *append)
Definition: port.c:489
static HRESULT WINAPI synth_port_download_GetBuffer(IDirectMusicPortDownload *iface, DWORD id, IDirectMusicDownload **download)
Definition: port.c:437
void format_size(uint64_t size, wstring &s, bool show_bytes)
Definition: main.cpp:65
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, IUnknown *outer, DWORD cls_context, REFIID riid, void **obj)
Definition: combase.c:1685
_ACRTIMP clock_t __cdecl clock(void)
Definition: time.c:698
USHORT port
Definition: uri.c:210
#define DMUS_E_INVALID_DOWNLOADID
Definition: dmerror.h:67
#define DMUS_E_ALREADY_DOWNLOADED
Definition: dmerror.h:69
#define DMUS_E_DSOUND_ALREADY_SET
Definition: dmerror.h:98
#define DMUS_E_NOT_DOWNLOADED_TO_PORT
Definition: dmerror.h:68
const char * debugstr_dmguid(const GUID *id)
Definition: dmobject.c:36
void dmusic_remove_port(IDirectMusic8Impl *dmusic, IDirectMusicPort *port)
Definition: dmusic.c:291
HRESULT instrument_unload_from_port(IDirectMusicDownloadedInstrument *iface, IDirectMusicPortDownload *port)
Definition: instrument.c:865
HRESULT instrument_download_to_port(IDirectMusicInstrument *iface, IDirectMusicPortDownload *port, IDirectMusicDownloadedInstrument **downloaded)
Definition: instrument.c:752
HRESULT download_create(DWORD size, IDirectMusicDownload **ret_iface)
Definition: download.c:106
#define IDirectMusicDownload_Release(p)
Definition: dmusicc.h:604
#define DMUS_PORTPARAMS_CHANNELGROUPS
Definition: dmusicc.h:206
#define IDirectMusicPort_SetDirectSound(p, a, b)
Definition: dmusicc.h:697
#define IDirectMusicPort_Release(p)
Definition: dmusicc.h:680
#define IDirectMusicBuffer_GetStartTime(p, a)
Definition: dmusicc.h:498
#define IDirectMusicDownload_AddRef(p)
Definition: dmusicc.h:603
#define IDirectMusicPort_AddRef(p)
Definition: dmusicc.h:679
#define IDirectMusicDownload_GetBuffer(p, a, b)
Definition: dmusicc.h:606
#define IDirectMusicBuffer_GetUsedBytes(p, a)
Definition: dmusicc.h:499
#define IDirectMusicBuffer_GetRawBufferPtr(p, a)
Definition: dmusicc.h:497
#define IDirectMusicPort_QueryInterface(p, a, b)
Definition: dmusicc.h:678
LONGLONG REFERENCE_TIME
Definition: dmusicks.h:9
#define IDirectMusicSynth_Unload(p, a, b, c)
Definition: dmusics.h:114
#define IDirectMusicSynth_Release(p)
Definition: dmusics.h:108
#define IDirectMusicSynthSink_GetDesiredBufferSize(p, a)
Definition: dmusics.h:234
#define IDirectMusicSynth_Close(p)
Definition: dmusics.h:111
#define IDirectMusicSynth_PlayBuffer(p, a, b, c)
Definition: dmusics.h:115
#define IDirectMusicSynth_SetSynthSink(p, a)
Definition: dmusics.h:121
#define IDirectMusicSynth_GetPortCaps(p, a)
Definition: dmusics.h:117
#define IDirectMusicSynthSink_Release(p)
Definition: dmusics.h:225
#define IDirectMusicSynth_GetFormat(p, a, b)
Definition: dmusics.h:125
#define IDirectMusicSynthSink_SetDirectSound(p, a, b)
Definition: dmusics.h:233
#define IDirectMusicSynth_Activate(p, a)
Definition: dmusics.h:120
#define IDirectMusicSynth_Open(p, a)
Definition: dmusics.h:110
#define IDirectMusicSynth_Download(p, a, b, c)
Definition: dmusics.h:113
#define IDirectMusicSynth_SetMasterClock(p, a)
Definition: dmusics.h:118
#define IDirectMusicSynthSink_SetMasterClock(p, a)
Definition: dmusics.h:228
#define IDirectMusicSynth8_GetLatencyClock(p, a)
Definition: dmusics.h:182
#define DAUD_CHAN16_DEF_VOICE_PRIORITY
Definition: dmusprop.h:182
#define DAUD_CHAN4_DEF_VOICE_PRIORITY
Definition: dmusprop.h:170
#define DAUD_CHAN13_DEF_VOICE_PRIORITY
Definition: dmusprop.h:179
#define DAUD_CHAN9_DEF_VOICE_PRIORITY
Definition: dmusprop.h:175
#define DAUD_CHAN14_DEF_VOICE_PRIORITY
Definition: dmusprop.h:180
#define DAUD_CHAN5_DEF_VOICE_PRIORITY
Definition: dmusprop.h:171
#define DAUD_CHAN7_DEF_VOICE_PRIORITY
Definition: dmusprop.h:173
#define DAUD_CHAN6_DEF_VOICE_PRIORITY
Definition: dmusprop.h:172
#define DAUD_CHAN10_DEF_VOICE_PRIORITY
Definition: dmusprop.h:176
#define DAUD_CHAN8_DEF_VOICE_PRIORITY
Definition: dmusprop.h:174
#define DAUD_CHAN3_DEF_VOICE_PRIORITY
Definition: dmusprop.h:169
#define DAUD_CHAN1_DEF_VOICE_PRIORITY
Definition: dmusprop.h:167
#define DAUD_CHAN2_DEF_VOICE_PRIORITY
Definition: dmusprop.h:168
#define DAUD_CHAN15_DEF_VOICE_PRIORITY
Definition: dmusprop.h:181
#define DAUD_CHAN11_DEF_VOICE_PRIORITY
Definition: dmusprop.h:177
#define DAUD_CHAN12_DEF_VOICE_PRIORITY
Definition: dmusprop.h:178
method
Definition: dragdrop.c:54
r parent
Definition: btrfs.c:3010
const GUID IID_IKsControl
Definition: filter.c:44
#define IDirectSoundBuffer_AddRef(p)
Definition: dsound.h:573
#define IDirectSound_AddRef(p)
Definition: dsound.h:452
#define IDirectSound_Release(p)
Definition: dsound.h:453
#define IDirectSoundBuffer_Release(p)
Definition: dsound.h:574
#define KSPROPERTY_TYPE_GET
Definition: dmksctrl.h:42
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLuint buffer
Definition: glext.h:5915
GLsizeiptr size
Definition: glext.h:5919
GLenum const GLfloat * params
Definition: glext.h:5645
GLuint in
Definition: glext.h:9616
GLboolean GLuint group
Definition: glext.h:11120
const GLint * first
Definition: glext.h:5794
GLenum GLuint GLsizei bufsize
Definition: glext.h:7473
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
static unsigned char * in_buffer
Definition: iccvid.c:86
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
#define debugstr_guid
Definition: kernel32.h:35
static void append(struct dump_context *dc, const void *data, unsigned size)
Definition: minidump.c:397
__u16 time
Definition: mkdosfs.c:8
static JOBOBJECTINFOCLASS LPVOID DWORD LPDWORD ret_len
Definition: process.c:81
static HANDLE PIO_APC_ROUTINE PVOID PIO_STATUS_BLOCK ULONG PVOID ULONG PVOID out_buffer
Definition: file.c:72
static int priority
Definition: timer.c:163
#define DWORD
Definition: nt_native.h:44
long LONG
Definition: pedump.c:60
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#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 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
namespace GUID const ADDRINFOEXW ADDRINFOEXW struct timeval OVERLAPPED * overlapped
Definition: sock.c:81
#define TRACE(s)
Definition: solgame.cpp:4
wchar_t const *const size_t const buffer_size
Definition: stat.cpp:95
ULONG Id
Definition: dmksctrl.h:77
ULONG Flags
Definition: dmksctrl.h:78
GUID Set
Definition: dmksctrl.h:76
DWORD dwValidParams
Definition: dmusicc.h:316
DWORD dwChannelGroups
Definition: dmusicc.h:318
Definition: port.c:28
DWORD id
Definition: port.c:32
HANDLE handle
Definition: port.c:31
IDirectMusicDownload * download
Definition: port.c:30
struct list entry
Definition: port.c:29
Definition: filter.c:185
IDirectMusicThru IDirectMusicThru_iface
Definition: port.c:772
IDirectMusicPort IDirectMusicPort_iface
Definition: port.c:771
IReferenceClock * clock
Definition: port.c:774
LONG ref
Definition: port.c:773
Definition: send.c:48
IDirectSoundBuffer * dsbuffer
Definition: port.c:43
IDirectMusicPort IDirectMusicPort_iface
Definition: port.c:36
IDirectMusic8Impl * parent
Definition: port.c:41
IDirectMusicSynth * synth
Definition: port.c:44
struct list downloads
Definition: port.c:51
IDirectMusicSynthSink * synth_sink
Definition: port.c:45
IDirectMusicPortDownload IDirectMusicPortDownload_iface
Definition: port.c:37
int nrofgroups
Definition: port.c:48
LONG ref
Definition: port.c:40
IKsControl IKsControl_iface
Definition: port.c:39
IDirectMusicThru IDirectMusicThru_iface
Definition: port.c:38
BOOL active
Definition: port.c:46
DMUS_PORTPARAMS params
Definition: port.c:47
DWORD next_dlid
Definition: port.c:52
IDirectSound * dsound
Definition: port.c:42
unsigned char * LPBYTE
Definition: typedefs.h:53
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint32_t ULONG
Definition: typedefs.h:59
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
Definition: wcsftime.cpp:383
#define WINAPI
Definition: msvc.h:6
#define S_FALSE
Definition: winerror.h:3451
#define E_NOT_SUFFICIENT_BUFFER
Definition: winerror.h:3437
#define E_NOINTERFACE
Definition: winerror.h:3479
#define E_POINTER
Definition: winerror.h:3480