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.

86 lines
1.7 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #ifndef WAVEFILE_H
  7. #define WAVEFILE_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "SoundEmitterSystem/isoundemittersystembase.h"
  12. #include "sentence.h"
  13. class CAudioSource;
  14. class CWaveFile
  15. {
  16. public:
  17. // One or both may be valid
  18. CWaveFile( char const *filename );
  19. ~CWaveFile();
  20. static int GetLanguageId();
  21. char const *GetName() const;
  22. char const *GetFileName() const;
  23. char const *GetSentenceText();
  24. int GetPhonemeCount();
  25. int GetWordCount();
  26. bool IsAsyncLoading() const { return m_bAsyncLoading; }
  27. void SetAsyncLoading( bool async ) { m_bAsyncLoading = async; }
  28. bool HasLoadedSentenceInfo() const;
  29. void EnsureSentence();
  30. void Play();
  31. bool GetVoiceDuck();
  32. /*
  33. void SetVoiceDuck( bool duck );
  34. void ToggleVoiceDucking();
  35. virtual void Checkout( bool updatestateicons = true );
  36. virtual void Checkin( bool updatestateicons = true );
  37. bool IsCheckedOut() const;
  38. */
  39. int GetIconIndex() const;
  40. void SetThreadLoadedSentence( CSentence& sentence );
  41. // void ExportValveDataChunk( char const *tempfile );
  42. // void ImportValveDataChunk( char const *tempfile );
  43. // void GetPhonemeExportFile( char *path, int maxlen );
  44. private:
  45. CSentence m_Sentence;
  46. enum
  47. {
  48. MAX_SOUND_NAME = 256,
  49. MAX_SCRIPT_FILE = 64,
  50. MAX_SOUND_FILENAME = 128,
  51. };
  52. char m_szName[ MAX_SOUND_FILENAME ];
  53. char m_szFileName[ MAX_SOUND_FILENAME ];
  54. // CVCDFile *m_pOwner;
  55. // CSoundEntry *m_pOwnerSE;
  56. bool m_bSentenceLoaded;
  57. bool m_bAsyncLoading;
  58. };
  59. #endif // WAVEFILE_H