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.

145 lines
4.1 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (c) 1998-1999 Microsoft Corporation
  6. //
  7. // File: mutetrk.h
  8. //
  9. //--------------------------------------------------------------------------
  10. // MuteTrk.h : Declaration of the CMuteTrack
  11. #ifndef __MUTETRACK_H_
  12. #define __MUTETRACK_H_
  13. #include "tlist.h"
  14. #include "dmsect.h"
  15. #include "dmusici.h"
  16. // A mute track will have a list of lists of time-stamped MuteData mappings
  17. struct MapSequence
  18. {
  19. DWORD m_dwPChannel;
  20. TList<MuteMapping> m_Mappings;
  21. };
  22. /////////////////////////////////////////////////////////////////////////////
  23. // CMuteTrack
  24. class CMuteTrack :
  25. public IDirectMusicTrack8,
  26. public IPersistStream
  27. {
  28. public:
  29. CMuteTrack();
  30. CMuteTrack(const CMuteTrack& rTrack, MUSIC_TIME mtStart, MUSIC_TIME mtEnd);
  31. ~CMuteTrack();
  32. // IUnknown
  33. //
  34. virtual STDMETHODIMP QueryInterface(const IID &iid, void **ppv);
  35. virtual STDMETHODIMP_(ULONG) AddRef();
  36. virtual STDMETHODIMP_(ULONG) Release();
  37. public:
  38. HRESULT STDMETHODCALLTYPE Init(
  39. /*[in]*/ IDirectMusicSegment* pSegment
  40. );
  41. HRESULT STDMETHODCALLTYPE InitPlay(
  42. /*[in]*/ IDirectMusicSegmentState* pSegmentState,
  43. /*[in]*/ IDirectMusicPerformance* pPerformance,
  44. /*[out]*/ void** ppStateData,
  45. /*[in]*/ DWORD dwTrackID,
  46. /*[in]*/ DWORD dwFlags
  47. );
  48. HRESULT STDMETHODCALLTYPE EndPlay(
  49. /*[in]*/ void* pStateData
  50. );
  51. HRESULT STDMETHODCALLTYPE Play(
  52. /*[in]*/ void* pStateData,
  53. /*[in]*/ MUSIC_TIME mtStart,
  54. /*[in]*/ MUSIC_TIME mtEnd,
  55. /*[in]*/ MUSIC_TIME mtOffset,
  56. DWORD dwFlags,
  57. IDirectMusicPerformance* pPerf,
  58. IDirectMusicSegmentState* pSegState,
  59. DWORD dwVirtualID
  60. );
  61. HRESULT STDMETHODCALLTYPE GetPriority(
  62. /*[out]*/ DWORD* pPriority
  63. );
  64. HRESULT STDMETHODCALLTYPE GetParam(
  65. REFGUID pCommandGuid,
  66. MUSIC_TIME mtTime,
  67. MUSIC_TIME* pmtNext,
  68. void *pData);
  69. HRESULT STDMETHODCALLTYPE SetParam(
  70. /* [in] */ REFGUID pCommandGuid,
  71. /* [in] */ MUSIC_TIME mtTime,
  72. /* [out] */ void __RPC_FAR *pData);
  73. HRESULT STDMETHODCALLTYPE AddNotificationType(
  74. /* [in] */ REFGUID pGuidNotify
  75. );
  76. HRESULT STDMETHODCALLTYPE RemoveNotificationType(
  77. /* [in] */ REFGUID pGuidNotify
  78. );
  79. HRESULT STDMETHODCALLTYPE Clone(
  80. MUSIC_TIME mtStart,
  81. MUSIC_TIME mtEnd,
  82. IDirectMusicTrack** ppTrack);
  83. HRESULT STDMETHODCALLTYPE IsParamSupported(
  84. /*[in]*/ REFGUID pGuid
  85. );
  86. // IDirectMusicTrack8 Methods
  87. STDMETHODIMP PlayEx(void* pStateData,REFERENCE_TIME rtStart,
  88. REFERENCE_TIME rtEnd,REFERENCE_TIME rtOffset,
  89. DWORD dwFlags,IDirectMusicPerformance* pPerf,
  90. IDirectMusicSegmentState* pSegSt,DWORD dwVirtualID) ;
  91. STDMETHODIMP GetParamEx(REFGUID rguidType,REFERENCE_TIME rtTime,
  92. REFERENCE_TIME* prtNext,void* pParam,void * pStateData, DWORD dwFlags) ;
  93. STDMETHODIMP SetParamEx(REFGUID rguidType,REFERENCE_TIME rtTime,void* pParam, void * pStateData, DWORD dwFlags) ;
  94. STDMETHODIMP Compose(IUnknown* pContext,
  95. DWORD dwTrackGroup,
  96. IDirectMusicTrack** ppResultTrack) ;
  97. STDMETHODIMP Join(IDirectMusicTrack* pNewTrack,
  98. MUSIC_TIME mtJoin,
  99. IUnknown* pContext,
  100. DWORD dwTrackGroup,
  101. IDirectMusicTrack** ppResultTrack) ;
  102. // IPersist methods
  103. HRESULT STDMETHODCALLTYPE GetClassID( LPCLSID pclsid );
  104. // IPersistStream methods
  105. HRESULT STDMETHODCALLTYPE IsDirty();
  106. HRESULT STDMETHODCALLTYPE Save( LPSTREAM pStream, BOOL fClearDirty );
  107. HRESULT STDMETHODCALLTYPE GetSizeMax( ULARGE_INTEGER* /*pcbSize*/ );
  108. HRESULT STDMETHODCALLTYPE Load( LPSTREAM pStream );
  109. // CMuteTrack members
  110. protected:
  111. void Clear();
  112. long m_cRef;
  113. TList<MapSequence> m_MapSequenceList; // one MapSequence per PChannel
  114. CRITICAL_SECTION m_CriticalSection; // for load and GetParam
  115. BOOL m_fCSInitialized;
  116. BYTE m_bRequiresSave;
  117. };
  118. #endif //__MUTETRACK_H_