summaryrefslogtreecommitdiff
path: root/utils/voice_tweak/iwaveout.h
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /utils/voice_tweak/iwaveout.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'utils/voice_tweak/iwaveout.h')
-rw-r--r--utils/voice_tweak/iwaveout.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/utils/voice_tweak/iwaveout.h b/utils/voice_tweak/iwaveout.h
new file mode 100644
index 0000000..5e9ad4f
--- /dev/null
+++ b/utils/voice_tweak/iwaveout.h
@@ -0,0 +1,33 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $NoKeywords: $
+//=============================================================================//
+
+#ifndef IWAVEOUT_H
+#define IWAVEOUT_H
+#pragma once
+
+
+// Interface by the voice_tweak app for simple wave output. You must extern a
+// specific factory function to create and initialize an instance.
+class IWaveOut
+{
+public:
+ virtual ~IWaveOut() {}
+ virtual void Release() = 0;
+
+ // Give it samples to mix into the output. The input samples are 16-bit signed mono.
+ virtual bool PutSamples(short *pSamples, int nSamples) = 0;
+
+ // Do idle time processing.
+ virtual void Idle() = 0;
+
+ // Returns the number of samples you've put that haven't been played yet (sitting in the buffer
+ // waiting to be played).
+ virtual int GetNumBufferedSamples() = 0;
+};
+
+
+#endif // IWAVEOUT_H