AudioPlugIn.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. // AudioPlugIn.h: interface for the CAudioPlugIn class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_AUDIOPLUGIN_H__D9177ACC_DFF4_4C13_8FB9_F949C35BFEF0__INCLUDED_)
  5. #define AFX_AUDIOPLUGIN_H__D9177ACC_DFF4_4C13_8FB9_F949C35BFEF0__INCLUDED_
  6. #if _MSC_VER > 1000
  7. #pragma once
  8. #endif // _MSC_VER > 1000
  9. struct DXiEvent;
  10. struct MfxEvent;
  11. #include "DXi.h"
  12. // TODO: #define PROCESS_IN_PLACE to FALSE if necessary, i.e., for plug-ins
  13. // which convert mono to stereo.
  14. #define PROCESS_IN_PLACE (TRUE)
  15. class CAudioPlugIn :
  16. public CDXi
  17. {
  18. public:
  19. CAudioPlugIn( HRESULT* phr );
  20. virtual ~CAudioPlugIn();
  21. HRESULT Initialize();
  22. HRESULT IsValidInputFormat( const WAVEFORMATEX* pwfx ) const;
  23. HRESULT IsValidOutputFormat( const WAVEFORMATEX* pwfx ) const;
  24. HRESULT IsValidTransform( const WAVEFORMATEX* pwfxIn, const WAVEFORMATEX* pwfxOut ) const;
  25. HRESULT SuggestOutputFormat( WAVEFORMATEX* pwfx ) const;
  26. HRESULT Process( LONGLONG llSampAudioTimestamp,
  27. AudioBuffer* pbufIn,
  28. AudioBuffer* pbufOut );
  29. HRESULT AllocateResources();
  30. HRESULT FreeResources();
  31. int PersistGetSize() const;
  32. HRESULT PersistLoad( IStream* pStream );
  33. HRESULT PersistSave( IStream* pStream );
  34. };
  35. #endif // !defined(AFX_AUDIOPLUGIN_H__D9177ACC_DFF4_4C13_8FB9_F949C35BFEF0__INCLUDED_)