Team Fortress 2 Source Code as on 22/4/2020
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.

55 lines
1.7 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef IFACEPOSERSOUND_H
  8. #define IFACEPOSERSOUND_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. class StudioModel;
  13. class CAudioSource;
  14. class CAudioMixer;
  15. class CAudioOuput;
  16. class IFacePoserSound
  17. {
  18. public:
  19. virtual void Init( void ) = 0;
  20. virtual void Shutdown( void ) = 0;
  21. virtual void Update( float time ) = 0;
  22. virtual void Flush( void ) = 0;
  23. virtual CAudioSource *LoadSound( const char *wavfile ) = 0;
  24. virtual void PlaySound( StudioModel *model, float volume, const char *wavfile, CAudioMixer **ppMixer ) = 0;
  25. virtual void PlaySound( CAudioSource *source, float volume, CAudioMixer **ppMixer ) = 0;
  26. virtual void PlayPartialSound( StudioModel *model, float volume, const char *wavfile, CAudioMixer **ppMixer, int startSample, int endSample ) = 0;
  27. virtual bool IsSoundPlaying( CAudioMixer *pMixer ) = 0;
  28. virtual CAudioMixer *FindMixer( CAudioSource *source ) = 0;
  29. virtual void StopAll( void ) = 0;
  30. virtual void StopSound( CAudioMixer *mixer ) = 0;
  31. virtual void RenderWavToDC( HDC dc, RECT& outrect, COLORREF clr,
  32. float starttime, float endtime, CAudioSource *pWave,
  33. bool selected = false, int selectionstart = 0, int selectionend = 0 ) = 0;
  34. virtual float GetAmountofTimeAhead( void ) = 0;
  35. virtual int GetNumberofSamplesAhead( void ) = 0;
  36. // virtual void InstallPhonemecallback( IPhonemeTag *pTagInterface ) = 0;
  37. virtual CAudioOuput *GetAudioOutput( void ) = 0;
  38. virtual void EnsureNoModelReferences( CAudioSource *source ) = 0;
  39. };
  40. extern IFacePoserSound *sound;
  41. #endif // IFACEPOSERSOUND_H