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.

149 lines
5.1 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1998 - 1999
  6. //
  7. // File: dsoundbufferobj.h
  8. //
  9. //--------------------------------------------------------------------------
  10. // dSoundBufferObj.h : Declaration of the C_dxj_DirectSoundBufferObject
  11. // DHF_DS entire file
  12. #include "resource.h" // main symbols
  13. #define typedef__dxj_DirectSoundBuffer LPDIRECTSOUNDBUFFER8
  14. /////////////////////////////////////////////////////////////////////////////
  15. // Direct
  16. //REVIEW -- using pointers to ID's is necessary because some compilers don't like
  17. //references as template arguments.
  18. class C_dxj_DirectSoundBufferObject :
  19. #ifdef USING_IDISPATCH
  20. public CComDualImpl<I_dxj_DirectSoundBuffer, &IID_I_dxj_DirectSoundBuffer, &LIBID_DIRECTLib>,
  21. public ISupportErrorInfo,
  22. #else
  23. public I_dxj_DirectSoundBuffer,
  24. #endif
  25. //public CComCoClass<C_dxj_DirectSoundBufferObject, &CLSID__dxj_DirectSoundBuffer>,
  26. public CComObjectRoot
  27. {
  28. public:
  29. C_dxj_DirectSoundBufferObject() ;
  30. virtual ~C_dxj_DirectSoundBufferObject() ;
  31. BEGIN_COM_MAP(C_dxj_DirectSoundBufferObject)
  32. COM_INTERFACE_ENTRY(I_dxj_DirectSoundBuffer)
  33. #ifdef USING_IDISPATCH
  34. COM_INTERFACE_ENTRY(IDispatch)
  35. COM_INTERFACE_ENTRY(ISupportErrorInfo)
  36. #endif
  37. END_COM_MAP()
  38. //y DECLARE_REGISTRY(CLSID__dxj_DirectSoundBuffer, "DIRECT.DirectSoundBuffer.3", "DIRECT.DirectSoundBuffer.3", IDS_DSOUNDBUFFER_DESC, THREADFLAGS_BOTH)
  39. // Use DECLARE_NOT_AGGREGATABLE(C_dxj_DirectSoundBufferObject) if you don't want your object
  40. // to support aggregation
  41. DECLARE_AGGREGATABLE(C_dxj_DirectSoundBufferObject)
  42. #ifdef USING_IDISPATCH
  43. // ISupportsErrorInfo
  44. STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);
  45. #endif
  46. // I_dxj_DirectSoundBuffer
  47. public:
  48. /* [hidden] */ HRESULT STDMETHODCALLTYPE InternalSetObject(
  49. /* [in] */ IUnknown __RPC_FAR *lpdd);
  50. /* [hidden] */ HRESULT STDMETHODCALLTYPE InternalGetObject(
  51. /* [retval][out] */ IUnknown __RPC_FAR *__RPC_FAR *lpdd);
  52. HRESULT STDMETHODCALLTYPE getDirectSound3dBuffer(
  53. /* [retval][out] */ I_dxj_DirectSound3dBuffer __RPC_FAR *__RPC_FAR *lpdsb);
  54. HRESULT STDMETHODCALLTYPE getCaps(
  55. /* [out][in] */ DSBCAPS_CDESC __RPC_FAR *caps);
  56. HRESULT STDMETHODCALLTYPE getCurrentPosition(
  57. /* [out] */ DSCURSORS_CDESC __RPC_FAR *cursors);
  58. HRESULT STDMETHODCALLTYPE getFormat(
  59. /* [out][in] */ WAVEFORMATEX_CDESC __RPC_FAR *format);
  60. HRESULT STDMETHODCALLTYPE getVolume(
  61. /* [retval][out] */ long __RPC_FAR *volume);
  62. HRESULT STDMETHODCALLTYPE getPan(
  63. /* [retval][out] */ long __RPC_FAR *pan);
  64. HRESULT STDMETHODCALLTYPE getFrequency(
  65. /* [retval][out] */ long __RPC_FAR *frequency);
  66. HRESULT STDMETHODCALLTYPE getStatus(
  67. /* [retval][out] */ long __RPC_FAR *status);
  68. /* [hidden] */ HRESULT STDMETHODCALLTYPE initialize(
  69. /* [in] */ I_dxj_DirectSound __RPC_FAR *directSound,
  70. /* [out][in] */ DSBUFFERDESC_CDESC __RPC_FAR *bufferDesc,
  71. /* [out][in] */ byte __RPC_FAR *wbuf);
  72. HRESULT STDMETHODCALLTYPE writeBuffer(
  73. /* [in] */ long start,
  74. /* [in] */ long size,
  75. ///* [in] */ SAFEARRAY __RPC_FAR * __RPC_FAR *buffer,
  76. void * buf,
  77. /* [in] */ long flags);
  78. HRESULT STDMETHODCALLTYPE readBuffer(
  79. /* [in] */ long start,
  80. /* [in] */ long size,
  81. ///* [in] */ SAFEARRAY __RPC_FAR * __RPC_FAR *buffer,
  82. void * buf,
  83. /* [in] */ long flags);
  84. HRESULT STDMETHODCALLTYPE play(
  85. /* [in] */ long flags);
  86. HRESULT STDMETHODCALLTYPE setCurrentPosition(
  87. /* [in] */ long newPosition);
  88. HRESULT STDMETHODCALLTYPE setVolume(
  89. /* [in] */ long volume);
  90. HRESULT STDMETHODCALLTYPE setPan(
  91. /* [in] */ long pan);
  92. HRESULT STDMETHODCALLTYPE setFrequency(
  93. /* [in] */ long frequency);
  94. HRESULT STDMETHODCALLTYPE stop( void);
  95. HRESULT STDMETHODCALLTYPE restore( void);
  96. HRESULT STDMETHODCALLTYPE setNotificationPositions(long nElements,SAFEARRAY **ppsa);
  97. HRESULT STDMETHODCALLTYPE saveToFile(BSTR b);
  98. HRESULT STDMETHODCALLTYPE SetFX(long lEffectsCount, SAFEARRAY **Buffers, SAFEARRAY **lResultIDs);
  99. HRESULT STDMETHODCALLTYPE AcquireResources(long lFlags, SAFEARRAY **lEffects);
  100. HRESULT STDMETHODCALLTYPE GetObjectinPath(BSTR guidFX, long lIndex, BSTR iidInterface, IUnknown **ret);
  101. #if 0
  102. HRESULT STDMETHODCALLTYPE SetChannelVolume(long lChannelCount, SAFEARRAY **lChannels, SAFEARRAY **lVolumes);
  103. #endif
  104. private:
  105. DECL_VARIABLE(_dxj_DirectSoundBuffer);
  106. public:
  107. DX3J_GLOBAL_LINKS( _dxj_DirectSoundBuffer )
  108. };