summaryrefslogtreecommitdiff
path: root/utils/voice_tweak/iwaveout.h
blob: 5e9ad4f65b6c5e0a82407fb56c00d777527457d3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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