Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenbasicaudio.cpp
Go to the documentation of this file.
00001 /* 00002 * COPYRIGHT: See COPYING in the top level directory 00003 * PROJECT: ReactOS WDM Streaming ActiveMovie Proxy 00004 * FILE: dll/directx/ksproxy/basicaudio.cpp 00005 * PURPOSE: IBasicAudio interface 00006 * 00007 * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) 00008 */ 00009 #include "precomp.h" 00010 00011 class CKsBasicAudio : public IBasicAudio, 00012 public IDistributorNotify 00013 { 00014 public: 00015 STDMETHODIMP QueryInterface( REFIID InterfaceId, PVOID* Interface); 00016 00017 STDMETHODIMP_(ULONG) AddRef() 00018 { 00019 InterlockedIncrement(&m_Ref); 00020 return m_Ref; 00021 } 00022 STDMETHODIMP_(ULONG) Release() 00023 { 00024 InterlockedDecrement(&m_Ref); 00025 00026 if (!m_Ref) 00027 { 00028 delete this; 00029 return 0; 00030 } 00031 return m_Ref; 00032 } 00033 00034 // IDistributorNotify methods 00035 HRESULT STDMETHODCALLTYPE Stop(); 00036 HRESULT STDMETHODCALLTYPE Pause(); 00037 HRESULT STDMETHODCALLTYPE Run(REFERENCE_TIME tStart); 00038 HRESULT STDMETHODCALLTYPE SetSyncSource(IReferenceClock *pClock); 00039 HRESULT STDMETHODCALLTYPE NotifyGraphChange(); 00040 00041 // IDispatch methods 00042 HRESULT STDMETHODCALLTYPE GetTypeInfoCount(UINT *pctinfo); 00043 HRESULT STDMETHODCALLTYPE GetTypeInfo(UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo); 00044 HRESULT STDMETHODCALLTYPE GetIDsOfNames(REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId); 00045 HRESULT STDMETHODCALLTYPE Invoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr); 00046 00047 00048 // IBasicAudio methods 00049 HRESULT STDMETHODCALLTYPE put_Volume(long lVolume); 00050 HRESULT STDMETHODCALLTYPE get_Volume(long *plVolume); 00051 HRESULT STDMETHODCALLTYPE put_Balance(long lBalance); 00052 HRESULT STDMETHODCALLTYPE get_Balance(long *plBalance); 00053 00054 00055 CKsBasicAudio() : m_Ref(0){} 00056 virtual ~CKsBasicAudio(){} 00057 00058 protected: 00059 LONG m_Ref; 00060 }; 00061 00062 HRESULT 00063 STDMETHODCALLTYPE 00064 CKsBasicAudio::QueryInterface( 00065 IN REFIID refiid, 00066 OUT PVOID* Output) 00067 { 00068 if (IsEqualGUID(refiid, IID_IUnknown)) 00069 { 00070 *Output = PVOID(this); 00071 reinterpret_cast<IUnknown*>(*Output)->AddRef(); 00072 return NOERROR; 00073 } 00074 if (IsEqualGUID(refiid, IID_IDistributorNotify)) 00075 { 00076 *Output = (IDistributorNotify*)(this); 00077 reinterpret_cast<IDistributorNotify*>(*Output)->AddRef(); 00078 return NOERROR; 00079 } 00080 00081 if (IsEqualGUID(refiid, IID_IBasicAudio)) 00082 { 00083 *Output = (IBasicAudio*)(this); 00084 reinterpret_cast<IBasicAudio*>(*Output)->AddRef(); 00085 return NOERROR; 00086 } 00087 00088 return E_NOINTERFACE; 00089 } 00090 00091 //------------------------------------------------------------------- 00092 // IDistributorNotify interface 00093 // 00094 00095 00096 HRESULT 00097 STDMETHODCALLTYPE 00098 CKsBasicAudio::Stop() 00099 { 00100 #ifdef KSPROXY_TRACE 00101 OutputDebugStringW(L"UNIMPLEMENTED\n"); 00102 #endif 00103 return E_NOTIMPL; 00104 } 00105 00106 HRESULT 00107 STDMETHODCALLTYPE 00108 CKsBasicAudio::Pause() 00109 { 00110 #ifdef KSPROXY_TRACE 00111 OutputDebugStringW(L"UNIMPLEMENTED\n"); 00112 #endif 00113 00114 return E_NOTIMPL; 00115 } 00116 00117 HRESULT 00118 STDMETHODCALLTYPE 00119 CKsBasicAudio::Run( 00120 REFERENCE_TIME tStart) 00121 { 00122 #ifdef KSPROXY_TRACE 00123 OutputDebugStringW(L"UNIMPLEMENTED\n"); 00124 #endif 00125 00126 return E_NOTIMPL; 00127 } 00128 00129 HRESULT 00130 STDMETHODCALLTYPE 00131 CKsBasicAudio::SetSyncSource( 00132 IReferenceClock *pClock) 00133 { 00134 #ifdef KSPROXY_TRACE 00135 OutputDebugStringW(L"UNIMPLEMENTED\n"); 00136 #endif 00137 return E_NOTIMPL; 00138 } 00139 00140 HRESULT 00141 STDMETHODCALLTYPE 00142 CKsBasicAudio::NotifyGraphChange() 00143 { 00144 #ifdef KSPROXY_TRACE 00145 OutputDebugStringW(L"UNIMPLEMENTED\n"); 00146 #endif 00147 00148 return E_NOTIMPL; 00149 } 00150 00151 //------------------------------------------------------------------- 00152 // IDispatch interface 00153 // 00154 00155 HRESULT 00156 STDMETHODCALLTYPE 00157 CKsBasicAudio::GetTypeInfoCount( 00158 UINT *pctinfo) 00159 { 00160 #ifdef KSPROXY_TRACE 00161 OutputDebugStringW(L"UNIMPLEMENTED\n"); 00162 #endif 00163 00164 return E_NOTIMPL; 00165 } 00166 00167 HRESULT 00168 STDMETHODCALLTYPE 00169 CKsBasicAudio::GetTypeInfo( 00170 UINT iTInfo, 00171 LCID lcid, 00172 ITypeInfo **ppTInfo) 00173 { 00174 #ifdef KSPROXY_TRACE 00175 OutputDebugStringW(L"UNIMPLEMENTED\n"); 00176 #endif 00177 return E_NOTIMPL; 00178 } 00179 00180 HRESULT 00181 STDMETHODCALLTYPE 00182 CKsBasicAudio::GetIDsOfNames( 00183 REFIID riid, 00184 LPOLESTR *rgszNames, 00185 UINT cNames, 00186 LCID lcid, 00187 DISPID *rgDispId) 00188 { 00189 #ifdef KSPROXY_TRACE 00190 OutputDebugStringW(L"UNIMPLEMENTED\n"); 00191 #endif 00192 00193 return E_NOTIMPL; 00194 } 00195 00196 HRESULT 00197 STDMETHODCALLTYPE 00198 CKsBasicAudio::Invoke( 00199 DISPID dispIdMember, 00200 REFIID riid, 00201 LCID lcid, 00202 WORD wFlags, 00203 DISPPARAMS *pDispParams, 00204 VARIANT *pVarResult, 00205 EXCEPINFO *pExcepInfo, 00206 UINT *puArgErr) 00207 { 00208 #ifdef KSPROXY_TRACE 00209 OutputDebugStringW(L"UNIMPLEMENTED\n"); 00210 #endif 00211 00212 return E_NOTIMPL; 00213 } 00214 00215 //------------------------------------------------------------------- 00216 // IBasicAudio interface 00217 // 00218 00219 HRESULT 00220 STDMETHODCALLTYPE 00221 CKsBasicAudio::put_Volume( 00222 long lVolume) 00223 { 00224 #ifdef KSPROXY_TRACE 00225 OutputDebugStringW(L"UNIMPLEMENTED\n"); 00226 #endif 00227 00228 return E_NOTIMPL; 00229 } 00230 00231 00232 HRESULT 00233 STDMETHODCALLTYPE 00234 CKsBasicAudio::get_Volume( 00235 long *plVolume) 00236 { 00237 #ifdef KSPROXY_TRACE 00238 OutputDebugStringW(L"UNIMPLEMENTED\n"); 00239 #endif 00240 00241 return E_NOTIMPL; 00242 } 00243 00244 00245 HRESULT 00246 STDMETHODCALLTYPE 00247 CKsBasicAudio::put_Balance( 00248 long lBalance) 00249 { 00250 #ifdef KSPROXY_TRACE 00251 OutputDebugStringW(L"UNIMPLEMENTED\n"); 00252 #endif 00253 00254 return E_NOTIMPL; 00255 } 00256 00257 00258 HRESULT 00259 STDMETHODCALLTYPE 00260 CKsBasicAudio::get_Balance( 00261 long *plBalance) 00262 { 00263 #ifdef KSPROXY_TRACE 00264 OutputDebugStringW(L"UNIMPLEMENTED\n"); 00265 #endif 00266 00267 return E_NOTIMPL; 00268 } 00269 00270 HRESULT 00271 WINAPI 00272 CKsBasicAudio_Constructor( 00273 IUnknown * pUnkOuter, 00274 REFIID riid, 00275 LPVOID * ppv) 00276 { 00277 #ifdef KSPROXY_TRACE 00278 OutputDebugStringW(L"CKsBasicAudio_Constructor\n"); 00279 #endif 00280 00281 CKsBasicAudio * handler = new CKsBasicAudio(); 00282 00283 if (!handler) 00284 return E_OUTOFMEMORY; 00285 00286 if (FAILED(handler->QueryInterface(riid, ppv))) 00287 { 00288 /* not supported */ 00289 delete handler; 00290 return E_NOINTERFACE; 00291 } 00292 00293 return NOERROR; 00294 } Generated on Sat May 26 2012 04:20:21 for ReactOS by
1.7.6.1
|