ReactOS 0.4.15-dev-7942-gd23573b
basicaudio.cpp
Go to the documentation of this file.
1/*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS WDM Streaming ActiveMovie Proxy
4 * FILE: dll/directx/ksproxy/basicaudio.cpp
5 * PURPOSE: IBasicAudio interface
6 *
7 * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org)
8 */
9#include "precomp.h"
10
11class CKsBasicAudio : public IBasicAudio,
13{
14public:
16
18 {
20 return m_Ref;
21 }
23 {
25
26 if (!m_Ref)
27 {
28 delete this;
29 return 0;
30 }
31 return m_Ref;
32 }
33
34 // IDistributorNotify methods
40
41 // IDispatch methods
43 HRESULT STDMETHODCALLTYPE GetTypeInfo(UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo);
44 HRESULT STDMETHODCALLTYPE GetIDsOfNames(REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId);
45 HRESULT STDMETHODCALLTYPE Invoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr);
46
47
48 // IBasicAudio methods
50 HRESULT STDMETHODCALLTYPE get_Volume(long *plVolume);
52 HRESULT STDMETHODCALLTYPE get_Balance(long *plBalance);
53
54
56 virtual ~CKsBasicAudio(){}
57
58protected:
60};
61
65 IN REFIID refiid,
67{
68 if (IsEqualGUID(refiid, IID_IUnknown))
69 {
70 *Output = PVOID(this);
71 reinterpret_cast<IUnknown*>(*Output)->AddRef();
72 return NOERROR;
73 }
75 {
76 *Output = (IDistributorNotify*)(this);
77 reinterpret_cast<IDistributorNotify*>(*Output)->AddRef();
78 return NOERROR;
79 }
80
81 if (IsEqualGUID(refiid, IID_IBasicAudio))
82 {
83 *Output = (IBasicAudio*)(this);
84 reinterpret_cast<IBasicAudio*>(*Output)->AddRef();
85 return NOERROR;
86 }
87
88 return E_NOINTERFACE;
89}
90
91//-------------------------------------------------------------------
92// IDistributorNotify interface
93//
94
95
99{
100#ifdef KSPROXY_TRACE
101 OutputDebugStringW(L"UNIMPLEMENTED\n");
102#endif
103 return E_NOTIMPL;
104}
105
109{
110#ifdef KSPROXY_TRACE
111 OutputDebugStringW(L"UNIMPLEMENTED\n");
112#endif
113
114 return E_NOTIMPL;
115}
116
120 REFERENCE_TIME tStart)
121{
122#ifdef KSPROXY_TRACE
123 OutputDebugStringW(L"UNIMPLEMENTED\n");
124#endif
125
126 return E_NOTIMPL;
127}
128
132 IReferenceClock *pClock)
133{
134#ifdef KSPROXY_TRACE
135 OutputDebugStringW(L"UNIMPLEMENTED\n");
136#endif
137 return E_NOTIMPL;
138}
139
143{
144#ifdef KSPROXY_TRACE
145 OutputDebugStringW(L"UNIMPLEMENTED\n");
146#endif
147
148 return E_NOTIMPL;
149}
150
151//-------------------------------------------------------------------
152// IDispatch interface
153//
154
158 UINT *pctinfo)
159{
160#ifdef KSPROXY_TRACE
161 OutputDebugStringW(L"UNIMPLEMENTED\n");
162#endif
163
164 return E_NOTIMPL;
165}
166
170 UINT iTInfo,
171 LCID lcid,
172 ITypeInfo **ppTInfo)
173{
174#ifdef KSPROXY_TRACE
175 OutputDebugStringW(L"UNIMPLEMENTED\n");
176#endif
177 return E_NOTIMPL;
178}
179
183 REFIID riid,
184 LPOLESTR *rgszNames,
185 UINT cNames,
186 LCID lcid,
187 DISPID *rgDispId)
188{
189#ifdef KSPROXY_TRACE
190 OutputDebugStringW(L"UNIMPLEMENTED\n");
191#endif
192
193 return E_NOTIMPL;
194}
195
199 DISPID dispIdMember,
200 REFIID riid,
201 LCID lcid,
202 WORD wFlags,
203 DISPPARAMS *pDispParams,
204 VARIANT *pVarResult,
205 EXCEPINFO *pExcepInfo,
206 UINT *puArgErr)
207{
208#ifdef KSPROXY_TRACE
209 OutputDebugStringW(L"UNIMPLEMENTED\n");
210#endif
211
212 return E_NOTIMPL;
213}
214
215//-------------------------------------------------------------------
216// IBasicAudio interface
217//
218
222 long lVolume)
223{
224#ifdef KSPROXY_TRACE
225 OutputDebugStringW(L"UNIMPLEMENTED\n");
226#endif
227
228 return E_NOTIMPL;
229}
230
231
235 long *plVolume)
236{
237#ifdef KSPROXY_TRACE
238 OutputDebugStringW(L"UNIMPLEMENTED\n");
239#endif
240
241 return E_NOTIMPL;
242}
243
244
248 long lBalance)
249{
250#ifdef KSPROXY_TRACE
251 OutputDebugStringW(L"UNIMPLEMENTED\n");
252#endif
253
254 return E_NOTIMPL;
255}
256
257
261 long *plBalance)
262{
263#ifdef KSPROXY_TRACE
264 OutputDebugStringW(L"UNIMPLEMENTED\n");
265#endif
266
267 return E_NOTIMPL;
268}
269
271WINAPI
273 IUnknown * pUnkOuter,
274 REFIID riid,
275 LPVOID * ppv)
276{
277#ifdef KSPROXY_TRACE
278 OutputDebugStringW(L"CKsBasicAudio_Constructor\n");
279#endif
280
282
283 if (!handler)
284 return E_OUTOFMEMORY;
285
286 if (FAILED(handler->QueryInterface(riid, ppv)))
287 {
288 /* not supported */
289 delete handler;
290 return E_NOINTERFACE;
291 }
292
293 return NOERROR;
294}
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
#define STDMETHODIMP
Definition: basetyps.h:43
HRESULT WINAPI CKsBasicAudio_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppv)
Definition: basicaudio.cpp:272
const GUID IID_IUnknown
#define STDMETHODCALLTYPE
Definition: bdasup.h:9
HRESULT STDMETHODCALLTYPE Run(REFERENCE_TIME tStart)
Definition: basicaudio.cpp:119
STDMETHODIMP_(ULONG) Release()
Definition: basicaudio.cpp:22
HRESULT STDMETHODCALLTYPE NotifyGraphChange()
Definition: basicaudio.cpp:142
HRESULT STDMETHODCALLTYPE get_Volume(long *plVolume)
Definition: basicaudio.cpp:234
STDMETHODIMP_(ULONG) AddRef()
Definition: basicaudio.cpp:17
HRESULT STDMETHODCALLTYPE put_Volume(long lVolume)
Definition: basicaudio.cpp:221
STDMETHODIMP QueryInterface(REFIID InterfaceId, PVOID *Interface)
Definition: basicaudio.cpp:64
HRESULT STDMETHODCALLTYPE SetSyncSource(IReferenceClock *pClock)
Definition: basicaudio.cpp:131
HRESULT STDMETHODCALLTYPE put_Balance(long lBalance)
Definition: basicaudio.cpp:247
HRESULT STDMETHODCALLTYPE Invoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
Definition: basicaudio.cpp:198
HRESULT STDMETHODCALLTYPE Pause()
Definition: basicaudio.cpp:108
HRESULT STDMETHODCALLTYPE GetTypeInfo(UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: basicaudio.cpp:169
HRESULT STDMETHODCALLTYPE Stop()
Definition: basicaudio.cpp:98
HRESULT STDMETHODCALLTYPE GetIDsOfNames(REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: basicaudio.cpp:182
HRESULT STDMETHODCALLTYPE get_Balance(long *plBalance)
Definition: basicaudio.cpp:260
virtual ~CKsBasicAudio()
Definition: basicaudio.cpp:56
HRESULT STDMETHODCALLTYPE GetTypeInfoCount(UINT *pctinfo)
Definition: basicaudio.cpp:157
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_NOTIMPL
Definition: ddrawi.h:99
const GUID IID_IDistributorNotify
UINT(* handler)(MSIPACKAGE *)
Definition: action.c:7482
LONGLONG REFERENCE_TIME
Definition: dmusicks.h:9
unsigned short WORD
Definition: ntddk_ex.h:93
void WINAPI SHIM_OBJ_NAME() OutputDebugStringW(LPCWSTR lpOutputString)
Definition: ignoredbgout.c:23
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
ULONG AddRef()
ULONG Release()
#define FAILED(hr)
Definition: intsafe.h:51
static LPOLESTR
Definition: stg_prop.c:27
static VARIANTARG static DISPID
Definition: ordinal.c:52
unsigned int UINT
Definition: ndis.h:50
#define L(x)
Definition: ntvdm.h:50
long LONG
Definition: pedump.c:60
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define REFIID
Definition: guiddef.h:118
DWORD LCID
Definition: nls.h:13
@ Output
Definition: arc.h:85
void * PVOID
Definition: typedefs.h:50
#define IN
Definition: typedefs.h:39
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
struct tagRun Run
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE Interface
Definition: wdffdo.h:465
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:531
#define WINAPI
Definition: msvc.h:6
#define E_NOINTERFACE
Definition: winerror.h:2364
#define NOERROR
Definition: winerror.h:2354