~robot3d-team/robot3d/trunk

« back to all changes in this revision

Viewing changes to inc/srSensor/microphoneSensor.h

  • Committer: Anne van Rossum
  • Date: 2010-08-10 15:58:55 UTC
  • Revision ID: anne@gamix-20100810155855-kve7x2vwouagdij9
Initial import

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifdef AUDIO_ON
 
2
/*!
 
3
 *
 
4
 * Header of the microphoneSensor
 
5
 *
 
6
 * @author Ted Schmidt
 
7
 *
 
8
 */
 
9
#ifndef MIRCOPHONESENSOR_H_
 
10
#define MIRCOPHONESENSOR_H_
 
11
 
 
12
#include <dtAudio/audiomanager.h>
 
13
#include "../../basic/sensors/sensorBase.h"
 
14
 
 
15
namespace srCore
 
16
{
 
17
        class MicrophoneSensor : public SensorBase
 
18
        {
 
19
                private:
 
20
                        ALCdevice       *mydevice;
 
21
                        int                     freq;
 
22
                        int                     channels;
 
23
                        int                     bits;
 
24
                        int                     bufferSize;
 
25
                        bool            newData;
 
26
 
 
27
                public:
 
28
                        MicrophoneSensor(BodyBase* attachedTo,osg::Vec3f pos, osg::Vec3f orient,
 
29
                                                        const std::string &name);
 
30
                        virtual ~MicrophoneSensor();
 
31
                        void getParameter(const std::string &name, ParameterReturnValue  parameter);
 
32
                        void setParameter(const std::string &name, ParameterReturnValue  parameter);
 
33
                        void requestData();
 
34
                        void evaluate(ParameterReturnValue srv);
 
35
                        void setup();
 
36
                        void resetMicrophone();
 
37
                protected:
 
38
                        void getSensorValue(std::ostream& theStream) const;
 
39
 
 
40
        };
 
41
}
 
42
#endif // MICROPHONESENSOR_H_
 
43
#endif