summaryrefslogtreecommitdiff
path: root/orkaudio/audiocaptureplugins/sounddevice/SoundDeviceConfig.h
blob: 645352375f0802174b0b72302092e183a595b7a3 (plain)
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/*
 * Oreka -- A media capture and retrieval platform
 * 
 * Copyright (C) 2005, orecx LLC
 *
 * http://www.orecx.com
 *
 * This program is free software, distributed under the terms of
 * the GNU General Public License.
 * Please refer to http://www.gnu.org/copyleft/gpl.html
 *
 */

#ifndef __SOUNDDEVICECONFIG_H__
#define __SOUNDDEVICECONFIG_H__

#include "StdString.h"
#include "Object.h"
#include "boost/shared_ptr.hpp"
 
#define AUDIO_CHUNK_SIZE_PARAM "AudioChunkSize"
#define AUDIO_CHUNK_SIZE_DEFAULT 8000

/** This class defines various configuration parameters for the generator. */
class SoundDeviceConfig : public Object
{
public:
	SoundDeviceConfig();	
	void Define(Serializer* s);
	void Validate();

	CStdString GetClassName();
	ObjectRef NewInstance();
	inline ObjectRef Process() {return ObjectRef();};

	int m_audioChunkSize;
};

//========================================

#define SOUND_DEVICE_CONFIG_PARAM "SoundDevicePlugin"

/** This class represents the top of the configuration hierarchy for the generator. */
class SoundDeviceConfigTopObject : public Object
{
public:
	void Define(Serializer* s);
	void Validate();

	CStdString GetClassName();
	ObjectRef NewInstance();
	inline ObjectRef Process() {return ObjectRef();};
	
	SoundDeviceConfig m_config;
};

typedef boost::shared_ptr<SoundDeviceConfigTopObject> SoundDeviceConfigTopObjectRef;


#endif