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.

40 lines
921 B

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef IVOICERECORD_H
  8. #define IVOICERECORD_H
  9. #pragma once
  10. // This is the voice recording interface. It provides 16-bit signed mono data from
  11. // a mic at some sample rate.
  12. abstract_class IVoiceRecord
  13. {
  14. protected:
  15. virtual ~IVoiceRecord() {}
  16. public:
  17. // Use this to delete the object.
  18. virtual void Release()=0;
  19. // Start/stop capturing.
  20. virtual bool RecordStart() = 0;
  21. virtual void RecordStop() = 0;
  22. // Idle processing.
  23. virtual void Idle()=0;
  24. // Get the most recent N samples. If nSamplesWanted is less than the number of
  25. // available samples, it discards the first samples and gives you the last ones.
  26. virtual int GetRecordedData(short *pOut, int nSamplesWanted)=0;
  27. };
  28. #endif // IVOICERECORD_H