Commit f58c9661 authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

quartz: Have DSoundRenderer use strmbase BasicAudio.

parent a01d6be6
...@@ -53,8 +53,8 @@ static const IAMFilterMiscFlagsVtbl IAMFilterMiscFlags_Vtbl; ...@@ -53,8 +53,8 @@ static const IAMFilterMiscFlagsVtbl IAMFilterMiscFlags_Vtbl;
typedef struct DSoundRenderImpl typedef struct DSoundRenderImpl
{ {
BaseRenderer renderer; BaseRenderer renderer;
BasicAudio basicAudio;
IBasicAudio IBasicAudio_iface;
IReferenceClock IReferenceClock_iface; IReferenceClock IReferenceClock_iface;
IAMDirectSound IAMDirectSound_iface; IAMDirectSound IAMDirectSound_iface;
IAMFilterMiscFlags IAMFilterMiscFlags_iface; IAMFilterMiscFlags IAMFilterMiscFlags_iface;
...@@ -88,7 +88,7 @@ static inline DSoundRenderImpl *impl_from_IBaseFilter(IBaseFilter *iface) ...@@ -88,7 +88,7 @@ static inline DSoundRenderImpl *impl_from_IBaseFilter(IBaseFilter *iface)
static inline DSoundRenderImpl *impl_from_IBasicAudio(IBasicAudio *iface) static inline DSoundRenderImpl *impl_from_IBasicAudio(IBasicAudio *iface)
{ {
return CONTAINING_RECORD(iface, DSoundRenderImpl, IBasicAudio_iface); return CONTAINING_RECORD(iface, DSoundRenderImpl, basicAudio.IBasicAudio_iface);
} }
static inline DSoundRenderImpl *impl_from_IReferenceClock(IReferenceClock *iface) static inline DSoundRenderImpl *impl_from_IReferenceClock(IReferenceClock *iface)
...@@ -666,7 +666,7 @@ HRESULT DSoundRender_create(IUnknown * pUnkOuter, LPVOID * ppv) ...@@ -666,7 +666,7 @@ HRESULT DSoundRender_create(IUnknown * pUnkOuter, LPVOID * ppv)
hr = BaseRenderer_Init(&pDSoundRender->renderer, &DSoundRender_Vtbl, (IUnknown*)pDSoundRender, &CLSID_DSoundRender, (DWORD_PTR)(__FILE__ ": DSoundRenderImpl.csFilter"), &BaseFuncTable); hr = BaseRenderer_Init(&pDSoundRender->renderer, &DSoundRender_Vtbl, (IUnknown*)pDSoundRender, &CLSID_DSoundRender, (DWORD_PTR)(__FILE__ ": DSoundRenderImpl.csFilter"), &BaseFuncTable);
pDSoundRender->IBasicAudio_iface.lpVtbl = &IBasicAudio_Vtbl; BasicAudio_Init(&pDSoundRender->basicAudio,&IBasicAudio_Vtbl);
pDSoundRender->IReferenceClock_iface.lpVtbl = &IReferenceClock_Vtbl; pDSoundRender->IReferenceClock_iface.lpVtbl = &IReferenceClock_Vtbl;
pDSoundRender->IAMDirectSound_iface.lpVtbl = &IAMDirectSound_Vtbl; pDSoundRender->IAMDirectSound_iface.lpVtbl = &IAMDirectSound_Vtbl;
pDSoundRender->IAMFilterMiscFlags_iface.lpVtbl = &IAMFilterMiscFlags_Vtbl; pDSoundRender->IAMFilterMiscFlags_iface.lpVtbl = &IAMFilterMiscFlags_Vtbl;
...@@ -722,7 +722,7 @@ static HRESULT WINAPI DSoundRender_QueryInterface(IBaseFilter * iface, REFIID ri ...@@ -722,7 +722,7 @@ static HRESULT WINAPI DSoundRender_QueryInterface(IBaseFilter * iface, REFIID ri
*ppv = NULL; *ppv = NULL;
if (IsEqualIID(riid, &IID_IBasicAudio)) if (IsEqualIID(riid, &IID_IBasicAudio))
*ppv = &This->IBasicAudio_iface; *ppv = &This->basicAudio.IBasicAudio_iface;
else if (IsEqualIID(riid, &IID_IReferenceClock)) else if (IsEqualIID(riid, &IID_IReferenceClock))
*ppv = &This->IReferenceClock_iface; *ppv = &This->IReferenceClock_iface;
else if (IsEqualIID(riid, &IID_IAMDirectSound)) else if (IsEqualIID(riid, &IID_IAMDirectSound))
...@@ -771,8 +771,7 @@ static ULONG WINAPI DSoundRender_Release(IBaseFilter * iface) ...@@ -771,8 +771,7 @@ static ULONG WINAPI DSoundRender_Release(IBaseFilter * iface)
IDirectSound_Release(This->dsound); IDirectSound_Release(This->dsound);
This->dsound = NULL; This->dsound = NULL;
This->IBasicAudio_iface.lpVtbl = NULL; BasicAudio_Destroy(&This->basicAudio);
CloseHandle(This->blocked); CloseHandle(This->blocked);
TRACE("Destroying Audio Renderer\n"); TRACE("Destroying Audio Renderer\n");
...@@ -830,56 +829,6 @@ static ULONG WINAPI Basicaudio_Release(IBasicAudio *iface) { ...@@ -830,56 +829,6 @@ static ULONG WINAPI Basicaudio_Release(IBasicAudio *iface) {
return DSoundRender_Release(&This->renderer.filter.IBaseFilter_iface); return DSoundRender_Release(&This->renderer.filter.IBaseFilter_iface);
} }
/*** IDispatch methods ***/
static HRESULT WINAPI Basicaudio_GetTypeInfoCount(IBasicAudio *iface,
UINT*pctinfo) {
DSoundRenderImpl *This = impl_from_IBasicAudio(iface);
TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pctinfo);
return S_OK;
}
static HRESULT WINAPI Basicaudio_GetTypeInfo(IBasicAudio *iface,
UINT iTInfo,
LCID lcid,
ITypeInfo**ppTInfo) {
DSoundRenderImpl *This = impl_from_IBasicAudio(iface);
TRACE("(%p/%p)->(%d, %d, %p): stub !!!\n", This, iface, iTInfo, lcid, ppTInfo);
return S_OK;
}
static HRESULT WINAPI Basicaudio_GetIDsOfNames(IBasicAudio *iface,
REFIID riid,
LPOLESTR*rgszNames,
UINT cNames,
LCID lcid,
DISPID*rgDispId) {
DSoundRenderImpl *This = impl_from_IBasicAudio(iface);
TRACE("(%p/%p)->(%s (%p), %p, %d, %d, %p): stub !!!\n", This, iface, debugstr_guid(riid), riid, rgszNames, cNames, lcid, rgDispId);
return S_OK;
}
static HRESULT WINAPI Basicaudio_Invoke(IBasicAudio *iface,
DISPID dispIdMember,
REFIID riid,
LCID lcid,
WORD wFlags,
DISPPARAMS*pDispParams,
VARIANT*pVarResult,
EXCEPINFO*pExepInfo,
UINT*puArgErr) {
DSoundRenderImpl *This = impl_from_IBasicAudio(iface);
TRACE("(%p/%p)->(%d, %s (%p), %d, %04x, %p, %p, %p, %p): stub !!!\n", This, iface, dispIdMember, debugstr_guid(riid), riid, lcid, wFlags, pDispParams, pVarResult, pExepInfo, puArgErr);
return S_OK;
}
/*** IBasicAudio methods ***/ /*** IBasicAudio methods ***/
static HRESULT WINAPI Basicaudio_put_Volume(IBasicAudio *iface, static HRESULT WINAPI Basicaudio_put_Volume(IBasicAudio *iface,
LONG lVolume) { LONG lVolume) {
...@@ -948,10 +897,10 @@ static const IBasicAudioVtbl IBasicAudio_Vtbl = ...@@ -948,10 +897,10 @@ static const IBasicAudioVtbl IBasicAudio_Vtbl =
Basicaudio_QueryInterface, Basicaudio_QueryInterface,
Basicaudio_AddRef, Basicaudio_AddRef,
Basicaudio_Release, Basicaudio_Release,
Basicaudio_GetTypeInfoCount, BasicAudioImpl_GetTypeInfoCount,
Basicaudio_GetTypeInfo, BasicAudioImpl_GetTypeInfo,
Basicaudio_GetIDsOfNames, BasicAudioImpl_GetIDsOfNames,
Basicaudio_Invoke, BasicAudioImpl_Invoke,
Basicaudio_put_Volume, Basicaudio_put_Volume,
Basicaudio_get_Volume, Basicaudio_get_Volume,
Basicaudio_put_Balance, Basicaudio_put_Balance,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment