user32: Avoid TRUE:FALSE conditional expressions.
[wine/multimedia.git] / dlls / dmusic / port.c
blob7e1f5e15de1162f1c80f998a42621eca658a1d7b
1 /*
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 IDirectMusicPortImpl *impl_from_IDirectMusicPort(IDirectMusicPort *iface)
27 return CONTAINING_RECORD(iface, IDirectMusicPortImpl, IDirectMusicPort_iface);
30 static inline IDirectMusicPortImpl *impl_from_IDirectMusicPortDownload(IDirectMusicPortDownload *iface)
32 return CONTAINING_RECORD(iface, IDirectMusicPortImpl, IDirectMusicPortDownload_iface);
35 static inline IDirectMusicPortImpl *impl_from_IDirectMusicThru(IDirectMusicThru *iface)
37 return CONTAINING_RECORD(iface, IDirectMusicPortImpl, IDirectMusicThru_iface);
40 /* IDirectMusicPortImpl IUnknown part: */
41 static HRESULT WINAPI IDirectMusicPortImpl_QueryInterface(LPDIRECTMUSICPORT iface, REFIID riid, LPVOID *ppobj)
43 IDirectMusicPortImpl *This = impl_from_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);
52 return S_OK;
53 } else if (IsEqualGUID(riid, &IID_IDirectMusicPortDownload) ||
54 IsEqualGUID(riid, &IID_IDirectMusicPortDownload8)) {
55 *ppobj = &This->IDirectMusicPortDownload_iface;
56 IDirectMusicPortDownload_AddRef((LPDIRECTMUSICPORTDOWNLOAD)*ppobj);
57 return S_OK;
58 } else if (IsEqualGUID(riid, &IID_IDirectMusicThru) ||
59 IsEqualGUID(riid, &IID_IDirectMusicThru8)) {
60 *ppobj = &This->IDirectMusicThru_iface;
61 IDirectMusicThru_AddRef((LPDIRECTMUSICTHRU)*ppobj);
62 return S_OK;
64 WARN("(%p, %s, %p): not found\n", This, debugstr_dmguid(riid), ppobj);
65 return E_NOINTERFACE;
68 static ULONG WINAPI IDirectMusicPortImpl_AddRef(LPDIRECTMUSICPORT iface)
70 IDirectMusicPortImpl *This = impl_from_IDirectMusicPort(iface);
71 ULONG refCount = InterlockedIncrement(&This->ref);
73 TRACE("(%p)->(ref before=%u)\n", This, refCount - 1);
75 DMUSIC_LockModule();
77 return refCount;
80 static ULONG WINAPI IDirectMusicPortImpl_Release(LPDIRECTMUSICPORT iface)
82 IDirectMusicPortImpl *This = impl_from_IDirectMusicPort(iface);
83 ULONG refCount = InterlockedDecrement(&This->ref);
85 TRACE("(%p)->(ref before=%u)\n", This, refCount + 1);
87 if (!refCount) {
88 HeapFree(GetProcessHeap(), 0, This);
91 DMUSIC_UnlockModule();
93 return refCount;
96 /* IDirectMusicPortImpl IDirectMusicPort part: */
97 static HRESULT WINAPI IDirectMusicPortImpl_PlayBuffer(LPDIRECTMUSICPORT iface, LPDIRECTMUSICBUFFER buffer)
99 IDirectMusicPortImpl *This = impl_from_IDirectMusicPort(iface);
101 FIXME("(%p/%p)->(%p): stub\n", iface, This, buffer);
103 return S_OK;
106 static HRESULT WINAPI IDirectMusicPortImpl_SetReadNotificationHandle(LPDIRECTMUSICPORT iface, HANDLE event)
108 IDirectMusicPortImpl *This = impl_from_IDirectMusicPort(iface);
110 FIXME("(%p/%p)->(%p): stub\n", iface, This, event);
112 return S_OK;
115 static HRESULT WINAPI IDirectMusicPortImpl_Read(LPDIRECTMUSICPORT iface, LPDIRECTMUSICBUFFER buffer)
117 IDirectMusicPortImpl *This = impl_from_IDirectMusicPort(iface);
119 FIXME("(%p/%p)->(%p): stub\n", iface, This, buffer);
121 return S_OK;
124 static HRESULT WINAPI IDirectMusicPortImpl_DownloadInstrument(LPDIRECTMUSICPORT iface, IDirectMusicInstrument* pInstrument, IDirectMusicDownloadedInstrument** ppDownloadedInstrument, DMUS_NOTERANGE* pNoteRanges, DWORD dwNumNoteRanges)
126 IDirectMusicPortImpl *This = impl_from_IDirectMusicPort(iface);
128 FIXME("(%p, %p, %p, %p, %d): stub\n", This, pInstrument, ppDownloadedInstrument, pNoteRanges, dwNumNoteRanges);
130 if (!pInstrument || !ppDownloadedInstrument || (dwNumNoteRanges && !pNoteRanges))
131 return E_POINTER;
133 return DMUSIC_CreateDirectMusicDownloadedInstrumentImpl(&IID_IDirectMusicDownloadedInstrument, (LPVOID*)ppDownloadedInstrument, NULL);
136 static HRESULT WINAPI IDirectMusicPortImpl_UnloadInstrument(LPDIRECTMUSICPORT iface, IDirectMusicDownloadedInstrument *downloaded_instrument)
138 IDirectMusicPortImpl *This = impl_from_IDirectMusicPort(iface);
140 FIXME("(%p/%p)->(%p): stub\n", iface, This, downloaded_instrument);
142 return S_OK;
145 static HRESULT WINAPI IDirectMusicPortImpl_GetLatencyClock(LPDIRECTMUSICPORT iface, IReferenceClock** clock)
147 IDirectMusicPortImpl *This = impl_from_IDirectMusicPort(iface);
149 TRACE("(%p/%p)->(%p)\n", iface, This, clock);
151 *clock = This->pLatencyClock;
152 IReferenceClock_AddRef(*clock);
154 return S_OK;
157 static HRESULT WINAPI IDirectMusicPortImpl_GetRunningStats(LPDIRECTMUSICPORT iface, LPDMUS_SYNTHSTATS stats)
159 IDirectMusicPortImpl *This = impl_from_IDirectMusicPort(iface);
161 FIXME("(%p/%p)->(%p): stub\n", iface, This, stats);
163 return S_OK;
166 static HRESULT WINAPI IDirectMusicPortImpl_Compact(LPDIRECTMUSICPORT iface)
168 IDirectMusicPortImpl *This = impl_from_IDirectMusicPort(iface);
170 FIXME("(%p/%p)->(): stub\n", iface, This);
172 return S_OK;
175 static HRESULT WINAPI IDirectMusicPortImpl_GetCaps(LPDIRECTMUSICPORT iface, LPDMUS_PORTCAPS port_caps)
177 IDirectMusicPortImpl *This = impl_from_IDirectMusicPort(iface);
179 TRACE("(%p/%p)->(%p)\n", iface, This, port_caps);
181 *port_caps = This->caps;
183 return S_OK;
186 static HRESULT WINAPI IDirectMusicPortImpl_DeviceIoControl(LPDIRECTMUSICPORT iface, DWORD io_control_code, LPVOID in_buffer, DWORD in_buffer_size,
187 LPVOID out_buffer, DWORD out_buffer_size, LPDWORD bytes_returned, LPOVERLAPPED overlapped)
189 IDirectMusicPortImpl *This = impl_from_IDirectMusicPort(iface);
191 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);
193 return S_OK;
196 static HRESULT WINAPI IDirectMusicPortImpl_SetNumChannelGroups(LPDIRECTMUSICPORT iface, DWORD channel_groups)
198 IDirectMusicPortImpl *This = impl_from_IDirectMusicPort(iface);
200 FIXME("(%p/%p)->(%d): semi-stub\n", iface, This, channel_groups);
202 This->nrofgroups = channel_groups;
204 return S_OK;
207 static HRESULT WINAPI IDirectMusicPortImpl_GetNumChannelGroups(LPDIRECTMUSICPORT iface, LPDWORD channel_groups)
209 IDirectMusicPortImpl *This = impl_from_IDirectMusicPort(iface);
211 TRACE("(%p/%p)->(%p)\n", iface, This, channel_groups);
213 *channel_groups = This->nrofgroups;
215 return S_OK;
218 static HRESULT WINAPI IDirectMusicPortImpl_Activate(LPDIRECTMUSICPORT iface, BOOL active)
220 IDirectMusicPortImpl *This = impl_from_IDirectMusicPort(iface);
222 TRACE("(%p/%p)->(%d)\n", iface, This, active);
224 This->fActive = active;
226 return S_OK;
229 static HRESULT WINAPI IDirectMusicPortImpl_SetChannelPriority(LPDIRECTMUSICPORT iface, DWORD channel_group, DWORD channel, DWORD priority)
231 IDirectMusicPortImpl *This = impl_from_IDirectMusicPort(iface);
233 FIXME("(%p/%p)->(%d, %d, %d): semi-stub\n", iface, This, channel_group, channel, priority);
235 if (channel > 16)
237 WARN("isn't there supposed to be 16 channels (no. %d requested)?! (faking as it is ok)\n", channel);
238 /*return E_INVALIDARG;*/
241 return S_OK;
244 static HRESULT WINAPI IDirectMusicPortImpl_GetChannelPriority(LPDIRECTMUSICPORT iface, DWORD channel_group, DWORD channel, LPDWORD priority)
246 IDirectMusicPortImpl *This = impl_from_IDirectMusicPort(iface);
248 TRACE("(%p/%p)->(%u, %u, %p)\n", iface, This, channel_group, channel, priority);
250 *priority = This->group[channel_group - 1].channel[channel].priority;
252 return S_OK;
255 static HRESULT WINAPI IDirectMusicPortImpl_SetDirectSound(LPDIRECTMUSICPORT iface, LPDIRECTSOUND direct_sound, LPDIRECTSOUNDBUFFER direct_sound_buffer)
257 IDirectMusicPortImpl *This = impl_from_IDirectMusicPort(iface);
259 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, direct_sound, direct_sound_buffer);
261 return S_OK;
264 static HRESULT WINAPI IDirectMusicPortImpl_GetFormat(LPDIRECTMUSICPORT iface, LPWAVEFORMATEX pWaveFormatEx, LPDWORD pdwWaveFormatExSize, LPDWORD pdwBufferSize)
266 IDirectMusicPortImpl *This = impl_from_IDirectMusicPort(iface);
267 WAVEFORMATEX format;
268 FIXME("(%p, %p, %p, %p): stub\n", This, pWaveFormatEx, pdwWaveFormatExSize, pdwBufferSize);
270 if (pWaveFormatEx == NULL)
272 if (pdwWaveFormatExSize)
273 *pdwWaveFormatExSize = sizeof(format);
274 else
275 return E_POINTER;
277 else
279 if (pdwWaveFormatExSize == NULL)
280 return E_POINTER;
282 /* Just fill this in with something that will not crash Direct Sound for now. */
283 /* It won't be used anyway until Performances are completed */
284 format.wFormatTag = WAVE_FORMAT_PCM;
285 format.nChannels = 2; /* This->params.dwAudioChannels; */
286 format.nSamplesPerSec = 44100; /* This->params.dwSampleRate; */
287 format.wBitsPerSample = 16; /* FIXME: check this */
288 format.nBlockAlign = (format.wBitsPerSample * format.nChannels) / 8;
289 format.nAvgBytesPerSec = format.nSamplesPerSec * format.nBlockAlign;
290 format.cbSize = 0;
292 if (*pdwWaveFormatExSize >= sizeof(format))
294 CopyMemory(pWaveFormatEx, &format, min(sizeof(format), *pdwWaveFormatExSize));
295 *pdwWaveFormatExSize = sizeof(format); /* FIXME check if this is set */
297 else
298 return E_POINTER; /* FIXME find right error */
301 if (pdwBufferSize)
302 *pdwBufferSize = 44100 * 2 * 2;
303 else
304 return E_POINTER;
306 return S_OK;
309 static const IDirectMusicPortVtbl DirectMusicPort_Vtbl = {
310 IDirectMusicPortImpl_QueryInterface,
311 IDirectMusicPortImpl_AddRef,
312 IDirectMusicPortImpl_Release,
313 IDirectMusicPortImpl_PlayBuffer,
314 IDirectMusicPortImpl_SetReadNotificationHandle,
315 IDirectMusicPortImpl_Read,
316 IDirectMusicPortImpl_DownloadInstrument,
317 IDirectMusicPortImpl_UnloadInstrument,
318 IDirectMusicPortImpl_GetLatencyClock,
319 IDirectMusicPortImpl_GetRunningStats,
320 IDirectMusicPortImpl_Compact,
321 IDirectMusicPortImpl_GetCaps,
322 IDirectMusicPortImpl_DeviceIoControl,
323 IDirectMusicPortImpl_SetNumChannelGroups,
324 IDirectMusicPortImpl_GetNumChannelGroups,
325 IDirectMusicPortImpl_Activate,
326 IDirectMusicPortImpl_SetChannelPriority,
327 IDirectMusicPortImpl_GetChannelPriority,
328 IDirectMusicPortImpl_SetDirectSound,
329 IDirectMusicPortImpl_GetFormat
332 /* IDirectMusicPortDownload IUnknown parts follow: */
333 static HRESULT WINAPI IDirectMusicPortDownloadImpl_QueryInterface(LPDIRECTMUSICPORTDOWNLOAD iface, REFIID riid, LPVOID *ret_iface)
335 IDirectMusicPortImpl *This = impl_from_IDirectMusicPortDownload(iface);
337 TRACE("(%p/%p)->(%s, %p)\n", iface, This, debugstr_dmguid(riid), ret_iface);
339 return IDirectMusicPort_QueryInterface(&This->IDirectMusicPort_iface, riid, ret_iface);
342 static ULONG WINAPI IDirectMusicPortDownloadImpl_AddRef (LPDIRECTMUSICPORTDOWNLOAD iface)
344 IDirectMusicPortImpl *This = impl_from_IDirectMusicPortDownload(iface);
346 TRACE("(%p/%p)->()\n", iface, This);
348 return IDirectMusicPort_AddRef(&This->IDirectMusicPort_iface);
351 static ULONG WINAPI IDirectMusicPortDownloadImpl_Release(LPDIRECTMUSICPORTDOWNLOAD iface)
353 IDirectMusicPortImpl *This = impl_from_IDirectMusicPortDownload(iface);
355 TRACE("(%p/%p)->()\n", iface, This);
357 return IDirectMusicPort_Release(&This->IDirectMusicPort_iface);
360 /* IDirectMusicPortDownload Interface follow: */
361 static HRESULT WINAPI IDirectMusicPortDownloadImpl_GetBuffer(LPDIRECTMUSICPORTDOWNLOAD iface, DWORD DLId, IDirectMusicDownload** IDMDownload)
363 IDirectMusicPortImpl *This = impl_from_IDirectMusicPortDownload(iface);
365 FIXME("(%p/%p)->(%u, %p): stub\n", iface, This, DLId, IDMDownload);
367 if (!IDMDownload)
368 return E_POINTER;
370 return DMUSIC_CreateDirectMusicDownloadImpl(&IID_IDirectMusicDownload, (LPVOID*)IDMDownload, NULL);
373 static HRESULT WINAPI IDirectMusicPortDownloadImpl_AllocateBuffer(LPDIRECTMUSICPORTDOWNLOAD iface, DWORD size, IDirectMusicDownload** IDMDownload)
375 IDirectMusicPortImpl *This = impl_from_IDirectMusicPortDownload(iface);
377 FIXME("(%p/%p)->(%u, %p): stub\n", iface, This, size, IDMDownload);
379 return S_OK;
382 static HRESULT WINAPI IDirectMusicPortDownloadImpl_GetDLId(LPDIRECTMUSICPORTDOWNLOAD iface, DWORD* start_DLId, DWORD count)
384 IDirectMusicPortImpl *This = impl_from_IDirectMusicPortDownload(iface);
386 FIXME("(%p/%p)->(%p, %u): stub\n", iface, This, start_DLId, count);
388 return S_OK;
391 static HRESULT WINAPI IDirectMusicPortDownloadImpl_GetAppend (LPDIRECTMUSICPORTDOWNLOAD iface, DWORD* append)
393 IDirectMusicPortImpl *This = impl_from_IDirectMusicPortDownload(iface);
395 FIXME("(%p/%p)->(%p): stub\n", iface, This, append);
397 return S_OK;
400 static HRESULT WINAPI IDirectMusicPortDownloadImpl_Download(LPDIRECTMUSICPORTDOWNLOAD iface, IDirectMusicDownload* IDMDownload)
402 IDirectMusicPortImpl *This = impl_from_IDirectMusicPortDownload(iface);
404 FIXME("(%p/%p)->(%p): stub\n", iface, This, IDMDownload);
406 return S_OK;
409 static HRESULT WINAPI IDirectMusicPortDownloadImpl_Unload(LPDIRECTMUSICPORTDOWNLOAD iface, IDirectMusicDownload* IDMDownload)
411 IDirectMusicPortImpl *This = impl_from_IDirectMusicPortDownload(iface);
413 FIXME("(%p/%p)->(%p): stub\n", iface, This, IDMDownload);
415 return S_OK;
418 static const IDirectMusicPortDownloadVtbl DirectMusicPortDownload_Vtbl = {
419 IDirectMusicPortDownloadImpl_QueryInterface,
420 IDirectMusicPortDownloadImpl_AddRef,
421 IDirectMusicPortDownloadImpl_Release,
422 IDirectMusicPortDownloadImpl_GetBuffer,
423 IDirectMusicPortDownloadImpl_AllocateBuffer,
424 IDirectMusicPortDownloadImpl_GetDLId,
425 IDirectMusicPortDownloadImpl_GetAppend,
426 IDirectMusicPortDownloadImpl_Download,
427 IDirectMusicPortDownloadImpl_Unload
430 /* IDirectMusicThru IUnknown parts follow: */
431 static HRESULT WINAPI IDirectMusicThruImpl_QueryInterface(LPDIRECTMUSICTHRU iface, REFIID riid, LPVOID *ret_iface)
433 IDirectMusicPortImpl *This = impl_from_IDirectMusicThru(iface);
435 TRACE("(%p/%p)->(%s, %p)\n", iface, This, debugstr_dmguid(riid), ret_iface);
437 return IDirectMusicPort_QueryInterface(&This->IDirectMusicPort_iface, riid, ret_iface);
440 static ULONG WINAPI IDirectMusicThruImpl_AddRef(LPDIRECTMUSICTHRU iface)
442 IDirectMusicPortImpl *This = impl_from_IDirectMusicThru(iface);
444 TRACE("(%p/%p)->()\n", iface, This);
446 return IDirectMusicPort_AddRef(&This->IDirectMusicPort_iface);
449 static ULONG WINAPI IDirectMusicThruImpl_Release(LPDIRECTMUSICTHRU iface)
451 IDirectMusicPortImpl *This = impl_from_IDirectMusicThru(iface);
453 TRACE("(%p/%p)->()\n", iface, This);
455 return IDirectMusicPort_Release(&This->IDirectMusicPort_iface);
458 /* IDirectMusicThru Interface follow: */
459 static HRESULT WINAPI IDirectMusicThruImpl_ThruChannel(LPDIRECTMUSICTHRU iface, DWORD source_channel_group, DWORD source_channel, DWORD destination_channel_group,
460 DWORD destination_channel, LPDIRECTMUSICPORT destination_port)
462 IDirectMusicPortImpl *This = impl_from_IDirectMusicThru(iface);
464 FIXME("(%p/%p)->(%d, %d, %d, %d, %p): stub\n", iface, This, source_channel_group, source_channel, destination_channel_group, destination_channel, destination_port);
466 return S_OK;
469 static const IDirectMusicThruVtbl DirectMusicThru_Vtbl = {
470 IDirectMusicThruImpl_QueryInterface,
471 IDirectMusicThruImpl_AddRef,
472 IDirectMusicThruImpl_Release,
473 IDirectMusicThruImpl_ThruChannel
476 HRESULT DMUSIC_CreateDirectMusicPortImpl (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter, LPDMUS_PORTPARAMS pPortParams, LPDMUS_PORTCAPS pPortCaps) {
477 IDirectMusicPortImpl *obj;
478 HRESULT hr = E_FAIL;
479 UINT j;
481 TRACE("(%p,%p,%p)\n", lpcGUID, ppobj, pUnkOuter);
483 obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicPortImpl));
484 if (NULL == obj) {
485 *ppobj = NULL;
486 return E_OUTOFMEMORY;
488 obj->IDirectMusicPort_iface.lpVtbl = &DirectMusicPort_Vtbl;
489 obj->IDirectMusicPortDownload_iface.lpVtbl = &DirectMusicPortDownload_Vtbl;
490 obj->IDirectMusicThru_iface.lpVtbl = &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);
498 if(hr != S_OK)
500 HeapFree(GetProcessHeap(), 0, obj);
501 return hr;
504 if(0)
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 IDirectMusicPortImpl_QueryInterface ((LPDIRECTMUSICPORT)obj, lpcGUID, ppobj);