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

# GT2005SoundControl Class Reference

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

`#include <GT2005SoundControl.h>`

Inheritance diagram for GT2005SoundControl:

[legend]
Collaboration diagram for GT2005SoundControl:

[legend]
List of all members.

## Public Member Functions
| GT2005SoundControl (const SoundControlInterfaces &interfaces)
| Constructor.
virtual | ~GT2005SoundControl ()
| Destructor.
virtual void | execute ()
| When doing a debug build, we save the time, when we entered the module, so we can find endless loops.
## 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 GT2005SoundControl.h.

## Constructor & Destructor Documentation

GT2005SoundControl::GT2005SoundControl | ( | const SoundControlInterfaces & | interfaces | ) |

  | Constructor. Parameters:
  interfaces | The paramters of the HeadControl module.
Definition at line 14 of file GT2005SoundControl.cpp. References actWavePosition, SoundRequest::getSoundIDName(), lastSound, loadWavefile(), playingWave, waveData, and waveLength.

Here is the call graph for this function:

GT2005SoundControl::~GT2005SoundControl | ( |  | ) | `[virtual]`

| Destructor. Definition at line 37 of file GT2005SoundControl.cpp. References waveData.

## Member Function Documentation

void GT2005SoundControl::execute | ( |  | ) | `[virtual]`

| When doing a debug build, we save the time, when we entered the module, so we can find endless loops. Reimplemented from Module. Definition at line 44 of file GT2005SoundControl.cpp. References fillWaveBuffer(), lastSound, playingWave, playWave(), and SoundRequest::soundID.

Here is the call graph for this function:

bool GT2005SoundControl::loadWavefile | ( | const char * | filename,
|  | int | index
| ) | `[protected]`

| Definition at line 75 of file GT2005SoundControl.cpp. References checkWaveHeader(), InFile::exists(), idText, OUTPUT, InStream< InFile, InBinary >::read(), startWavePosition, waveData, and waveLength. Referenced by GT2005SoundControl().

Here is the call graph for this function:

bool GT2005SoundControl::checkWaveHeader | ( | const char * | filename,
|  | int | index
| ) | `[protected]`

| Definition at line 96 of file GT2005SoundControl.cpp. References idText, OUTPUT, InStream< InFile, InBinary >::read(), startWavePosition, waveHeader, and waveLength. Referenced by loadWavefile().

Here is the call graph for this function:

void GT2005SoundControl::playWave | ( | SoundData * | soundData,
|  | int | index
| ) | `[protected]`

| Definition at line 63 of file GT2005SoundControl.cpp. References actWavePosition, fillWaveBuffer(), SoundData::isInUse, playingWave, startWavePosition, and waveData. Referenced by execute().

Here is the call graph for this function:

void GT2005SoundControl::fillWaveBuffer | ( | SoundData * | soundData,
|  | int | index
| ) | `[protected]`

| Definition at line 164 of file GT2005SoundControl.cpp. References actWavePosition, SoundData::isInUse, SoundData::pcmBuffer, playingWave, waveData, and waveLength. Referenced by execute(), and playWave().

## Member Data Documentation

bool GT2005SoundControl::playingWave

| Definition at line 35 of file GT2005SoundControl.h. Referenced by execute(), fillWaveBuffer(), GT2005SoundControl(), and playWave().

char* GT2005SoundControl::waveData[SoundRequest::numOfSoundIDs]`[protected]`

| Definition at line 43 of file GT2005SoundControl.h. Referenced by fillWaveBuffer(), GT2005SoundControl(), loadWavefile(), playWave(), and ~GT2005SoundControl().

char GT2005SoundControl::waveHeader[100]`[protected]`

| Definition at line 44 of file GT2005SoundControl.h. Referenced by checkWaveHeader().

unsigned long GT2005SoundControl::actWavePosition`[protected]`

| Definition at line 45 of file GT2005SoundControl.h. Referenced by fillWaveBuffer(), GT2005SoundControl(), and playWave().

unsigned long GT2005SoundControl::startWavePosition[SoundRequest::numOfSoundIDs]`[protected]`

| Definition at line 46 of file GT2005SoundControl.h. Referenced by checkWaveHeader(), loadWavefile(), and playWave().

unsigned long GT2005SoundControl::waveLength[SoundRequest::numOfSoundIDs]`[protected]`

| Definition at line 47 of file GT2005SoundControl.h. Referenced by checkWaveHeader(), fillWaveBuffer(), GT2005SoundControl(), and loadWavefile().

unsigned long GT2005SoundControl::lastTransmittedMessageTimestamp`[protected]`

| Definition at line 49 of file GT2005SoundControl.h.

SoundRequest::SoundID GT2005SoundControl::lastSound`[protected]`

| Definition at line 51 of file GT2005SoundControl.h. Referenced by execute(), and GT2005SoundControl().

The documentation for this class was generated from the following files:

- Modules/SoundControl/GT2005SoundControl.h
- Modules/SoundControl/GT2005SoundControl.cpp