2 * Generic Implementation of strmbase audio classes
4 * Copyright 2012 Aric Stewart, CodeWeavers
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
27 #include "wine/unicode.h"
28 #include "wine/strmbase.h"
31 static inline BasicAudio
*impl_from_IBasicAudio(IBasicAudio
*iface
)
33 return CONTAINING_RECORD(iface
, BasicAudio
, IBasicAudio_iface
);
36 HRESULT WINAPI
BasicAudio_Init(BasicAudio
*pBasicAudio
, const IBasicAudioVtbl
*lpVtbl
)
38 pBasicAudio
->IBasicAudio_iface
.lpVtbl
= lpVtbl
;
39 BaseDispatch_Init(&pBasicAudio
->baseDispatch
, &IID_IBasicAudio
);
44 HRESULT WINAPI
BasicAudio_Destroy(BasicAudio
*pBasicAudio
)
46 return BaseDispatch_Destroy(&pBasicAudio
->baseDispatch
);
49 HRESULT WINAPI
BasicAudioImpl_GetTypeInfoCount(IBasicAudio
*iface
, UINT
*pctinfo
)
51 BasicAudio
*This
= impl_from_IBasicAudio(iface
);
53 return BaseDispatchImpl_GetTypeInfoCount(&This
->baseDispatch
, pctinfo
);
56 HRESULT WINAPI
BasicAudioImpl_GetTypeInfo(IBasicAudio
*iface
, UINT iTInfo
, LCID lcid
, ITypeInfo
**ppTInfo
)
58 BasicAudio
*This
= impl_from_IBasicAudio(iface
);
60 return BaseDispatchImpl_GetTypeInfo(&This
->baseDispatch
, &IID_NULL
, iTInfo
, lcid
, ppTInfo
);
63 HRESULT WINAPI
BasicAudioImpl_GetIDsOfNames(IBasicAudio
*iface
, REFIID riid
, LPOLESTR
*rgszNames
, UINT cNames
, LCID lcid
, DISPID
*rgDispId
)
65 BasicAudio
*This
= impl_from_IBasicAudio(iface
);
67 return BaseDispatchImpl_GetIDsOfNames(&This
->baseDispatch
, riid
, rgszNames
, cNames
, lcid
, rgDispId
);
70 HRESULT WINAPI
BasicAudioImpl_Invoke(IBasicAudio
*iface
, DISPID dispIdMember
, REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
, VARIANT
*pVarResult
, EXCEPINFO
*pExepInfo
, UINT
*puArgErr
)
72 BasicAudio
*This
= impl_from_IBasicAudio(iface
);
76 hr
= BaseDispatchImpl_GetTypeInfo(&This
->baseDispatch
, riid
, 1, lcid
, &pTypeInfo
);
79 hr
= ITypeInfo_Invoke(pTypeInfo
, &This
->IBasicAudio_iface
, dispIdMember
, wFlags
, pDispParams
, pVarResult
, pExepInfo
, puArgErr
);
80 ITypeInfo_Release(pTypeInfo
);