blob: df4447fc74478d8d6155ed6bbf757d3a4933fd4f (
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
61
62
63
|
/*
* 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
#define SAMPLE_RATE_PARAM "SampleRate"
#define SAMPLE_RATE_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;
int m_sampleRate;
};
//========================================
#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
|