Gazebo

Audio.hh

00001 /*
00002  *  Gazebo - Outdoor Multi-Robot Simulator
00003  *  Copyright (C) 2003  
00004  *     Nate Koenig & Andrew Howard
00005  *
00006  *  This program is free software; you can redistribute it and/or modify
00007  *  it under the terms of the GNU General Public License as published by
00008  *  the Free Software Foundation; either version 2 of the License, or
00009  *  (at your option) any later version.
00010  *
00011  *  This program is distributed in the hope that it will be useful,
00012  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  *  GNU General Public License for more details.
00015  *
00016  *  You should have received a copy of the GNU General Public License
00017  *  along with this program; if not, write to the Free Software
00018  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019  *
00020  */
00021 /*
00022  * Desc: Audio controller
00023  * Author: Jordi Polo
00024  * Date: 23 Feb 2008
00025  */
00026 #ifndef AUDIOCONTROLLER_HH
00027 #define AUDIOCONTROLLER_HH
00028 
00029 
00030 #include "Controller.hh"
00031 #include "Entity.hh"
00032 #include "OgreAL.h"
00033 
00034 namespace gazebo
00035 {
00036   class AudioIface;
00037   class OgreAL::SoundManager;
00038 
00041 
00057 
00058 class AudioController : public Controller
00059 {
00061   public: AudioController(Entity *parent );
00062 
00064   public: virtual ~AudioController();
00065 
00068   protected: virtual void LoadChild(XMLConfigNode *node);
00069 
00071   protected: virtual void InitChild();
00072 
00074   protected: virtual void ResetChild();
00075 
00077   protected: virtual void UpdateChild(UpdateParams &params);
00078 
00080   protected: virtual void FiniChild();
00081 
00083   private: void PutAudioData();
00084 
00086   private: void GetAudioCmd();
00087 
00089   private: AudioIface *myIface;
00090   
00091   private: bool loopSound;
00092   private: bool stream;
00093   private: int state;
00094   private: bool cmdPlay;
00095   private: bool cmdPause;
00096   private: bool cmdStop;
00097   private: bool cmdReset;
00098   private: float gain;
00099   private: std::string url;
00100   private: OgreAL::SoundManager *soundManager;
00101 
00102 
00103 };
00104 
00106 
00107 
00108 }
00109 
00110 #endif
00111 

Last updated Aug 04 2007