Gnash 0.8.10dev
AudioInputHaiku.h
Go to the documentation of this file.
00001 // AudioInputHaiku.h: Audio input with Haiku media kit
00002 // 
00003 //   Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
00004 // 
00005 // This program is free software; you can redistribute it and/or modify
00006 // it under the terms of the GNU General Public License as published by
00007 // the Free Software Foundation; either version 3 of the License, or
00008 // (at your option) any later version.
00009 // 
00010 // This program is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 // GNU General Public License for more details.
00014 //
00015 // You should have received a copy of the GNU General Public License
00016 // along with this program; if not, write to the Free Software
00017 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00018 
00019 #ifndef GNASH_AUDIOINPUT_HAIKU_H
00020 #define GNASH_AUDIOINPUT_HAIKU_H
00021 
00022 #include "dsodefs.h" //DSOEXPORT
00023 #include "AudioInput.h"
00024 
00025 #include <boost/cstdint.hpp> // for C99 int types
00026 #include <string>
00027 
00028 namespace gnash {
00029 namespace media {
00030 namespace haiku {
00031 
00033 class AudioInputHaiku : public AudioInput
00034 {
00035     
00036 public:
00037 
00038     DSOEXPORT AudioInputHaiku();
00039 
00040     virtual ~AudioInputHaiku() {}
00041     
00042     //setters and getters
00043     virtual void setActivityLevel(double a) {
00044         _activityLevel = a;
00045     }
00046 
00047     virtual double activityLevel() const {
00048         return _activityLevel;
00049     }
00050     
00051     virtual void setGain(double g) {
00052         _gain = g;
00053     }
00054 
00055     virtual double gain() const {
00056         return _gain;
00057     }
00058     
00059     virtual void setIndex(int i) {
00060         _index = i;
00061     }
00062 
00063     virtual int index() const {
00064         return _index; 
00065     }
00066     
00067     virtual bool muted() {
00068         return _muted;
00069     }
00070     
00071     virtual void setName(std::string name) {
00072         _name = name;
00073     }
00074 
00075     virtual const std::string& name() const { return _name; }
00076     
00077     virtual void setRate(int r);
00078 
00079     virtual int rate() const {
00080         return _rate;
00081     }
00082     
00083     virtual void setSilenceLevel(double s) {
00084         _silenceLevel = s;
00085     }
00086     
00087     virtual double silenceLevel() const {
00088         return _silenceLevel;
00089     }
00090     
00091     virtual void setSilenceTimeout(int s) {
00092         _silenceTimeout = s;
00093     }
00094     
00095     virtual int silenceTimeout() const {
00096         return _silenceTimeout;
00097     }
00098     
00099     virtual void setUseEchoSuppression(bool e) {
00100         _useEchoSuppression = e;
00101     }
00102 
00103     virtual bool useEchoSuppression() const {
00104         return _useEchoSuppression;
00105     }
00106     
00107 private:
00108 
00109     double _activityLevel;
00110     double _gain;
00111     int _index;
00112     bool _muted;
00113     std::string _name;
00114     int _rate;
00115     double _silenceLevel;
00116     int _silenceTimeout;
00117     bool _useEchoSuppression;
00118 };
00119 
00120     
00121 } // gnash.media.haiku namespace
00122 } // gnash.media namespace 
00123 } // gnash namespace
00124 
00125 #endif