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

GT2004SoundControl Class Reference

The default solution of the SoundControl module. More...

#include <GT2004SoundControl.h>

Inheritance diagram for GT2004SoundControl:

Inheritance graph
[legend]
Collaboration diagram for GT2004SoundControl:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 GT2004SoundControl (const SoundControlInterfaces &interfaces)
 Constructor.

virtual ~GT2004SoundControl ()
 Destructor.

virtual void execute ()
 executes the module


Public Attributes

bool playingWave

Protected Member Functions

bool loadWavefile (const char *filename, int index)
bool checkWaveHeader (const char *filename, int index)
void playWave (SoundData *soundData, int index)
void fillWaveBuffer (SoundData *soundData, int index)

Protected Attributes

char * waveData [SoundRequest::numOfSoundIDs]
char waveHeader [100]
unsigned long actWavePosition
unsigned long startWavePosition [SoundRequest::numOfSoundIDs]
unsigned long waveLength [SoundRequest::numOfSoundIDs]
unsigned long lastTransmittedMessageTimestamp
SoundRequest::SoundID lastSound

Detailed Description

The default solution of the SoundControl module.

Author:
Oliver Giese

Matthias Hebbel

Definition at line 22 of file GT2004SoundControl.h.


Constructor & Destructor Documentation

GT2004SoundControl::GT2004SoundControl const SoundControlInterfaces interfaces  ) 
 

Constructor.

Parameters:
interfaces The paramters of the HeadControl module.

Definition at line 14 of file GT2004SoundControl.cpp.

References actWavePosition, SoundRequest::getSoundIDName(), lastSound, loadWavefile(), playingWave, waveData, and waveLength.

Here is the call graph for this function:

GT2004SoundControl::~GT2004SoundControl  )  [virtual]
 

Destructor.

Definition at line 37 of file GT2004SoundControl.cpp.

References waveData.


Member Function Documentation

void GT2004SoundControl::execute  )  [virtual]
 

executes the module

Implements Module.

Definition at line 44 of file GT2004SoundControl.cpp.

References fillWaveBuffer(), lastSound, playingWave, playWave(), and SoundRequest::soundID.

Here is the call graph for this function:

bool GT2004SoundControl::loadWavefile const char *  filename,
int  index
[protected]
 

Definition at line 75 of file GT2004SoundControl.cpp.

References checkWaveHeader(), InFile::exists(), idText, OUTPUT, InStream< InFile, InBinary >::read(), startWavePosition, waveData, and waveLength.

Referenced by GT2004SoundControl().

Here is the call graph for this function:

bool GT2004SoundControl::checkWaveHeader const char *  filename,
int  index
[protected]
 

Definition at line 96 of file GT2004SoundControl.cpp.

References idText, OUTPUT, InStream< InFile, InBinary >::read(), startWavePosition, waveHeader, and waveLength.

Referenced by loadWavefile().

Here is the call graph for this function:

void GT2004SoundControl::playWave SoundData soundData,
int  index
[protected]
 

Definition at line 63 of file GT2004SoundControl.cpp.

References actWavePosition, fillWaveBuffer(), SoundData::isInUse, playingWave, startWavePosition, and waveData.

Referenced by execute().

Here is the call graph for this function:

void GT2004SoundControl::fillWaveBuffer SoundData soundData,
int  index
[protected]
 

Definition at line 164 of file GT2004SoundControl.cpp.

References actWavePosition, SoundData::isInUse, SoundData::pcmBuffer, playingWave, waveData, and waveLength.

Referenced by execute(), and playWave().


Member Data Documentation

bool GT2004SoundControl::playingWave
 

Definition at line 35 of file GT2004SoundControl.h.

Referenced by execute(), fillWaveBuffer(), GT2004SoundControl(), and playWave().

char* GT2004SoundControl::waveData[SoundRequest::numOfSoundIDs] [protected]
 

Definition at line 43 of file GT2004SoundControl.h.

Referenced by fillWaveBuffer(), GT2004SoundControl(), loadWavefile(), playWave(), and ~GT2004SoundControl().

char GT2004SoundControl::waveHeader[100] [protected]
 

Definition at line 44 of file GT2004SoundControl.h.

Referenced by checkWaveHeader().

unsigned long GT2004SoundControl::actWavePosition [protected]
 

Definition at line 45 of file GT2004SoundControl.h.

Referenced by fillWaveBuffer(), GT2004SoundControl(), and playWave().

unsigned long GT2004SoundControl::startWavePosition[SoundRequest::numOfSoundIDs] [protected]
 

Definition at line 46 of file GT2004SoundControl.h.

Referenced by checkWaveHeader(), loadWavefile(), and playWave().

unsigned long GT2004SoundControl::waveLength[SoundRequest::numOfSoundIDs] [protected]
 

Definition at line 47 of file GT2004SoundControl.h.

Referenced by checkWaveHeader(), fillWaveBuffer(), GT2004SoundControl(), and loadWavefile().

unsigned long GT2004SoundControl::lastTransmittedMessageTimestamp [protected]
 

Definition at line 49 of file GT2004SoundControl.h.

SoundRequest::SoundID GT2004SoundControl::lastSound [protected]
 

Definition at line 51 of file GT2004SoundControl.h.

Referenced by execute(), and GT2004SoundControl().


The documentation for this class was generated from the following files:
Generated on Thu Sep 23 20:08:07 2004 for GT2004 by doxygen 1.3.6