#include <GT2004SoundControl.h>
Inheritance diagram for GT2004SoundControl:
Public Member Functions | |
GT2004SoundControl (const SoundControlInterfaces &interfaces) | |
virtual | ~GT2004SoundControl () |
virtual void | execute () |
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 |
Definition at line 22 of file GT2004SoundControl.h.
GT2004SoundControl::GT2004SoundControl | ( | const SoundControlInterfaces & | interfaces | ) |
Constructor.
interfaces | The paramters of the HeadControl module. |
Definition at line 14 of file GT2004SoundControl.cpp.
References actWavePosition, SoundRequest::getSoundIDName(), lastSound, loadWavefile(), SoundRequest::none, SoundRequest::numOfSoundIDs, playingWave, SoundControlInterfaces::soundRequest, waveData, and waveLength.
GT2004SoundControl::~GT2004SoundControl | ( | ) | [virtual] |
Destructor
Definition at line 37 of file GT2004SoundControl.cpp.
References SoundRequest::numOfSoundIDs, and waveData.
bool GT2004SoundControl::checkWaveHeader | ( | const char * | filename, | |
int | index | |||
) | [protected] |
Definition at line 96 of file GT2004SoundControl.cpp.
References idText, OUTPUT, InStream< S, R >::read(), startWavePosition, text, waveHeader, and waveLength.
Referenced by loadWavefile().
void GT2004SoundControl::execute | ( | ) | [virtual] |
executes the module
Implements Module.
Definition at line 44 of file GT2004SoundControl.cpp.
References fillWaveBuffer(), lastSound, SoundRequest::none, SoundRequest::numOfSoundIDs, playingWave, playWave(), SoundControlInterfaces::soundData, SoundRequest::soundID, and SoundControlInterfaces::soundRequest.
void GT2004SoundControl::fillWaveBuffer | ( | SoundData * | soundData, | |
int | index | |||
) | [protected] |
Definition at line 164 of file GT2004SoundControl.cpp.
References actWavePosition, SoundData::isInUse, SoundData::pcmBuffer, playingWave, SoundControlInterfaces::soundData, waveData, and waveLength.
Referenced by execute(), and playWave().
bool GT2004SoundControl::loadWavefile | ( | const char * | filename, | |
int | index | |||
) | [protected] |
Definition at line 75 of file GT2004SoundControl.cpp.
References checkWaveHeader(), InFile::exists(), idText, OUTPUT, InStream< S, R >::read(), startWavePosition, text, waveData, and waveLength.
Referenced by GT2004SoundControl().
void GT2004SoundControl::playWave | ( | SoundData * | soundData, | |
int | index | |||
) | [protected] |
Definition at line 63 of file GT2004SoundControl.cpp.
References actWavePosition, fillWaveBuffer(), SoundData::isInUse, playingWave, SoundControlInterfaces::soundData, startWavePosition, and waveData.
Referenced by execute().
unsigned long GT2004SoundControl::actWavePosition [protected] |
Definition at line 45 of file GT2004SoundControl.h.
Referenced by fillWaveBuffer(), GT2004SoundControl(), and playWave().
SoundRequest::SoundID GT2004SoundControl::lastSound [protected] |
Definition at line 51 of file GT2004SoundControl.h.
Referenced by execute(), and GT2004SoundControl().
unsigned long GT2004SoundControl::lastTransmittedMessageTimestamp [protected] |
Definition at line 49 of file GT2004SoundControl.h.
Definition at line 35 of file GT2004SoundControl.h.
Referenced by execute(), 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().
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] |
unsigned long GT2004SoundControl::waveLength[SoundRequest::numOfSoundIDs] [protected] |
Definition at line 47 of file GT2004SoundControl.h.
Referenced by checkWaveHeader(), fillWaveBuffer(), GT2004SoundControl(), and loadWavefile().