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.

103 lines
3.0 KiB

  1. #include "resource.h" // main symbols
  2. #include "dsound.h"
  3. #define typedef__dxj_DirectSoundSink LPDIRECTSOUNDSINK8
  4. /////////////////////////////////////////////////////////////////////////////
  5. // Direct
  6. //REVIEW -- using pointers to ID's is necessary because some compilers don't like
  7. //references as template arguments.
  8. class C_dxj_DirectSoundSinkObject :
  9. #ifdef USING_IDISPATCH
  10. public CComDualImpl<I_dxj_DirectSoundSink, &IID_I_dxj_DirectSoundSink, &LIBID_DIRECTLib>,
  11. public ISupportErrorInfo,
  12. #else
  13. public I_dxj_DirectSoundSink,
  14. #endif
  15. public CComObjectRoot
  16. {
  17. public:
  18. C_dxj_DirectSoundSinkObject() ;
  19. virtual ~C_dxj_DirectSoundSinkObject() ;
  20. BEGIN_COM_MAP(C_dxj_DirectSoundSinkObject)
  21. COM_INTERFACE_ENTRY(I_dxj_DirectSoundSink)
  22. #ifdef USING_IDISPATCH
  23. COM_INTERFACE_ENTRY(IDispatch)
  24. COM_INTERFACE_ENTRY(ISupportErrorInfo)
  25. #endif
  26. END_COM_MAP()
  27. DECLARE_AGGREGATABLE(C_dxj_DirectSoundSinkObject)
  28. #ifdef USING_IDISPATCH
  29. // ISupportsErrorInfo
  30. STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);
  31. #endif
  32. // I_dxj_DirectSoundSink
  33. public:
  34. /* [hidden] */ HRESULT STDMETHODCALLTYPE InternalSetObject(
  35. /* [in] */ IUnknown __RPC_FAR *lpdd);
  36. /* [hidden] */ HRESULT STDMETHODCALLTYPE InternalGetObject(
  37. /* [retval][out] */ IUnknown __RPC_FAR *__RPC_FAR *lpdd);
  38. HRESULT STDMETHODCALLTYPE AddSource(I_dxj_DirectSoundSource __RPC_FAR *Source);
  39. HRESULT STDMETHODCALLTYPE RemoveSource(I_dxj_DirectSoundSource __RPC_FAR *Source);
  40. HRESULT STDMETHODCALLTYPE SetMasterClock(I_dxj_ReferenceClock __RPC_FAR *MasterClock);
  41. HRESULT STDMETHODCALLTYPE GetSoundBuffer(long lBuffer, I_dxj_DirectSoundBuffer __RPC_FAR *__RPC_FAR *SoundBuffer);
  42. HRESULT STDMETHODCALLTYPE GetBusIDs(SAFEARRAY **lBusIDs);
  43. HRESULT STDMETHODCALLTYPE GetSoundBufferBusIDs(I_dxj_DirectSoundBuffer __RPC_FAR *buffer, SAFEARRAY **lBusIDs);
  44. HRESULT STDMETHODCALLTYPE GetLatencyClock(
  45. /* [in,out] */ I_dxj_ReferenceClock __RPC_FAR *__RPC_FAR *Clock);
  46. HRESULT STDMETHODCALLTYPE Activate(
  47. /* [in] */ long fEnable);
  48. HRESULT STDMETHODCALLTYPE CreateSoundBuffer(
  49. /* [in] */ DSBUFFERDESC_CDESC __RPC_FAR *BufferDesc,
  50. /* [in] */ long lBusID,
  51. /* [out,retval] */ I_dxj_DirectSoundBuffer __RPC_FAR **Buffer);
  52. HRESULT STDMETHODCALLTYPE CreateSoundBufferFromFile(
  53. /* [in] */ BSTR fileName,
  54. /* [in] */ DSBUFFERDESC_CDESC __RPC_FAR *BufferDesc,
  55. /* [in] */ long lBusID,
  56. /* [out,retval] */ I_dxj_DirectSoundBuffer __RPC_FAR **Buffer);
  57. HRESULT STDMETHODCALLTYPE GetBusCount(
  58. /* [out,retval] */ long *lCount);
  59. HRESULT STDMETHODCALLTYPE PlayWave(
  60. /* [in] */ long rt,
  61. /* [in] */ I_dxj_DirectSoundWave __RPC_FAR *Wave,
  62. /* [in] */ long lFlags);
  63. // note: this is public for the callbacks
  64. DECL_VARIABLE(_dxj_DirectSoundSink);
  65. private:
  66. public:
  67. DX3J_GLOBAL_LINKS(_dxj_DirectSoundSink);
  68. DWORD InternalAddRef();
  69. DWORD InternalRelease();
  70. };