| 1 | 
 /** | 
 
 
 
 
 
 | 2 | 
  * This file has no copyright assigned and is placed in the Public Domain. | 
 
 
 
 
 
 | 3 | 
  * This file is part of the mingw-w64 runtime package. | 
 
 
 
 
 
 | 4 | 
  * No warranty is given; refer to the file DISCLAIMER.PD within this package. | 
 
 
 
 
 
 | 5 | 
  */ | 
 
 
 
 
 
 | 6 | 
 #ifndef _MSPTRMAC_H_ | 
 
 
 
 
 
 | 7 | 
 #define _MSPTRMAC_H_ | 
 
 
 
 
 
 | 8 | 
  | 
 
 
 
 
 
 | 9 | 
 #define WAVEIN_NAME L"WaveIn Terminal" | 
 
 
 
 
 
 | 10 | 
  | 
 
 
 
 
 
 | 11 | 
 #ifdef __cplusplus | 
 
 
 
 
 
 | 12 | 
  | 
 
 
 
 
 
 | 13 | 
 class CAudioCaptureTerminal : public IDispatchImpl<ITBasicAudioTerminal,&IID_ITBasicAudioTerminal,&LIBID_TAPI3Lib>,public IDispatchImpl<ITStaticAudioTerminal,&IID_ITStaticAudioTerminal,&LIBID_TAPI3Lib>,public CSingleFilterStaticTerminal,public CMSPObjectSafetyImpl | 
 
 
 
 
 
 | 14 | 
 { | 
 
 
 
 
 
 | 15 | 
   BEGIN_COM_MAP(CAudioCaptureTerminal) | 
 
 
 
 
 
 | 16 | 
     COM_INTERFACE_ENTRY(IObjectSafety) | 
 
 
 
 
 
 | 17 | 
     COM_INTERFACE_ENTRY(ITBasicAudioTerminal) | 
 
 
 
 
 
 | 18 | 
     COM_INTERFACE_ENTRY(ITStaticAudioTerminal) | 
 
 
 
 
 
 | 19 | 
     COM_INTERFACE_ENTRY_CHAIN(CSingleFilterStaticTerminal) | 
 
 
 
 
 
 | 20 | 
   END_COM_MAP() | 
 
 
 
 
 
 | 21 | 
   DECLARE_VQI() | 
 
 
 
 
 
 | 22 | 
   DECLARE_LOG_ADDREF_RELEASE(CAudioCaptureTerminal) | 
 
 
 
 
 
 | 23 | 
 public: | 
 
 
 
 
 
 | 24 | 
   CAudioCaptureTerminal(); | 
 
 
 
 
 
 | 25 | 
   virtual ~CAudioCaptureTerminal(); | 
 
 
 
 
 
 | 26 | 
   static HRESULT CreateTerminal(CComPtr<IMoniker> pMoniker,MSP_HANDLE htAddress,ITTerminal **ppTerm); | 
 
 
 
 
 
 | 27 | 
   HRESULT FindTerminalPin(); | 
 
 
 
 
 
 | 28 | 
 public: | 
 
 
 
 
 
 | 29 | 
   STDMETHOD(get_Balance)(__LONG32 *pVal); | 
 
 
 
 
 
 | 30 | 
   STDMETHOD(put_Balance)(__LONG32 newVal); | 
 
 
 
 
 
 | 31 | 
   STDMETHOD(get_Volume) (__LONG32 *pVal); | 
 
 
 
 
 
 | 32 | 
   STDMETHOD(put_Volume) (__LONG32 newVal); | 
 
 
 
 
 
 | 33 | 
 public: | 
 
 
 
 
 
 | 34 | 
   STDMETHOD(get_WaveId) (__LONG32 *plWaveId); | 
 
 
 
 
 
 | 35 | 
   STDMETHODIMP CompleteConnectTerminal(void); | 
 
 
 
 
 
 | 36 | 
   STDMETHODIMP DisconnectTerminal(IGraphBuilder *pGraph,DWORD dwReserved); | 
 
 
 
 
 
 | 37 | 
   virtual HRESULT AddFiltersToGraph(); | 
 
 
 
 
 
 | 38 | 
   virtual DWORD GetSupportedMediaTypes(void) { return (DWORD) TAPIMEDIATYPE_AUDIO; } | 
 
 
 
 
 
 | 39 | 
   HRESULT CreateFilters(); | 
 
 
 
 
 
 | 40 | 
   inline HRESULT CreateFiltersIfRequired(); | 
 
 
 
 
 
 | 41 | 
 private: | 
 
 
 
 
 
 | 42 | 
   bool m_bResourceReserved; | 
 
 
 
 
 
 | 43 | 
   CComPtr<IAMAudioInputMixer> m_pIAMAudioInputMixer; | 
 
 
 
 
 
 | 44 | 
 }; | 
 
 
 
 
 
 | 45 | 
  | 
 
 
 
 
 
 | 46 | 
 inline HRESULT CAudioCaptureTerminal::CreateFiltersIfRequired() { | 
 
 
 
 
 
 | 47 | 
   if(!m_pIFilter) return CreateFilters(); | 
 
 
 
 
 
 | 48 | 
   return S_OK; | 
 
 
 
 
 
 | 49 | 
 } | 
 
 
 
 
 
 | 50 | 
  | 
 
 
 
 
 
 | 51 | 
 #endif /* __cplusplus */ | 
 
 
 
 
 
 | 52 | 
  | 
 
 
 
 
 
 | 53 | 
 #endif |