2 * IDirectMusicPort Implementation
4 * Copyright (C) 2003-2004 Rok Mandeljc
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #include "dmusic_private.h"
23 WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
25 static inline SynthPortImpl *impl_from_SynthPortImpl_IDirectMusicPort(IDirectMusicPort *iface)
27 return CONTAINING_RECORD(iface, SynthPortImpl, IDirectMusicPort_iface);
30 static inline SynthPortImpl *impl_from_SynthPortImpl_IDirectMusicPortDownload(IDirectMusicPortDownload *iface)
32 return CONTAINING_RECORD(iface, SynthPortImpl, IDirectMusicPortDownload_iface);
35 static inline SynthPortImpl *impl_from_SynthPortImpl_IDirectMusicThru(IDirectMusicThru *iface)
37 return CONTAINING_RECORD(iface, SynthPortImpl, IDirectMusicThru_iface);
40 /* SynthPortImpl IDirectMusicPort IUnknown part follows: */
41 static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_QueryInterface(LPDIRECTMUSICPORT iface, REFIID riid, LPVOID *ppobj)
43 SynthPortImpl *This = impl_from_SynthPortImpl_IDirectMusicPort(iface);
45 TRACE("(%p, %s, %p)\n", This, debugstr_dmguid(riid), ppobj);
47 if (IsEqualIID (riid, &IID_IUnknown) ||
48 IsEqualGUID(riid, &IID_IDirectMusicPort) ||
49 IsEqualGUID(riid, &IID_IDirectMusicPort8)) {
50 *ppobj = &This->IDirectMusicPort_iface;
51 IDirectMusicPort_AddRef((LPDIRECTMUSICPORT)*ppobj);
53 } else if (IsEqualGUID(riid, &IID_IDirectMusicPortDownload) ||
54 IsEqualGUID(riid, &IID_IDirectMusicPortDownload8)) {
55 *ppobj = &This->IDirectMusicPortDownload_iface;
56 IDirectMusicPortDownload_AddRef((LPDIRECTMUSICPORTDOWNLOAD)*ppobj);
58 } else if (IsEqualGUID(riid, &IID_IDirectMusicThru) ||
59 IsEqualGUID(riid, &IID_IDirectMusicThru8)) {
60 *ppobj = &This->IDirectMusicThru_iface;
61 IDirectMusicThru_AddRef((LPDIRECTMUSICTHRU)*ppobj);
64 WARN("(%p, %s, %p): not found\n", This, debugstr_dmguid(riid), ppobj);
68 static ULONG WINAPI SynthPortImpl_IDirectMusicPort_AddRef(LPDIRECTMUSICPORT iface)
70 SynthPortImpl *This = impl_from_SynthPortImpl_IDirectMusicPort(iface);
71 ULONG ref = InterlockedIncrement(&This->ref);
73 TRACE("(%p)->(): new ref = %u\n", This, ref);
80 static ULONG WINAPI SynthPortImpl_IDirectMusicPort_Release(LPDIRECTMUSICPORT iface)
82 SynthPortImpl *This = impl_from_SynthPortImpl_IDirectMusicPort(iface);
83 ULONG ref = InterlockedDecrement(&This->ref);
85 TRACE("(%p)->(): new ref = %u\n", This, ref);
88 HeapFree(GetProcessHeap(), 0, This);
90 DMUSIC_UnlockModule();
95 /* SynthPortImpl IDirectMusicPort interface follows: */
96 static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_PlayBuffer(LPDIRECTMUSICPORT iface, LPDIRECTMUSICBUFFER buffer)
98 SynthPortImpl *This = impl_from_SynthPortImpl_IDirectMusicPort(iface);
100 FIXME("(%p/%p)->(%p): stub\n", iface, This, buffer);
105 static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_SetReadNotificationHandle(LPDIRECTMUSICPORT iface, HANDLE event)
107 SynthPortImpl *This = impl_from_SynthPortImpl_IDirectMusicPort(iface);
109 FIXME("(%p/%p)->(%p): stub\n", iface, This, event);
114 static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_Read(LPDIRECTMUSICPORT iface, LPDIRECTMUSICBUFFER buffer)
116 SynthPortImpl *This = impl_from_SynthPortImpl_IDirectMusicPort(iface);
118 FIXME("(%p/%p)->(%p): stub\n", iface, This, buffer);
123 static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_DownloadInstrument(LPDIRECTMUSICPORT iface, IDirectMusicInstrument* pInstrument, IDirectMusicDownloadedInstrument** ppDownloadedInstrument, DMUS_NOTERANGE* pNoteRanges, DWORD dwNumNoteRanges)
125 SynthPortImpl *This = impl_from_SynthPortImpl_IDirectMusicPort(iface);
127 FIXME("(%p, %p, %p, %p, %d): stub\n", This, pInstrument, ppDownloadedInstrument, pNoteRanges, dwNumNoteRanges);
129 if (!pInstrument || !ppDownloadedInstrument || (dwNumNoteRanges && !pNoteRanges))
132 return DMUSIC_CreateDirectMusicDownloadedInstrumentImpl(&IID_IDirectMusicDownloadedInstrument, (LPVOID*)ppDownloadedInstrument, NULL);
135 static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_UnloadInstrument(LPDIRECTMUSICPORT iface, IDirectMusicDownloadedInstrument *downloaded_instrument)
137 SynthPortImpl *This = impl_from_SynthPortImpl_IDirectMusicPort(iface);
139 FIXME("(%p/%p)->(%p): stub\n", iface, This, downloaded_instrument);
144 static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_GetLatencyClock(LPDIRECTMUSICPORT iface, IReferenceClock** clock)
146 SynthPortImpl *This = impl_from_SynthPortImpl_IDirectMusicPort(iface);
148 TRACE("(%p/%p)->(%p)\n", iface, This, clock);
150 *clock = This->pLatencyClock;
151 IReferenceClock_AddRef(*clock);
156 static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_GetRunningStats(LPDIRECTMUSICPORT iface, LPDMUS_SYNTHSTATS stats)
158 SynthPortImpl *This = impl_from_SynthPortImpl_IDirectMusicPort(iface);
160 FIXME("(%p/%p)->(%p): stub\n", iface, This, stats);
165 static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_Compact(LPDIRECTMUSICPORT iface)
167 SynthPortImpl *This = impl_from_SynthPortImpl_IDirectMusicPort(iface);
169 FIXME("(%p/%p)->(): stub\n", iface, This);
174 static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_GetCaps(LPDIRECTMUSICPORT iface, LPDMUS_PORTCAPS port_caps)
176 SynthPortImpl *This = impl_from_SynthPortImpl_IDirectMusicPort(iface);
178 TRACE("(%p/%p)->(%p)\n", iface, This, port_caps);
180 *port_caps = This->caps;
185 static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_DeviceIoControl(LPDIRECTMUSICPORT iface, DWORD io_control_code, LPVOID in_buffer, DWORD in_buffer_size,
186 LPVOID out_buffer, DWORD out_buffer_size, LPDWORD bytes_returned, LPOVERLAPPED overlapped)
188 SynthPortImpl *This = impl_from_SynthPortImpl_IDirectMusicPort(iface);
190 FIXME("(%p/%p)->(%d, %p, %d, %p, %d, %p, %p): stub\n", iface, This, io_control_code, in_buffer, in_buffer_size, out_buffer, out_buffer_size, bytes_returned, overlapped);
195 static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_SetNumChannelGroups(LPDIRECTMUSICPORT iface, DWORD channel_groups)
197 SynthPortImpl *This = impl_from_SynthPortImpl_IDirectMusicPort(iface);
199 FIXME("(%p/%p)->(%d): semi-stub\n", iface, This, channel_groups);
201 This->nrofgroups = channel_groups;
206 static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_GetNumChannelGroups(LPDIRECTMUSICPORT iface, LPDWORD channel_groups)
208 SynthPortImpl *This = impl_from_SynthPortImpl_IDirectMusicPort(iface);
210 TRACE("(%p/%p)->(%p)\n", iface, This, channel_groups);
212 *channel_groups = This->nrofgroups;
217 static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_Activate(LPDIRECTMUSICPORT iface, BOOL active)
219 SynthPortImpl *This = impl_from_SynthPortImpl_IDirectMusicPort(iface);
221 TRACE("(%p/%p)->(%d)\n", iface, This, active);
223 This->fActive = active;
228 static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_SetChannelPriority(LPDIRECTMUSICPORT iface, DWORD channel_group, DWORD channel, DWORD priority)
230 SynthPortImpl *This = impl_from_SynthPortImpl_IDirectMusicPort(iface);
232 FIXME("(%p/%p)->(%d, %d, %d): semi-stub\n", iface, This, channel_group, channel, priority);
236 WARN("isn't there supposed to be 16 channels (no. %d requested)?! (faking as it is ok)\n", channel);
237 /*return E_INVALIDARG;*/
243 static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_GetChannelPriority(LPDIRECTMUSICPORT iface, DWORD channel_group, DWORD channel, LPDWORD priority)
245 SynthPortImpl *This = impl_from_SynthPortImpl_IDirectMusicPort(iface);
247 TRACE("(%p/%p)->(%u, %u, %p)\n", iface, This, channel_group, channel, priority);
249 *priority = This->group[channel_group - 1].channel[channel].priority;
254 static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_SetDirectSound(LPDIRECTMUSICPORT iface, LPDIRECTSOUND direct_sound, LPDIRECTSOUNDBUFFER direct_sound_buffer)
256 SynthPortImpl *This = impl_from_SynthPortImpl_IDirectMusicPort(iface);
258 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, direct_sound, direct_sound_buffer);
263 static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_GetFormat(LPDIRECTMUSICPORT iface, LPWAVEFORMATEX pWaveFormatEx, LPDWORD pdwWaveFormatExSize, LPDWORD pdwBufferSize)
265 SynthPortImpl *This = impl_from_SynthPortImpl_IDirectMusicPort(iface);
267 FIXME("(%p, %p, %p, %p): stub\n", This, pWaveFormatEx, pdwWaveFormatExSize, pdwBufferSize);
269 if (pWaveFormatEx == NULL)
271 if (pdwWaveFormatExSize)
272 *pdwWaveFormatExSize = sizeof(format);
278 if (pdwWaveFormatExSize == NULL)
281 /* Just fill this in with something that will not crash Direct Sound for now. */
282 /* It won't be used anyway until Performances are completed */
283 format.wFormatTag = WAVE_FORMAT_PCM;
284 format.nChannels = 2; /* This->params.dwAudioChannels; */
285 format.nSamplesPerSec = 44100; /* This->params.dwSampleRate; */
286 format.wBitsPerSample = 16; /* FIXME: check this */
287 format.nBlockAlign = (format.wBitsPerSample * format.nChannels) / 8;
288 format.nAvgBytesPerSec = format.nSamplesPerSec * format.nBlockAlign;
291 if (*pdwWaveFormatExSize >= sizeof(format))
293 CopyMemory(pWaveFormatEx, &format, min(sizeof(format), *pdwWaveFormatExSize));
294 *pdwWaveFormatExSize = sizeof(format); /* FIXME check if this is set */
297 return E_POINTER; /* FIXME find right error */
301 *pdwBufferSize = 44100 * 2 * 2;
308 static const IDirectMusicPortVtbl SynthPortImpl_DirectMusicPort_Vtbl = {
309 SynthPortImpl_IDirectMusicPort_QueryInterface,
310 SynthPortImpl_IDirectMusicPort_AddRef,
311 SynthPortImpl_IDirectMusicPort_Release,
312 SynthPortImpl_IDirectMusicPort_PlayBuffer,
313 SynthPortImpl_IDirectMusicPort_SetReadNotificationHandle,
314 SynthPortImpl_IDirectMusicPort_Read,
315 SynthPortImpl_IDirectMusicPort_DownloadInstrument,
316 SynthPortImpl_IDirectMusicPort_UnloadInstrument,
317 SynthPortImpl_IDirectMusicPort_GetLatencyClock,
318 SynthPortImpl_IDirectMusicPort_GetRunningStats,
319 SynthPortImpl_IDirectMusicPort_Compact,
320 SynthPortImpl_IDirectMusicPort_GetCaps,
321 SynthPortImpl_IDirectMusicPort_DeviceIoControl,
322 SynthPortImpl_IDirectMusicPort_SetNumChannelGroups,
323 SynthPortImpl_IDirectMusicPort_GetNumChannelGroups,
324 SynthPortImpl_IDirectMusicPort_Activate,
325 SynthPortImpl_IDirectMusicPort_SetChannelPriority,
326 SynthPortImpl_IDirectMusicPort_GetChannelPriority,
327 SynthPortImpl_IDirectMusicPort_SetDirectSound,
328 SynthPortImpl_IDirectMusicPort_GetFormat
331 /* SynthPortImpl IDirectMusicPortDownload IUnknown part follows: */
332 static HRESULT WINAPI SynthPortImpl_IDirectMusicPortDownload_QueryInterface(LPDIRECTMUSICPORTDOWNLOAD iface, REFIID riid, LPVOID *ret_iface)
334 SynthPortImpl *This = impl_from_SynthPortImpl_IDirectMusicPortDownload(iface);
336 TRACE("(%p/%p)->(%s, %p)\n", iface, This, debugstr_dmguid(riid), ret_iface);
338 return IDirectMusicPort_QueryInterface(&This->IDirectMusicPort_iface, riid, ret_iface);
341 static ULONG WINAPI SynthPortImpl_IDirectMusicPortDownload_AddRef (LPDIRECTMUSICPORTDOWNLOAD iface)
343 SynthPortImpl *This = impl_from_SynthPortImpl_IDirectMusicPortDownload(iface);
345 TRACE("(%p/%p)->()\n", iface, This);
347 return IDirectMusicPort_AddRef(&This->IDirectMusicPort_iface);
350 static ULONG WINAPI SynthPortImpl_IDirectMusicPortDownload_Release(LPDIRECTMUSICPORTDOWNLOAD iface)
352 SynthPortImpl *This = impl_from_SynthPortImpl_IDirectMusicPortDownload(iface);
354 TRACE("(%p/%p)->()\n", iface, This);
356 return IDirectMusicPort_Release(&This->IDirectMusicPort_iface);
359 /* SynthPortImpl IDirectMusicPortDownload Interface follows: */
360 static HRESULT WINAPI SynthPortImpl_IDirectMusicPortDownload_GetBuffer(LPDIRECTMUSICPORTDOWNLOAD iface, DWORD DLId, IDirectMusicDownload** IDMDownload)
362 SynthPortImpl *This = impl_from_SynthPortImpl_IDirectMusicPortDownload(iface);
364 FIXME("(%p/%p)->(%u, %p): stub\n", iface, This, DLId, IDMDownload);
369 return DMUSIC_CreateDirectMusicDownloadImpl(&IID_IDirectMusicDownload, (LPVOID*)IDMDownload, NULL);
372 static HRESULT WINAPI SynthPortImpl_IDirectMusicPortDownload_AllocateBuffer(LPDIRECTMUSICPORTDOWNLOAD iface, DWORD size, IDirectMusicDownload** IDMDownload)
374 SynthPortImpl *This = impl_from_SynthPortImpl_IDirectMusicPortDownload(iface);
376 FIXME("(%p/%p)->(%u, %p): stub\n", iface, This, size, IDMDownload);
381 static HRESULT WINAPI SynthPortImpl_IDirectMusicPortDownload_GetDLId(LPDIRECTMUSICPORTDOWNLOAD iface, DWORD* start_DLId, DWORD count)
383 SynthPortImpl *This = impl_from_SynthPortImpl_IDirectMusicPortDownload(iface);
385 FIXME("(%p/%p)->(%p, %u): stub\n", iface, This, start_DLId, count);
390 static HRESULT WINAPI SynthPortImpl_IDirectMusicPortDownload_GetAppend (LPDIRECTMUSICPORTDOWNLOAD iface, DWORD* append)
392 SynthPortImpl *This = impl_from_SynthPortImpl_IDirectMusicPortDownload(iface);
394 FIXME("(%p/%p)->(%p): stub\n", iface, This, append);
399 static HRESULT WINAPI SynthPortImpl_IDirectMusicPortDownload_Download(LPDIRECTMUSICPORTDOWNLOAD iface, IDirectMusicDownload* IDMDownload)
401 SynthPortImpl *This = impl_from_SynthPortImpl_IDirectMusicPortDownload(iface);
403 FIXME("(%p/%p)->(%p): stub\n", iface, This, IDMDownload);
408 static HRESULT WINAPI SynthPortImpl_IDirectMusicPortDownload_Unload(LPDIRECTMUSICPORTDOWNLOAD iface, IDirectMusicDownload* IDMDownload)
410 SynthPortImpl *This = impl_from_SynthPortImpl_IDirectMusicPortDownload(iface);
412 FIXME("(%p/%p)->(%p): stub\n", iface, This, IDMDownload);
417 static const IDirectMusicPortDownloadVtbl SynthPortImpl_DirectMusicPortDownload_Vtbl = {
418 SynthPortImpl_IDirectMusicPortDownload_QueryInterface,
419 SynthPortImpl_IDirectMusicPortDownload_AddRef,
420 SynthPortImpl_IDirectMusicPortDownload_Release,
421 SynthPortImpl_IDirectMusicPortDownload_GetBuffer,
422 SynthPortImpl_IDirectMusicPortDownload_AllocateBuffer,
423 SynthPortImpl_IDirectMusicPortDownload_GetDLId,
424 SynthPortImpl_IDirectMusicPortDownload_GetAppend,
425 SynthPortImpl_IDirectMusicPortDownload_Download,
426 SynthPortImpl_IDirectMusicPortDownload_Unload
429 /* SynthPortImpl IDirectMusicThru IUnknown part follows: */
430 static HRESULT WINAPI SynthPortImpl_IDirectMusicThru_QueryInterface(LPDIRECTMUSICTHRU iface, REFIID riid, LPVOID *ret_iface)
432 SynthPortImpl *This = impl_from_SynthPortImpl_IDirectMusicThru(iface);
434 TRACE("(%p/%p)->(%s, %p)\n", iface, This, debugstr_dmguid(riid), ret_iface);
436 return IDirectMusicPort_QueryInterface(&This->IDirectMusicPort_iface, riid, ret_iface);
439 static ULONG WINAPI SynthPortImpl_IDirectMusicThru_AddRef(LPDIRECTMUSICTHRU iface)
441 SynthPortImpl *This = impl_from_SynthPortImpl_IDirectMusicThru(iface);
443 TRACE("(%p/%p)->()\n", iface, This);
445 return IDirectMusicPort_AddRef(&This->IDirectMusicPort_iface);
448 static ULONG WINAPI SynthPortImpl_IDirectMusicThru_Release(LPDIRECTMUSICTHRU iface)
450 SynthPortImpl *This = impl_from_SynthPortImpl_IDirectMusicThru(iface);
452 TRACE("(%p/%p)->()\n", iface, This);
454 return IDirectMusicPort_Release(&This->IDirectMusicPort_iface);
457 /* SynthPortImpl IDirectMusicThru Interface follows: */
458 static HRESULT WINAPI SynthPortImpl_IDirectMusicThru_ThruChannel(LPDIRECTMUSICTHRU iface, DWORD source_channel_group, DWORD source_channel, DWORD destination_channel_group,
459 DWORD destination_channel, LPDIRECTMUSICPORT destination_port)
461 SynthPortImpl *This = impl_from_SynthPortImpl_IDirectMusicThru(iface);
463 FIXME("(%p/%p)->(%d, %d, %d, %d, %p): stub\n", iface, This, source_channel_group, source_channel, destination_channel_group, destination_channel, destination_port);
468 static const IDirectMusicThruVtbl SynthPortImpl_DirectMusicThru_Vtbl = {
469 SynthPortImpl_IDirectMusicThru_QueryInterface,
470 SynthPortImpl_IDirectMusicThru_AddRef,
471 SynthPortImpl_IDirectMusicThru_Release,
472 SynthPortImpl_IDirectMusicThru_ThruChannel
475 HRESULT DMUSIC_CreateSynthPortImpl(LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter, LPDMUS_PORTPARAMS pPortParams, LPDMUS_PORTCAPS pPortCaps, DWORD device)
481 TRACE("(%p,%p,%p,%d)\n", lpcGUID, ppobj, pUnkOuter, device);
483 obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(SynthPortImpl));
486 return E_OUTOFMEMORY;
488 obj->IDirectMusicPort_iface.lpVtbl = &SynthPortImpl_DirectMusicPort_Vtbl;
489 obj->IDirectMusicPortDownload_iface.lpVtbl = &SynthPortImpl_DirectMusicPortDownload_Vtbl;
490 obj->IDirectMusicThru_iface.lpVtbl = &SynthPortImpl_DirectMusicThru_Vtbl;
491 obj->ref = 0; /* will be inited by QueryInterface */
492 obj->fActive = FALSE;
493 obj->params = *pPortParams;
494 obj->caps = *pPortCaps;
495 obj->pDirectSound = NULL;
496 obj->pLatencyClock = NULL;
497 hr = DMUSIC_CreateReferenceClockImpl(&IID_IReferenceClock, (LPVOID*)&obj->pLatencyClock, NULL);
500 HeapFree(GetProcessHeap(), 0, obj);
506 if (pPortParams->dwValidParams & DMUS_PORTPARAMS_CHANNELGROUPS) {
507 obj->nrofgroups = pPortParams->dwChannelGroups;
508 /* setting default priorities */
509 for (j = 0; j < obj->nrofgroups; j++) {
510 TRACE ("Setting default channel priorities on channel group %i\n", j + 1);
511 obj->group[j].channel[0].priority = DAUD_CHAN1_DEF_VOICE_PRIORITY;
512 obj->group[j].channel[1].priority = DAUD_CHAN2_DEF_VOICE_PRIORITY;
513 obj->group[j].channel[2].priority = DAUD_CHAN3_DEF_VOICE_PRIORITY;
514 obj->group[j].channel[3].priority = DAUD_CHAN4_DEF_VOICE_PRIORITY;
515 obj->group[j].channel[4].priority = DAUD_CHAN5_DEF_VOICE_PRIORITY;
516 obj->group[j].channel[5].priority = DAUD_CHAN6_DEF_VOICE_PRIORITY;
517 obj->group[j].channel[6].priority = DAUD_CHAN7_DEF_VOICE_PRIORITY;
518 obj->group[j].channel[7].priority = DAUD_CHAN8_DEF_VOICE_PRIORITY;
519 obj->group[j].channel[8].priority = DAUD_CHAN9_DEF_VOICE_PRIORITY;
520 obj->group[j].channel[9].priority = DAUD_CHAN10_DEF_VOICE_PRIORITY;
521 obj->group[j].channel[10].priority = DAUD_CHAN11_DEF_VOICE_PRIORITY;
522 obj->group[j].channel[11].priority = DAUD_CHAN12_DEF_VOICE_PRIORITY;
523 obj->group[j].channel[12].priority = DAUD_CHAN13_DEF_VOICE_PRIORITY;
524 obj->group[j].channel[13].priority = DAUD_CHAN14_DEF_VOICE_PRIORITY;
525 obj->group[j].channel[14].priority = DAUD_CHAN15_DEF_VOICE_PRIORITY;
526 obj->group[j].channel[15].priority = DAUD_CHAN16_DEF_VOICE_PRIORITY;
531 return IDirectMusicPort_QueryInterface((LPDIRECTMUSICPORT)obj, lpcGUID, ppobj);
534 HRESULT DMUSIC_CreateMidiOutPortImpl(LPCGUID guid, LPVOID *object, LPUNKNOWN unkouter, LPDMUS_PORTPARAMS port_params, LPDMUS_PORTCAPS port_caps, DWORD device)
536 TRACE("(%p,%p,%p,%p,%p,%d): stub\n", guid, object, unkouter, port_params, port_caps, device);
541 HRESULT DMUSIC_CreateMidiInPortImpl(LPCGUID guid, LPVOID *object, LPUNKNOWN unkouter, LPDMUS_PORTPARAMS port_params, LPDMUS_PORTCAPS port_caps, DWORD device)
543 TRACE("(%p,%p,%p,%p,%p,%d): stub\n", guid, object, unkouter, port_params, port_caps, device);