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.

33 lines
875 B

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef IWAVEOUT_H
  8. #define IWAVEOUT_H
  9. #pragma once
  10. // Interface by the voice_tweak app for simple wave output. You must extern a
  11. // specific factory function to create and initialize an instance.
  12. class IWaveOut
  13. {
  14. public:
  15. virtual ~IWaveOut() {}
  16. virtual void Release() = 0;
  17. // Give it samples to mix into the output. The input samples are 16-bit signed mono.
  18. virtual bool PutSamples(short *pSamples, int nSamples) = 0;
  19. // Do idle time processing.
  20. virtual void Idle() = 0;
  21. // Returns the number of samples you've put that haven't been played yet (sitting in the buffer
  22. // waiting to be played).
  23. virtual int GetNumBufferedSamples() = 0;
  24. };
  25. #endif // IWAVEOUT_H