summaryrefslogtreecommitdiff
path: root/engine/audio/public/ivoicerecord.h
blob: 9f830ff347f66b27fa9c84194bf50b6e17c78049 (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
34
35
36
37
38
39
40
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: 
//
// $NoKeywords: $
//=============================================================================//

#ifndef IVOICERECORD_H
#define IVOICERECORD_H
#pragma once


// This is the voice recording interface. It provides 16-bit signed mono data from 
// a mic at some sample rate.
abstract_class IVoiceRecord
{
protected:

	virtual				~IVoiceRecord() {}


public:
	
	// Use this to delete the object.
	virtual void		Release()=0;

	// Start/stop capturing.
	virtual bool		RecordStart() = 0;
	virtual void		RecordStop() = 0;

	// Idle processing.
	virtual void		Idle()=0;

	// Get the most recent N samples. If nSamplesWanted is less than the number of
	// available samples, it discards the first samples and gives you the last ones.
	virtual int			GetRecordedData(short *pOut, int nSamplesWanted)=0;
};


#endif // IVOICERECORD_H