Source code of Windows XP (NT5)
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.

141 lines
3.5 KiB

  1. /*++
  2. Copyright (c) 1998 Microsoft Corporation
  3. Module Name:
  4. waveaddr.cpp
  5. Abstract:
  6. This module contains implementation of CWaveMSP.
  7. Author:
  8. Zoltan Szilagyi (zoltans) September 7, 1998
  9. --*/
  10. #include "stdafx.h"
  11. ///////////////////////////////////////////////////////////////////////////////
  12. ///////////////////////////////////////////////////////////////////////////////
  13. //
  14. CWaveMSP::CWaveMSP()
  15. {
  16. LOG((MSP_TRACE, "CWaveMSP::CWaveMSP entered."));
  17. LOG((MSP_TRACE, "CWaveMSP::CWaveMSP exited."));
  18. }
  19. ///////////////////////////////////////////////////////////////////////////////
  20. ///////////////////////////////////////////////////////////////////////////////
  21. //
  22. CWaveMSP::~CWaveMSP()
  23. {
  24. LOG((MSP_TRACE, "CWaveMSP::~CWaveMSP entered."));
  25. LOG((MSP_TRACE, "CWaveMSP::~CWaveMSP exited."));
  26. }
  27. ///////////////////////////////////////////////////////////////////////////////
  28. ///////////////////////////////////////////////////////////////////////////////
  29. //
  30. ULONG CWaveMSP::MSPAddressAddRef(void)
  31. {
  32. return MSPAddRefHelper(this);
  33. }
  34. ULONG CWaveMSP::MSPAddressRelease(void)
  35. {
  36. return MSPReleaseHelper(this);
  37. }
  38. ///////////////////////////////////////////////////////////////////////////////
  39. ///////////////////////////////////////////////////////////////////////////////
  40. //
  41. STDMETHODIMP CWaveMSP::CreateMSPCall(
  42. IN MSP_HANDLE htCall,
  43. IN DWORD dwReserved,
  44. IN DWORD dwMediaType,
  45. IN IUnknown * pOuterUnknown,
  46. OUT IUnknown ** ppMSPCall
  47. )
  48. {
  49. LOG((MSP_TRACE, "CWaveMSP::CreateMSPCall - enter"));
  50. CWaveMSPCall * pCWaveMSPCall;
  51. HRESULT hr = CreateMSPCallHelper<CWaveMSPCall>(this,
  52. htCall,
  53. dwReserved,
  54. dwMediaType,
  55. pOuterUnknown,
  56. ppMSPCall,
  57. &pCWaveMSPCall);
  58. //
  59. // pCWaveMSPCall is not addrefed; no need to release.
  60. //
  61. if ( FAILED(hr) )
  62. {
  63. LOG((MSP_ERROR, "CWaveMSP::CreateMSPCall - template helper returned"
  64. "0x%08x", hr));
  65. return hr;
  66. }
  67. LOG((MSP_TRACE, "CWaveMSP::CreateMSPCall - exit S_OK"));
  68. return S_OK;
  69. }
  70. ///////////////////////////////////////////////////////////////////////////////
  71. ///////////////////////////////////////////////////////////////////////////////
  72. //
  73. STDMETHODIMP CWaveMSP::ShutdownMSPCall (
  74. IN IUnknown * pMSPCall
  75. )
  76. {
  77. LOG((MSP_TRACE, "CWaveMSP::ShutdownMSPCall - enter"));
  78. CWaveMSPCall * pCWaveMSPCall;
  79. HRESULT hr = ShutdownMSPCallHelper<CWaveMSPCall>(pMSPCall,
  80. &pCWaveMSPCall);
  81. //
  82. // pCWaveMSPCall is not addrefed; no need to release.
  83. //
  84. if ( FAILED(hr) )
  85. {
  86. LOG((MSP_ERROR, "CWaveMSP::ShutdownMSPCall - template helper returned"
  87. "0x%08x", hr));
  88. return hr;
  89. }
  90. LOG((MSP_TRACE, "CWaveMSP::ShutdownMSPCall - exit S_OK"));
  91. return S_OK;
  92. }
  93. ///////////////////////////////////////////////////////////////////////////////
  94. ///////////////////////////////////////////////////////////////////////////////
  95. //
  96. // Mandatory CMSPAddress override. This indicates the media types that
  97. // we support.
  98. //
  99. DWORD CWaveMSP::GetCallMediaTypes(void)
  100. {
  101. return (DWORD) TAPIMEDIATYPE_AUDIO;
  102. }
  103. // eof