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.

99 lines
3.8 KiB

  1. #include "resource.h" // main symbols
  2. #include "dmusicc.h"
  3. #define typedef__dxj_DirectMusicPort LPDIRECTMUSICPORT8
  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_DirectMusicPortObject :
  9. #ifdef USING_IDISPATCH
  10. public CComDualImpl<I_dxj_DirectMusicPort, &IID_I_dxj_DirectMusicPort, &LIBID_DIRECTLib>,
  11. public ISupportErrorInfo,
  12. #else
  13. public I_dxj_DirectMusicPort,
  14. #endif
  15. public CComObjectRoot
  16. {
  17. public:
  18. C_dxj_DirectMusicPortObject() ;
  19. virtual ~C_dxj_DirectMusicPortObject() ;
  20. BEGIN_COM_MAP(C_dxj_DirectMusicPortObject)
  21. COM_INTERFACE_ENTRY(I_dxj_DirectMusicPort)
  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_DirectMusicPortObject)
  28. #ifdef USING_IDISPATCH
  29. // ISupportsErrorInfo
  30. STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);
  31. #endif
  32. // I_dxj_DirectMusicPort
  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. // Member functions
  39. HRESULT STDMETHODCALLTYPE PlayBuffer(I_dxj_DirectMusicBuffer *Buffer);
  40. HRESULT STDMETHODCALLTYPE SetReadNotificationHandle(long hEvent);
  41. HRESULT STDMETHODCALLTYPE Read(I_dxj_DirectMusicBuffer **Buffer);
  42. // [helpcontext(1)] HRESULT DownloadInstrument(THIS_ IDirectMusicInstrument *pInstrument,
  43. // IDirectMusicDownloadedInstrument **ppDownloadedInstrument,
  44. // DMUS_NOTERANGE *pNoteRanges,
  45. // DWORD dwNumNoteRanges);
  46. // [helpcontext(1)] HRESULT UnloadInstrument(THIS_ IDirectMusicDownloadedInstrument *pDownloadedInstrument);
  47. HRESULT STDMETHODCALLTYPE GetLatencyClock(I_dxj_ReferenceClock **Clock);
  48. HRESULT STDMETHODCALLTYPE GetRunningStats(DMUS_SYNTHSTATS_CDESC *Stats);
  49. HRESULT STDMETHODCALLTYPE Compact();
  50. HRESULT STDMETHODCALLTYPE GetCaps(DMUS_PORTCAPS_CDESC *PortCaps);
  51. HRESULT STDMETHODCALLTYPE SetNumChannelGroups(long lChannelGroups);
  52. HRESULT STDMETHODCALLTYPE GetNumChannelGroups(long *ChannelGroups);
  53. HRESULT STDMETHODCALLTYPE Activate(VARIANT_BOOL fActive);
  54. HRESULT STDMETHODCALLTYPE SetChannelPriority(long lChannelGroup, long lChannel, long lPriority);
  55. HRESULT STDMETHODCALLTYPE GetChannelPriority(long lChannelGroup, long lChannel, long *lPriority);
  56. HRESULT STDMETHODCALLTYPE SetDirectSound(I_dxj_DirectSound *DirectSound, I_dxj_DirectSoundBuffer *DirectSoundBuffer);
  57. HRESULT STDMETHODCALLTYPE GetFormat(WAVEFORMATEX_CDESC *WaveFormatEx);
  58. // New for DMusPort8
  59. HRESULT STDMETHODCALLTYPE DownloadWave(I_dxj_DirectSoundWave *Wave,long lFlags,I_dxj_DirectSoundDownloadedWave **retWave);
  60. HRESULT STDMETHODCALLTYPE UnloadWave(I_dxj_DirectSoundDownloadedWave *Wave);
  61. HRESULT STDMETHODCALLTYPE AllocVoice(I_dxj_DirectSoundDownloadedWave *Wave,long lChannel,long lChannelGroup,long rtStart,long rtReadahead,I_dxj_DirectMusicVoice **Voice);
  62. HRESULT STDMETHODCALLTYPE AssignChannelToBuses(long lChannelGroup,long lChannel,SAFEARRAY **lBuses,long lBusCount);
  63. HRESULT STDMETHODCALLTYPE SetSink(I_dxj_DirectSoundSink *Sink);
  64. HRESULT STDMETHODCALLTYPE GetSink(I_dxj_DirectSoundSink **Sink);
  65. ////////////////////////////////////////////////////////////////////////
  66. //
  67. // note: this is public for the callbacks
  68. DECL_VARIABLE(_dxj_DirectMusicPort);
  69. private:
  70. public:
  71. DX3J_GLOBAL_LINKS(_dxj_DirectMusicPort);
  72. DWORD InternalAddRef();
  73. DWORD InternalRelease();
  74. };