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.

78 lines
1.9 KiB

  1. #include "resource.h" // main symbols
  2. #include "dsound.h"
  3. #define typedef__dxj_DirectSoundSource LPDIRECTSOUNDSOURCE
  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_DirectSoundSource :
  9. #ifdef USING_IDISPATCH
  10. public CComDualImpl<I_dxj_DirectSoundSource, &IID_I_dxj_DirectSoundSource, &LIBID_DIRECTLib>,
  11. public ISupportErrorInfo,
  12. #else
  13. public I_dxj_DirectSoundSource,
  14. #endif
  15. public CComObjectRoot
  16. {
  17. public:
  18. C_dxj_DirectSoundSource() ;
  19. virtual ~C_dxj_DirectSoundSource() ;
  20. BEGIN_COM_MAP(C_dxj_DirectSoundSource)
  21. COM_INTERFACE_ENTRY(I_dxj_DirectSoundSource)
  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_DirectSoundSource)
  28. #ifdef USING_IDISPATCH
  29. // ISupportsErrorInfo
  30. STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);
  31. #endif
  32. // I_dxj_DirectSoundSource
  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 GetFormat(
  39. /* [in] */ WAVEFORMATEX_CDESC __RPC_FAR *WaveFormatEx);
  40. HRESULT STDMETHODCALLTYPE SetSink(
  41. /* [in] */ I_dxj_DirectSoundSink __RPC_FAR *SoundSink);
  42. HRESULT STDMETHODCALLTYPE Seek(long lPosition);
  43. HRESULT STDMETHODCALLTYPE Read(I_dxj_DirectSoundBuffer *Buffers[], long *busIDs, long lBusCount);
  44. HRESULT STDMETHODCALLTYPE GetSize(long *ret);
  45. // note: this is public for the callbacks
  46. DECL_VARIABLE(_dxj_DirectSoundSource);
  47. private:
  48. public:
  49. DX3J_GLOBAL_LINKS(_dxj_DirectSoundSource);
  50. DWORD InternalAddRef();
  51. DWORD InternalRelease();
  52. };