ReactOS  0.4.14-dev-98-gb0d4763
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 
11 class CKsBasicAudio : public IBasicAudio,
12  public IDistributorNotify
13 {
14 public:
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
49  HRESULT STDMETHODCALLTYPE put_Volume(long lVolume);
50  HRESULT STDMETHODCALLTYPE get_Volume(long *plVolume);
51  HRESULT STDMETHODCALLTYPE put_Balance(long lBalance);
52  HRESULT STDMETHODCALLTYPE get_Balance(long *plBalance);
53 
54 
56  virtual ~CKsBasicAudio(){}
57 
58 protected:
60 };
61 
62 HRESULT
65  IN REFIID refiid,
66  OUT PVOID* Output)
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 
96 HRESULT
99 {
100 #ifdef KSPROXY_TRACE
101  OutputDebugStringW(L"UNIMPLEMENTED\n");
102 #endif
103  return E_NOTIMPL;
104 }
105 
106 HRESULT
109 {
110 #ifdef KSPROXY_TRACE
111  OutputDebugStringW(L"UNIMPLEMENTED\n");
112 #endif
113 
114  return E_NOTIMPL;
115 }
116 
117 HRESULT
120  REFERENCE_TIME tStart)
121 {
122 #ifdef KSPROXY_TRACE
123  OutputDebugStringW(L"UNIMPLEMENTED\n");
124 #endif
125 
126  return E_NOTIMPL;
127 }
128 
129 HRESULT
132  IReferenceClock *pClock)
133 {
134 #ifdef KSPROXY_TRACE
135  OutputDebugStringW(L"UNIMPLEMENTED\n");
136 #endif
137  return E_NOTIMPL;
138 }
139 
140 HRESULT
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 
155 HRESULT
158  UINT *pctinfo)
159 {
160 #ifdef KSPROXY_TRACE
161  OutputDebugStringW(L"UNIMPLEMENTED\n");
162 #endif
163 
164  return E_NOTIMPL;
165 }
166 
167 HRESULT
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 
180 HRESULT
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 
196 HRESULT
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 
219 HRESULT
222  long lVolume)
223 {
224 #ifdef KSPROXY_TRACE
225  OutputDebugStringW(L"UNIMPLEMENTED\n");
226 #endif
227 
228  return E_NOTIMPL;
229 }
230 
231 
232 HRESULT
235  long *plVolume)
236 {
237 #ifdef KSPROXY_TRACE
238  OutputDebugStringW(L"UNIMPLEMENTED\n");
239 #endif
240 
241  return E_NOTIMPL;
242 }
243 
244 
245 HRESULT
248  long lBalance)
249 {
250 #ifdef KSPROXY_TRACE
251  OutputDebugStringW(L"UNIMPLEMENTED\n");
252 #endif
253 
254  return E_NOTIMPL;
255 }
256 
257 
258 HRESULT
261  long *plBalance)
262 {
263 #ifdef KSPROXY_TRACE
264  OutputDebugStringW(L"UNIMPLEMENTED\n");
265 #endif
266 
267  return E_NOTIMPL;
268 }
269 
270 HRESULT
271 WINAPI
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 }
HRESULT WINAPI CKsBasicAudio_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppv)
Definition: basicaudio.cpp:272
#define IN
Definition: typedefs.h:38
#define REFIID
Definition: guiddef.h:118
HRESULT STDMETHODCALLTYPE GetTypeInfoCount(UINT *pctinfo)
Definition: basicaudio.cpp:157
#define E_NOINTERFACE
Definition: winerror.h:2364
HRESULT STDMETHODCALLTYPE put_Balance(long lBalance)
Definition: basicaudio.cpp:247
_In_ BOOLEAN Release
Definition: classpnp.h:929
#define NOERROR
Definition: winerror.h:2354
HRESULT STDMETHODCALLTYPE NotifyGraphChange()
Definition: basicaudio.cpp:142
STDMETHODIMP_(ULONG) AddRef()
Definition: basicaudio.cpp:17
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
virtual ~CKsBasicAudio()
Definition: basicaudio.cpp:56
DWORD LCID
Definition: nls.h:13
static LPOLESTR
Definition: stg_prop.c:27
STDMETHODIMP QueryInterface(REFIID InterfaceId, PVOID *Interface)
Definition: basicaudio.cpp:64
HRESULT STDMETHODCALLTYPE get_Volume(long *plVolume)
Definition: basicaudio.cpp:234
void WINAPI SHIM_OBJ_NAME() OutputDebugStringW(LPCWSTR lpOutputString)
Definition: ignoredbgout.c:23
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
long LONG
Definition: pedump.c:60
HRESULT STDMETHODCALLTYPE GetTypeInfo(UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: basicaudio.cpp:169
#define STDMETHODIMP
Definition: basetyps.h:43
void * PVOID
Definition: retypes.h:9
STDMETHODIMP_(ULONG) Release()
Definition: basicaudio.cpp:22
IN PVOID IN PVOID IN USHORT IN USHORT IN PINTERFACE Interface
Definition: pci.h:359
LONGLONG REFERENCE_TIME
Definition: dmusicks.h:9
LONG HRESULT
Definition: typedefs.h:77
const GUID IID_IUnknown
#define WINAPI
Definition: msvc.h:8
#define STDMETHODCALLTYPE
Definition: bdasup.h:9
unsigned short WORD
Definition: ntddk_ex.h:93
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 put_Volume(long lVolume)
Definition: basicaudio.cpp:221
HRESULT STDMETHODCALLTYPE get_Balance(long *plBalance)
Definition: basicaudio.cpp:260
static const WCHAR L[]
Definition: oid.c:1250
#define InterlockedDecrement
Definition: armddk.h:52
Definition: arc.h:85
HRESULT STDMETHODCALLTYPE Run(REFERENCE_TIME tStart)
Definition: basicaudio.cpp:119
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:519
struct stdole::EXCEPINFO EXCEPINFO
HRESULT STDMETHODCALLTYPE SetSyncSource(IReferenceClock *pClock)
Definition: basicaudio.cpp:131
static VARIANTARG static DISPID
Definition: ordinal.c:49
#define InterlockedIncrement
Definition: armddk.h:53
#define E_NOTIMPL
Definition: ddrawi.h:99
unsigned int UINT
Definition: ndis.h:50
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4021
static ULONG WINAPI AddRef(IStream *iface)
Definition: clist.c:90
HRESULT STDMETHODCALLTYPE GetIDsOfNames(REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: basicaudio.cpp:182
const GUID IID_IDistributorNotify
HRESULT STDMETHODCALLTYPE Pause()
Definition: basicaudio.cpp:108
#define OUT
Definition: typedefs.h:39
struct stdole::DISPPARAMS DISPPARAMS
unsigned int ULONG
Definition: retypes.h:1
UINT(* handler)(MSIPACKAGE *)
Definition: action.c:7786
HRESULT STDMETHODCALLTYPE Stop()
Definition: basicaudio.cpp:98