2 * Direct Sound Audio Renderer
4 * Copyright 2004 Christian Costa
6 * This library 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 library 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 library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 #include "quartz_private.h"
24 #include "control_private.h"
38 #include "wine/unicode.h"
39 #include "wine/debug.h"
41 WINE_DEFAULT_DEBUG_CHANNEL(quartz
);
43 static const WCHAR wcsInputPinName
[] = {'i','n','p','u','t',' ','p','i','n',0};
45 static const IBaseFilterVtbl DSoundRender_Vtbl
;
46 static const IPinVtbl DSoundRender_InputPin_Vtbl
;
47 static const IMemInputPinVtbl MemInputPin_Vtbl
;
48 static const IBasicAudioVtbl IBasicAudio_Vtbl
;
50 typedef struct DSoundRenderImpl
52 const IBaseFilterVtbl
* lpVtbl
;
53 const IBasicAudioVtbl
*IBasicAudio_vtbl
;
56 CRITICAL_SECTION csFilter
;
58 REFERENCE_TIME rtStreamStart
;
59 IReferenceClock
* pClock
;
60 FILTER_INFO filterInfo
;
61 IMediaEventSink
* pEventSink
;
67 LPDIRECTSOUNDBUFFER dsbuffer
;
72 static HRESULT
DSoundRender_InputPin_Construct(const PIN_INFO
* pPinInfo
, SAMPLEPROC pSampleProc
, LPVOID pUserData
, QUERYACCEPTPROC pQueryAccept
, LPCRITICAL_SECTION pCritSec
, IPin
** ppPin
)
78 if (pPinInfo
->dir
!= PINDIR_INPUT
)
80 ERR("Pin direction(%x) != PINDIR_INPUT\n", pPinInfo
->dir
);
84 pPinImpl
= CoTaskMemAlloc(sizeof(*pPinImpl
));
89 if (SUCCEEDED(InputPin_Init(pPinInfo
, pSampleProc
, pUserData
, pQueryAccept
, pCritSec
, pPinImpl
)))
91 pPinImpl
->pin
.lpVtbl
= &DSoundRender_InputPin_Vtbl
;
92 pPinImpl
->lpVtblMemInput
= &MemInputPin_Vtbl
;
94 *ppPin
= (IPin
*)(&pPinImpl
->pin
.lpVtbl
);
101 #define DSBUFFERSIZE 8192
103 static HRESULT
DSoundRender_CreateSoundBuffer(IBaseFilter
* iface
)
106 WAVEFORMATEX wav_fmt
;
108 WAVEFORMATEX
* format
;
109 DSBUFFERDESC buf_desc
;
110 DSoundRenderImpl
*This
= (DSoundRenderImpl
*)iface
;
112 hr
= IPin_ConnectionMediaType(This
->ppPins
[0], &amt
);
114 ERR("Unable to retrieve media type\n");
118 TRACE("MajorType %s\n", debugstr_guid(&amt
.majortype
));
119 TRACE("SubType %s\n", debugstr_guid(&amt
.subtype
));
120 TRACE("Format %s\n", debugstr_guid(&amt
.formattype
));
121 TRACE("Size %ld\n", amt
.cbFormat
);
123 dump_AM_MEDIA_TYPE(&amt
);
125 format
= (WAVEFORMATEX
*)amt
.pbFormat
;
126 TRACE("wFormatTag = %x %x\n", format
->wFormatTag
, WAVE_FORMAT_PCM
);
127 TRACE("nChannels = %d\n", format
->nChannels
);
128 TRACE("nSamplesPerSec = %lu\n", format
->nSamplesPerSec
);
129 TRACE("nAvgBytesPerSec = %lu\n", format
->nAvgBytesPerSec
);
130 TRACE("nBlockAlign = %d\n", format
->nBlockAlign
);
131 TRACE("wBitsPerSample = %d\n", format
->wBitsPerSample
);
132 TRACE("cbSize = %d\n", format
->cbSize
);
134 hr
= DirectSoundCreate(NULL
, &This
->dsound
, NULL
);
136 ERR("Cannot create Direct Sound object\n");
143 memset(&buf_desc
,0,sizeof(DSBUFFERDESC
));
144 buf_desc
.dwSize
= sizeof(DSBUFFERDESC
);
145 buf_desc
.dwBufferBytes
= DSBUFFERSIZE
;
146 buf_desc
.lpwfxFormat
= &wav_fmt
;
147 hr
= IDirectSound_CreateSoundBuffer(This
->dsound
, &buf_desc
, &This
->dsbuffer
, NULL
);
149 ERR("Can't create sound buffer !\n");
158 static DWORD
DSoundRender_SendSampleData(DSoundRenderImpl
* This
, LPBYTE data
, DWORD size
)
161 LPBYTE lpbuf1
= NULL
;
162 LPBYTE lpbuf2
= NULL
;
167 DWORD play_pos
,buf_free
;
171 result
=IDirectSoundBuffer_GetCurrentPosition(This
->dsbuffer
, &play_pos
, NULL
);
172 if (result
!= DS_OK
) {
173 ERR("Error GetCurrentPosition: %lx\n", result
);
176 if (This
->write_pos
< play_pos
)
177 buf_free
= play_pos
-This
->write_pos
;
179 buf_free
= DSBUFFERSIZE
- This
->write_pos
+ play_pos
;
181 size2
= min(buf_free
, size
);
182 result
= IDirectSoundBuffer_Lock(This
->dsbuffer
, This
->write_pos
, size2
, &lpbuf1
, &dwsize1
, &lpbuf2
, &dwsize2
, 0);
183 if (result
!= DS_OK
) {
184 ERR("Unable to lock sound buffer !\n");
187 TRACE("write_pos=%ld, size=%ld, sz1=%ld, sz2=%ld\n", This
->write_pos
, size2
, dwsize1
, dwsize2
);
189 memcpy(lpbuf1
, data
, dwsize1
);
191 memcpy(lpbuf2
, data
+ dwsize1
, dwsize2
);
194 result
= IDirectSoundBuffer_Unlock(This
->dsbuffer
, lpbuf1
, dwsize1
, lpbuf2
, dwsize2
);
196 ERR("Unable to unlock sound buffer !\n");
199 result
= IDirectSoundBuffer_Play(This
->dsbuffer
, 0, 0, DSBPLAY_LOOPING
);
200 if (result
!= DS_OK
) {
201 ERR("Can't start playing !\n");
204 size
-= dwsize1
+ dwsize2
;
205 data
+= dwsize1
+ dwsize2
;
206 This
->write_pos
= (This
->write_pos
+ dwsize1
+ dwsize2
) % DSBUFFERSIZE
;
215 static HRESULT
DSoundRender_Sample(LPVOID iface
, IMediaSample
* pSample
)
217 DSoundRenderImpl
*This
= (DSoundRenderImpl
*)iface
;
218 LPBYTE pbSrcStream
= NULL
;
219 long cbSrcStream
= 0;
220 REFERENCE_TIME tStart
, tStop
;
223 TRACE("%p %p\n", iface
, pSample
);
225 hr
= IMediaSample_GetPointer(pSample
, &pbSrcStream
);
228 ERR("Cannot get pointer to sample data (%lx)\n", hr
);
232 hr
= IMediaSample_GetTime(pSample
, &tStart
, &tStop
);
234 ERR("Cannot get sample time (%lx)\n", hr
);
236 cbSrcStream
= IMediaSample_GetActualDataLength(pSample
);
238 TRACE("Sample data ptr = %p, size = %ld\n", pbSrcStream
, cbSrcStream
);
240 #if 0 /* For debugging purpose */
243 for(i
= 0; i
< cbSrcStream
; i
++)
245 if ((i
!=0) && !(i
%16))
247 DPRINTF("%02x ", pbSrcStream
[i
]);
256 hr
= DSoundRender_CreateSoundBuffer(iface
);
259 ERR("Unable to create DSound buffer\n");
262 DSoundRender_SendSampleData(This
, pbSrcStream
, cbSrcStream
);
264 /* We have finished with the incoming sample, we must release it now */
265 IMediaSample_Release(pSample
);
270 static HRESULT
DSoundRender_QueryAccept(LPVOID iface
, const AM_MEDIA_TYPE
* pmt
)
272 WAVEFORMATEX
* format
= (WAVEFORMATEX
*)pmt
->pbFormat
;
273 TRACE("wFormatTag = %x %x\n", format
->wFormatTag
, WAVE_FORMAT_PCM
);
274 TRACE("nChannels = %d\n", format
->nChannels
);
275 TRACE("nSamplesPerSec = %ld\n", format
->nAvgBytesPerSec
);
276 TRACE("nAvgBytesPerSec = %ld\n", format
->nAvgBytesPerSec
);
277 TRACE("nBlockAlign = %d\n", format
->nBlockAlign
);
278 TRACE("wBitsPerSample = %d\n", format
->wBitsPerSample
);
280 if (IsEqualIID(&pmt
->majortype
, &MEDIATYPE_Audio
) && IsEqualIID(&pmt
->subtype
, &MEDIASUBTYPE_PCM
))
285 HRESULT
DSoundRender_create(IUnknown
* pUnkOuter
, LPVOID
* ppv
)
289 DSoundRenderImpl
* pDSoundRender
;
291 TRACE("(%p, %p)\n", pUnkOuter
, ppv
);
296 return CLASS_E_NOAGGREGATION
;
298 pDSoundRender
= CoTaskMemAlloc(sizeof(DSoundRenderImpl
));
300 pDSoundRender
->lpVtbl
= &DSoundRender_Vtbl
;
301 pDSoundRender
->IBasicAudio_vtbl
= &IBasicAudio_Vtbl
;
302 pDSoundRender
->refCount
= 1;
303 InitializeCriticalSection(&pDSoundRender
->csFilter
);
304 pDSoundRender
->state
= State_Stopped
;
305 pDSoundRender
->pClock
= NULL
;
306 pDSoundRender
->init
= 0;
307 ZeroMemory(&pDSoundRender
->filterInfo
, sizeof(FILTER_INFO
));
309 pDSoundRender
->ppPins
= CoTaskMemAlloc(1 * sizeof(IPin
*));
311 /* construct input pin */
312 piInput
.dir
= PINDIR_INPUT
;
313 piInput
.pFilter
= (IBaseFilter
*)pDSoundRender
;
314 strncpyW(piInput
.achName
, wcsInputPinName
, sizeof(piInput
.achName
) / sizeof(piInput
.achName
[0]));
315 hr
= DSoundRender_InputPin_Construct(&piInput
, DSoundRender_Sample
, (LPVOID
)pDSoundRender
, DSoundRender_QueryAccept
, &pDSoundRender
->csFilter
, (IPin
**)&pDSoundRender
->pInputPin
);
319 pDSoundRender
->ppPins
[0] = (IPin
*)pDSoundRender
->pInputPin
;
320 *ppv
= (LPVOID
)pDSoundRender
;
324 CoTaskMemFree(pDSoundRender
->ppPins
);
325 DeleteCriticalSection(&pDSoundRender
->csFilter
);
326 CoTaskMemFree(pDSoundRender
);
332 static HRESULT WINAPI
DSoundRender_QueryInterface(IBaseFilter
* iface
, REFIID riid
, LPVOID
* ppv
)
334 DSoundRenderImpl
*This
= (DSoundRenderImpl
*)iface
;
335 TRACE("(%p, %p)->(%s, %p)\n", This
, iface
, qzdebugstr_guid(riid
), ppv
);
339 if (IsEqualIID(riid
, &IID_IUnknown
))
341 else if (IsEqualIID(riid
, &IID_IPersist
))
343 else if (IsEqualIID(riid
, &IID_IMediaFilter
))
345 else if (IsEqualIID(riid
, &IID_IBaseFilter
))
347 else if (IsEqualIID(riid
, &IID_IBaseFilter
))
348 *ppv
= (LPVOID
)&(This
->IBasicAudio_vtbl
);
352 IUnknown_AddRef((IUnknown
*)(*ppv
));
356 FIXME("No interface for %s!\n", qzdebugstr_guid(riid
));
358 return E_NOINTERFACE
;
361 static ULONG WINAPI
DSoundRender_AddRef(IBaseFilter
* iface
)
363 DSoundRenderImpl
*This
= (DSoundRenderImpl
*)iface
;
364 TRACE("(%p/%p)->()\n", This
, iface
);
365 return InterlockedIncrement(&This
->refCount
);
368 static ULONG WINAPI
DSoundRender_Release(IBaseFilter
* iface
)
370 DSoundRenderImpl
*This
= (DSoundRenderImpl
*)iface
;
371 TRACE("(%p/%p)->()\n", This
, iface
);
372 if (!InterlockedDecrement(&This
->refCount
))
374 DeleteCriticalSection(&This
->csFilter
);
376 IReferenceClock_Release(This
->pClock
);
378 IPin_Release(This
->ppPins
[0]);
380 HeapFree(GetProcessHeap(), 0, This
->ppPins
);
382 This
->IBasicAudio_vtbl
= NULL
;
384 TRACE("Destroying Audio Renderer\n");
390 return This
->refCount
;
393 /** IPersist methods **/
395 static HRESULT WINAPI
DSoundRender_GetClassID(IBaseFilter
* iface
, CLSID
* pClsid
)
397 DSoundRenderImpl
*This
= (DSoundRenderImpl
*)iface
;
398 TRACE("(%p/%p)->(%p)\n", This
, iface
, pClsid
);
400 *pClsid
= CLSID_DSoundRender
;
405 /** IMediaFilter methods **/
407 static HRESULT WINAPI
DSoundRender_Stop(IBaseFilter
* iface
)
410 DSoundRenderImpl
*This
= (DSoundRenderImpl
*)iface
;
412 TRACE("(%p/%p)->()\n", This
, iface
);
414 EnterCriticalSection(&This
->csFilter
);
416 This
->state
= State_Stopped
;
418 LeaveCriticalSection(&This
->csFilter
);
423 static HRESULT WINAPI
DSoundRender_Pause(IBaseFilter
* iface
)
426 DSoundRenderImpl
*This
= (DSoundRenderImpl
*)iface
;
428 TRACE("(%p/%p)->()\n", This
, iface
);
430 EnterCriticalSection(&This
->csFilter
);
432 This
->state
= State_Paused
;
434 LeaveCriticalSection(&This
->csFilter
);
439 static HRESULT WINAPI
DSoundRender_Run(IBaseFilter
* iface
, REFERENCE_TIME tStart
)
442 DSoundRenderImpl
*This
= (DSoundRenderImpl
*)iface
;
444 TRACE("(%p/%p)->(%s)\n", This
, iface
, wine_dbgstr_longlong(tStart
));
446 EnterCriticalSection(&This
->csFilter
);
448 This
->rtStreamStart
= tStart
;
449 This
->state
= State_Running
;
451 LeaveCriticalSection(&This
->csFilter
);
456 static HRESULT WINAPI
DSoundRender_GetState(IBaseFilter
* iface
, DWORD dwMilliSecsTimeout
, FILTER_STATE
*pState
)
458 DSoundRenderImpl
*This
= (DSoundRenderImpl
*)iface
;
460 TRACE("(%p/%p)->(%ld, %p)\n", This
, iface
, dwMilliSecsTimeout
, pState
);
462 EnterCriticalSection(&This
->csFilter
);
464 *pState
= This
->state
;
466 LeaveCriticalSection(&This
->csFilter
);
471 static HRESULT WINAPI
DSoundRender_SetSyncSource(IBaseFilter
* iface
, IReferenceClock
*pClock
)
473 DSoundRenderImpl
*This
= (DSoundRenderImpl
*)iface
;
475 TRACE("(%p/%p)->(%p)\n", This
, iface
, pClock
);
477 EnterCriticalSection(&This
->csFilter
);
480 IReferenceClock_Release(This
->pClock
);
481 This
->pClock
= pClock
;
483 IReferenceClock_AddRef(This
->pClock
);
485 LeaveCriticalSection(&This
->csFilter
);
490 static HRESULT WINAPI
DSoundRender_GetSyncSource(IBaseFilter
* iface
, IReferenceClock
**ppClock
)
492 DSoundRenderImpl
*This
= (DSoundRenderImpl
*)iface
;
494 TRACE("(%p/%p)->(%p)\n", This
, iface
, ppClock
);
496 EnterCriticalSection(&This
->csFilter
);
498 *ppClock
= This
->pClock
;
499 IReferenceClock_AddRef(This
->pClock
);
501 LeaveCriticalSection(&This
->csFilter
);
506 /** IBaseFilter implementation **/
508 static HRESULT WINAPI
DSoundRender_EnumPins(IBaseFilter
* iface
, IEnumPins
**ppEnum
)
511 DSoundRenderImpl
*This
= (DSoundRenderImpl
*)iface
;
513 TRACE("(%p/%p)->(%p)\n", This
, iface
, ppEnum
);
515 epd
.cPins
= 1; /* input pin */
516 epd
.ppPins
= This
->ppPins
;
517 return IEnumPinsImpl_Construct(&epd
, ppEnum
);
520 static HRESULT WINAPI
DSoundRender_FindPin(IBaseFilter
* iface
, LPCWSTR Id
, IPin
**ppPin
)
522 DSoundRenderImpl
*This
= (DSoundRenderImpl
*)iface
;
524 TRACE("(%p/%p)->(%s,%p)\n", This
, iface
, debugstr_w(Id
), ppPin
);
526 FIXME("DSoundRender::FindPin(...)\n");
528 /* FIXME: critical section */
533 static HRESULT WINAPI
DSoundRender_QueryFilterInfo(IBaseFilter
* iface
, FILTER_INFO
*pInfo
)
535 DSoundRenderImpl
*This
= (DSoundRenderImpl
*)iface
;
537 TRACE("(%p/%p)->(%p)\n", This
, iface
, pInfo
);
539 strcpyW(pInfo
->achName
, This
->filterInfo
.achName
);
540 pInfo
->pGraph
= This
->filterInfo
.pGraph
;
543 IFilterGraph_AddRef(pInfo
->pGraph
);
548 static HRESULT WINAPI
DSoundRender_JoinFilterGraph(IBaseFilter
* iface
, IFilterGraph
*pGraph
, LPCWSTR pName
)
551 DSoundRenderImpl
*This
= (DSoundRenderImpl
*)iface
;
553 TRACE("(%p/%p)->(%p, %s)\n", This
, iface
, pGraph
, debugstr_w(pName
));
555 EnterCriticalSection(&This
->csFilter
);
558 strcpyW(This
->filterInfo
.achName
, pName
);
560 *This
->filterInfo
.achName
= '\0';
561 This
->filterInfo
.pGraph
= pGraph
; /* NOTE: do NOT increase ref. count */
563 hr
= IFilterGraph_QueryInterface(pGraph
, &IID_IMediaEventSink
, (LPVOID
*)&This
->pEventSink
);
565 LeaveCriticalSection(&This
->csFilter
);
570 static HRESULT WINAPI
DSoundRender_QueryVendorInfo(IBaseFilter
* iface
, LPWSTR
*pVendorInfo
)
572 DSoundRenderImpl
*This
= (DSoundRenderImpl
*)iface
;
573 TRACE("(%p/%p)->(%p)\n", This
, iface
, pVendorInfo
);
577 static const IBaseFilterVtbl DSoundRender_Vtbl
=
579 DSoundRender_QueryInterface
,
581 DSoundRender_Release
,
582 DSoundRender_GetClassID
,
586 DSoundRender_GetState
,
587 DSoundRender_SetSyncSource
,
588 DSoundRender_GetSyncSource
,
589 DSoundRender_EnumPins
,
590 DSoundRender_FindPin
,
591 DSoundRender_QueryFilterInfo
,
592 DSoundRender_JoinFilterGraph
,
593 DSoundRender_QueryVendorInfo
596 static HRESULT WINAPI
DSoundRender_InputPin_EndOfStream(IPin
* iface
)
598 /* FIXME: critical section */
599 InputPin
* This
= (InputPin
*)iface
;
601 TRACE("(%p/%p)->()\n", This
, iface
);
603 return IMediaEventSink_Notify(((DSoundRenderImpl
*)This
->pin
.pinInfo
.pFilter
)->pEventSink
, EC_COMPLETE
, S_OK
, 0);
606 static const IPinVtbl DSoundRender_InputPin_Vtbl
=
608 InputPin_QueryInterface
,
612 InputPin_ReceiveConnection
,
614 IPinImpl_ConnectedTo
,
615 IPinImpl_ConnectionMediaType
,
616 IPinImpl_QueryPinInfo
,
617 IPinImpl_QueryDirection
,
619 IPinImpl_QueryAccept
,
620 IPinImpl_EnumMediaTypes
,
621 IPinImpl_QueryInternalConnections
,
622 DSoundRender_InputPin_EndOfStream
,
628 static const IMemInputPinVtbl MemInputPin_Vtbl
=
630 MemInputPin_QueryInterface
,
633 MemInputPin_GetAllocator
,
634 MemInputPin_NotifyAllocator
,
635 MemInputPin_GetAllocatorRequirements
,
637 MemInputPin_ReceiveMultiple
,
638 MemInputPin_ReceiveCanBlock
641 /*** IUnknown methods ***/
642 static HRESULT WINAPI
Basicaudio_QueryInterface(IBasicAudio
*iface
,
645 ICOM_THIS_MULTI(DSoundRenderImpl
, IBasicAudio_vtbl
, iface
);
647 TRACE("(%p/%p)->(%s (%p), %p)\n", This
, iface
, debugstr_guid(riid
), riid
, ppvObj
);
649 return DSoundRender_QueryInterface((IBaseFilter
*)This
, riid
, ppvObj
);
652 static ULONG WINAPI
Basicaudio_AddRef(IBasicAudio
*iface
) {
653 ICOM_THIS_MULTI(DSoundRenderImpl
, IBasicAudio_vtbl
, iface
);
655 TRACE("(%p/%p)->()\n", This
, iface
);
657 return DSoundRender_AddRef((IBaseFilter
*)This
);
660 static ULONG WINAPI
Basicaudio_Release(IBasicAudio
*iface
) {
661 ICOM_THIS_MULTI(DSoundRenderImpl
, IBasicAudio_vtbl
, iface
);
663 TRACE("(%p/%p)->()\n", This
, iface
);
665 return DSoundRender_Release((IBaseFilter
*)This
);
668 /*** IDispatch methods ***/
669 static HRESULT WINAPI
Basicaudio_GetTypeInfoCount(IBasicAudio
*iface
,
671 ICOM_THIS_MULTI(DSoundRenderImpl
, IBasicAudio_vtbl
, iface
);
673 TRACE("(%p/%p)->(%p): stub !!!\n", This
, iface
, pctinfo
);
678 static HRESULT WINAPI
Basicaudio_GetTypeInfo(IBasicAudio
*iface
,
681 ITypeInfo
**ppTInfo
) {
682 ICOM_THIS_MULTI(DSoundRenderImpl
, IBasicAudio_vtbl
, iface
);
684 TRACE("(%p/%p)->(%d, %ld, %p): stub !!!\n", This
, iface
, iTInfo
, lcid
, ppTInfo
);
689 static HRESULT WINAPI
Basicaudio_GetIDsOfNames(IBasicAudio
*iface
,
695 ICOM_THIS_MULTI(DSoundRenderImpl
, IBasicAudio_vtbl
, iface
);
697 TRACE("(%p/%p)->(%s (%p), %p, %d, %ld, %p): stub !!!\n", This
, iface
, debugstr_guid(riid
), riid
, rgszNames
, cNames
, lcid
, rgDispId
);
702 static HRESULT WINAPI
Basicaudio_Invoke(IBasicAudio
*iface
,
707 DISPPARAMS
*pDispParams
,
711 ICOM_THIS_MULTI(DSoundRenderImpl
, IBasicAudio_vtbl
, iface
);
713 TRACE("(%p/%p)->(%ld, %s (%p), %ld, %04x, %p, %p, %p, %p): stub !!!\n", This
, iface
, dispIdMember
, debugstr_guid(riid
), riid
, lcid
, wFlags
, pDispParams
, pVarResult
, pExepInfo
, puArgErr
);
718 /*** IBasicAudio methods ***/
719 static HRESULT WINAPI
Basicaudio_put_Volume(IBasicAudio
*iface
,
721 ICOM_THIS_MULTI(DSoundRenderImpl
, IBasicAudio_vtbl
, iface
);
723 TRACE("(%p/%p)->(%ld): stub !!!\n", This
, iface
, lVolume
);
728 static HRESULT WINAPI
Basicaudio_get_Volume(IBasicAudio
*iface
,
730 ICOM_THIS_MULTI(DSoundRenderImpl
, IBasicAudio_vtbl
, iface
);
732 TRACE("(%p/%p)->(%p): stub !!!\n", This
, iface
, plVolume
);
737 static HRESULT WINAPI
Basicaudio_put_Balance(IBasicAudio
*iface
,
739 ICOM_THIS_MULTI(DSoundRenderImpl
, IBasicAudio_vtbl
, iface
);
741 TRACE("(%p/%p)->(%ld): stub !!!\n", This
, iface
, lBalance
);
746 static HRESULT WINAPI
Basicaudio_get_Balance(IBasicAudio
*iface
,
748 ICOM_THIS_MULTI(DSoundRenderImpl
, IBasicAudio_vtbl
, iface
);
750 TRACE("(%p/%p)->(%p): stub !!!\n", This
, iface
, plBalance
);
755 static const IBasicAudioVtbl IBasicAudio_Vtbl
=
757 Basicaudio_QueryInterface
,
760 Basicaudio_GetTypeInfoCount
,
761 Basicaudio_GetTypeInfo
,
762 Basicaudio_GetIDsOfNames
,
764 Basicaudio_put_Volume
,
765 Basicaudio_get_Volume
,
766 Basicaudio_put_Balance
,
767 Basicaudio_get_Balance