Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Modules/SoundControl/GT2004SoundControl.h

Go to the documentation of this file.
00001 /**
00002  * @file GT2004SoundControl.h
00003  * 
00004  * Implementation of class GT2004SoundControl.
00005  *
00006  * @author <a href="mailto:Oliver.Giese@uni-dortmund.de">Oliver Giese</a>
00007  * @author <a href="mailto:matthias.hebbel@uni-dortmund.de">Matthias Hebbel</a>
00008  */
00009 
00010 #ifndef __GT2004SoundControl_h_
00011 #define __GT2004SoundControl_h_
00012 
00013 #include "SoundControl.h"
00014 
00015 /** 
00016 * @class GT2004SoundControl
00017 *
00018 * The default solution of the SoundControl module
00019  * @author <a href="mailto:Oliver.Giese@uni-dortmund.de">Oliver Giese</a>
00020  * @author <a href="mailto:matthias.hebbel@uni-dortmund.de">Matthias Hebbel</a>
00021 */
00022 class GT2004SoundControl : public SoundControl
00023 {
00024   public:
00025   /** 
00026   * Constructor.
00027   * @param interfaces The paramters of the HeadControl module.
00028   */
00029     GT2004SoundControl(const SoundControlInterfaces& interfaces);
00030 
00031     /** Destructor */
00032     virtual ~GT2004SoundControl();
00033     virtual void execute();
00034     
00035     bool playingWave;
00036   
00037   protected:
00038     bool loadWavefile(const char* filename, int index);
00039     bool checkWaveHeader(const char* filename, int index);
00040     void playWave(SoundData* soundData, int index);
00041     void fillWaveBuffer(SoundData* soundData, int index);
00042 
00043     char* waveData[SoundRequest::numOfSoundIDs];
00044     char waveHeader[100];
00045     unsigned long actWavePosition;
00046     unsigned long startWavePosition[SoundRequest::numOfSoundIDs];
00047     unsigned long waveLength[SoundRequest::numOfSoundIDs];
00048     
00049     unsigned long lastTransmittedMessageTimestamp;
00050 
00051     SoundRequest::SoundID lastSound;
00052 };
00053 
00054 #endif// __GT2004SoundControl_h_
00055 
00056 /*
00057  * Change log :
00058  * 
00059  * $Log: GT2004SoundControl.h,v $
00060  * Revision 1.1  2004/07/10 00:18:32  spranger
00061  * renamed (readded) for coderelease
00062  *
00063  * Revision 1.2  2004/05/22 22:52:03  juengel
00064  * Renamed ballP_osition to ballModel.
00065  *
00066  * Revision 1.1.1.1  2004/05/22 17:21:31  cvsadm
00067  * created new repository GT2004_WM
00068  *
00069  * Revision 1.2  2004/03/08 02:11:52  roefer
00070  * Interfaces should be const
00071  *
00072  * Revision 1.1  2003/10/06 14:10:14  cvsadm
00073  * Created GT2004 (M.J.)
00074  *
00075  * Revision 1.1.1.1  2003/07/02 09:40:24  cvsadm
00076  * created new repository for the competitions in Padova from the 
00077  * tamara CVS (Tuesday 2:00 pm)
00078  *
00079  * removed unused solutions
00080  *
00081  * Revision 1.7  2003/04/15 15:52:09  risler
00082  * DDD GO 2003 code integrated
00083  *
00084  * Revision 1.8  2003/04/08 21:20:36  max
00085  * preload wave files at startup
00086  *
00087  * Revision 1.7  2003/04/06 12:32:48  max
00088  * added ddd sound stuff
00089  *
00090  * Revision 1.6  2002/11/28 23:07:02  hebbel
00091  * using variable isInUse of soundData
00092  *
00093  * Revision 1.5  2002/11/28 14:20:53  hebbel
00094  * Cleaned up and added support for playing *.wav files
00095  *
00096  * Revision 1.4  2002/09/22 18:40:53  risler
00097  * added new math functions, removed GTMath library
00098  *
00099  * Revision 1.3  2002/09/11 00:06:58  loetzsch
00100  * continued change of module/solution mechanisms
00101  *
00102  * Revision 1.2  2002/09/10 21:07:30  loetzsch
00103  * continued change of module/solution mechanisms
00104  *
00105  * Revision 1.1  2002/09/10 15:36:16  cvsadm
00106  * Created new project GT2003 (M.L.)
00107  * - Cleaned up the /Src/DataTypes directory
00108  * - Removed challenge related source code
00109  * - Removed processing of incoming audio data
00110  * - Renamed AcousticMessage to SoundRequest
00111  *
00112  * Revision 1.12  2002/08/30 14:34:54  dueffert
00113  * removed unused includes
00114  *
00115  * Revision 1.11  2002/07/23 13:33:43  loetzsch
00116  * new streaming classes
00117  *
00118  * removed many #include statements
00119  *
00120  * Revision 1.10  2002/05/27 16:15:55  schley
00121  * ballp_osition can be transmitted
00122  *
00123  * Revision 1.9  2002/05/27 15:39:04  fischer
00124  * Added SoundState (Sender and Receiver)
00125  *
00126  * Revision 1.8  2002/05/22 13:46:22  fischer
00127  * Changed SoundInProcessor interface to accept WorldState
00128  *
00129  * Revision 1.7  2002/05/21 11:44:47  hebbel
00130  * added table for signalcoding
00131  *
00132  * Revision 1.6  2002/05/17 11:20:57  fischer
00133  * ball position exchange via acoustic communication
00134  *
00135  * Revision 1.5  2002/05/15 10:20:00  schley
00136  * moved the audio.cfg to SoundProtocol
00137  *
00138  * Revision 1.4  2002/05/15 07:28:18  hebbel
00139  * Removed mute, uses Soundprotocol instead, plays wave for patternchallenge
00140  *
00141  * Revision 1.3  2002/05/14 18:52:58  hebbel
00142  * Added variable mute
00143  *
00144  * Revision 1.2  2002/05/13 13:29:43  schley
00145  * Deconstructor added and audio.cfg
00146  *
00147  * Revision 1.1.1.1  2002/05/10 12:40:16  cvsadm
00148  * Moved GT2002 Project from ute to tamara.
00149  *
00150  * Revision 1.3  2002/05/06 15:06:54  schley
00151  * Added the PCMCreator
00152  *
00153  * Revision 1.2  2002/05/03 13:47:57  giese
00154  * Added timestamp to AcousticMessage
00155  *
00156  * Revision 1.1  2002/04/28 19:14:12  giese
00157  * SoundPlay added...
00158  *
00159  *
00160  * 
00161  */

Generated on Thu Sep 23 19:57:32 2004 for GT2004 by doxygen 1.3.6