Orxonox: orxonox::SoundBase Class Reference

# orxonox::SoundBase Class Reference

`#include <src/orxonox/sound/SoundBase.h>`

Inheritance diagram for orxonox::SoundBase:

List of all members.

## Public Member Functions

void | attachToEntity (WorldEntity *entity)
bool | isPaused ()
bool | isPlaying ()
bool | isStopped ()
bool | loadFile (std::string filename)
void | pause ()
void | play (bool loop=false)
| SoundBase (WorldEntity *entity=NULL)
void | stop ()
void | update ()
| ~SoundBase ()

## Private Member Functions

ALint | getSourceState ()
ALuint | loadOggFile (const std::string &filename)

## Private Attributes

ALuint | buffer_
WorldEntity * | entity_
ALuint | source_

## Detailed Description

The SoudBase class is the base class for all sound file loader classes. It server as main interface to the OpenAL library.

## Constructor & Destructor Documentation

orxonox::SoundBase::SoundBase | ( | WorldEntity * | entity = `NULL` | ) |

References orxonox::SoundManager::addSound(), buffer_, entity_, orxonox::SoundManager::getInstance(), and source_.

orxonox::SoundBase::~SoundBase | ( |  | ) |

References buffer_, and source_.

## Member Function Documentation

void orxonox::SoundBase::attachToEntity | ( | WorldEntity * | entity | ) |

References entity_, and update().

Referenced by orxonox::Engine::addToSpaceShip().

ALint orxonox::SoundBase::getSourceState | ( |  | ) | `[private]`

References source_.

Referenced by isPaused(), isPlaying(), and isStopped().

bool orxonox::SoundBase::isPaused | ( |  | ) |

References getSourceState(), and source_.

bool orxonox::SoundBase::isPlaying | ( |  | ) |

References getSourceState(), and source_.

bool orxonox::SoundBase::isStopped | ( |  | ) |

References getSourceState(), and source_.

bool orxonox::SoundBase::loadFile | ( | std::string | filename | ) |

References buffer_, COUT, orxonox::SoundManager::getInstance(), orxonox::Core::getMediaPathString(), loadOggFile(), and source_.

Referenced by orxonox::Level::loadAmbientSound(), orxonox::Engine::loadSound(), orxonox::PongBall::PongBall(), and orxonox::SoundMainMenu::SoundMainMenu().

ALuint orxonox::SoundBase::loadOggFile | ( | const std::string & | filename | ) | `[private]`

References COUT.

Referenced by loadFile().

void orxonox::SoundBase::pause | ( |  | ) |

References source_.

void orxonox::SoundBase::play | ( | bool | loop = `false` | ) |

References COUT, and source_.

Referenced by orxonox::GSMainMenu::activate(), orxonox::Level::loadAmbientSound(), orxonox::Engine::loadSound(), and orxonox::PongBall::tick().

void orxonox::SoundBase::stop | ( |  | ) |

References source_.

void orxonox::SoundBase::update | ( | void |  | ) |

References COUT, entity_, orxonox::WorldEntity::getOrientation(), orxonox::WorldEntity::getPosition(), orxonox::WorldEntity::getVelocity(), orxonox::MT_Type::Quaternion, source_, and orxonox::MT_Type::Vector3.

Referenced by attachToEntity().

## Member Data Documentation

ALuint orxonox::SoundBase::buffer_`[private]`

Referenced by loadFile(), SoundBase(), and ~SoundBase().

WorldEntity* orxonox::SoundBase::entity_`[private]`

Referenced by attachToEntity(), SoundBase(), and update().

ALuint orxonox::SoundBase::source_`[private]`

Referenced by getSourceState(), isPaused(), isPlaying(), isStopped(), loadFile(), pause(), play(), SoundBase(), stop(), update(), and ~SoundBase().

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

- src/orxonox/sound/SoundBase.h
- src/orxonox/sound/SoundBase.cc