Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

151 lines
4.2 KiB

  1. ///////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Name: H323audt.h
  4. //
  5. // Description: Definition of the CH323AudioCaptureTerminal class and
  6. // CH323AudioRenderTerminal class
  7. //
  8. ///////////////////////////////////////////////////////////////////////////////
  9. #ifndef _H323AUDT_H_
  10. #define _H323AUDT_H_
  11. #include "h323term.h"
  12. /////////////////////////////////////////////////////////////////////////////
  13. // CH323AudioCaptureTerminal
  14. /////////////////////////////////////////////////////////////////////////////
  15. const DWORD AUDIO_CAPTURE_FILTER_NUMPINS = 1;
  16. class CH323AudioCaptureTerminal :
  17. public IDispatchImpl<ITBasicAudioTerminal, &IID_ITBasicAudioTerminal, &LIBID_TAPI3Lib>,
  18. public IDispatchImpl<ITStaticAudioTerminal, &IID_ITStaticAudioTerminal, &LIBID_TAPI3Lib>,
  19. public CH323BaseTerminal
  20. {
  21. BEGIN_COM_MAP(CH323AudioCaptureTerminal)
  22. COM_INTERFACE_ENTRY(ITBasicAudioTerminal)
  23. COM_INTERFACE_ENTRY(ITStaticAudioTerminal)
  24. COM_INTERFACE_ENTRY_CHAIN(CH323BaseTerminal)
  25. END_COM_MAP()
  26. public:
  27. CH323AudioCaptureTerminal();
  28. virtual ~CH323AudioCaptureTerminal();
  29. static HRESULT CreateTerminal(
  30. IN AudioDeviceInfo *pAudioDevieInfo,
  31. IN MSP_HANDLE htAddress,
  32. OUT ITTerminal **ppTerm
  33. );
  34. HRESULT Initialize (
  35. IN AudioDeviceInfo *pAudioDevieInfo,
  36. IN MSP_HANDLE htAddress
  37. );
  38. STDMETHODIMP DisconnectTerminal(
  39. IN IGraphBuilder * pGraph,
  40. IN DWORD dwReserved
  41. );
  42. // ITBasicAudioTerminal
  43. STDMETHOD(get_Balance)(OUT long *pVal);
  44. STDMETHOD(put_Balance)(IN long newVal);
  45. STDMETHOD(get_Volume) (OUT long *pVal);
  46. STDMETHOD(put_Volume) (IN long newVal);
  47. // ITStaticAudioTerminal
  48. STDMETHOD(get_WaveId) (OUT long * plWaveId);
  49. protected:
  50. HRESULT CreateFilter();
  51. DWORD GetNumExposedPins() const
  52. {
  53. return AUDIO_CAPTURE_FILTER_NUMPINS;
  54. }
  55. HRESULT GetExposedPins(
  56. IN IPin ** ppPins,
  57. IN DWORD dwNumPins
  58. );
  59. protected:
  60. UINT m_WaveID;
  61. GUID m_DSoundGuid;
  62. IAMAudioInputMixer * m_pIAMAudioInputMixer;
  63. };
  64. /////////////////////////////////////////////////////////////////////////////
  65. // CH323AudioRenderTerminal
  66. /////////////////////////////////////////////////////////////////////////////
  67. const DWORD AUDIO_RENDER_FILTER_NUMPINS = 1;
  68. class CH323AudioRenderTerminal :
  69. public IDispatchImpl<ITBasicAudioTerminal, &IID_ITBasicAudioTerminal, &LIBID_TAPI3Lib>,
  70. public IDispatchImpl<ITStaticAudioTerminal, &IID_ITStaticAudioTerminal, &LIBID_TAPI3Lib>,
  71. public CH323BaseTerminal
  72. {
  73. BEGIN_COM_MAP(CH323AudioRenderTerminal)
  74. COM_INTERFACE_ENTRY(ITBasicAudioTerminal)
  75. COM_INTERFACE_ENTRY(ITStaticAudioTerminal)
  76. COM_INTERFACE_ENTRY_CHAIN(CH323BaseTerminal)
  77. END_COM_MAP()
  78. public:
  79. CH323AudioRenderTerminal();
  80. virtual ~CH323AudioRenderTerminal();
  81. static HRESULT CreateTerminal(
  82. IN AudioDeviceInfo *pAudioDevieInfo,
  83. IN MSP_HANDLE htAddress,
  84. OUT ITTerminal **ppTerm
  85. );
  86. HRESULT Initialize (
  87. IN AudioDeviceInfo *pAudioDevieInfo,
  88. IN MSP_HANDLE htAddress
  89. );
  90. STDMETHODIMP DisconnectTerminal(
  91. IN IGraphBuilder * pGraph,
  92. IN DWORD dwReserved
  93. );
  94. // ITBasicAudioTerminal
  95. STDMETHOD(get_Balance)(OUT long *pVal);
  96. STDMETHOD(put_Balance)(IN long newVal);
  97. STDMETHOD(get_Volume) (OUT long *pVal);
  98. STDMETHOD(put_Volume) (IN long newVal);
  99. // ITStaticAudioTerminal
  100. STDMETHOD(get_WaveId) (OUT long * plWaveId);
  101. protected:
  102. HRESULT CreateFilter();
  103. DWORD GetNumExposedPins() const
  104. {
  105. return AUDIO_RENDER_FILTER_NUMPINS;
  106. }
  107. HRESULT GetExposedPins(
  108. IN IPin ** ppPins,
  109. IN DWORD dwNumPins
  110. );
  111. protected:
  112. UINT m_WaveID;
  113. GUID m_DSoundGuid;
  114. IBasicAudio * m_pIBasicAudio;
  115. };
  116. #endif // _H323AUDT_H_
  117. // eof