#include <src/orxonox/sound/SoundManager.h>
Public Member Functions | |
void | addSound (SoundBase *sound) |
bool | isSoundAvailable () |
void | removeSound (SoundBase *sound) |
SoundManager () | |
void | tick (float dt) |
~SoundManager () | |
Static Public Member Functions | |
static SoundManager & | getInstance () |
Private Attributes | |
ALCcontext * | context_ |
ALCdevice * | device_ |
bool | soundavailable_ |
std::list< SoundBase * > | soundlist_ |
Static Private Attributes | |
static SoundManager * | singletonRef_s = NULL |
orxonox::SoundManager::SoundManager | ( | ) |
Default constructor
References context_, COUT, device_, singletonRef_s, and soundavailable_.
orxonox::SoundManager::~SoundManager | ( | ) |
References context_, device_, and singletonRef_s.
void orxonox::SoundManager::addSound | ( | SoundBase * | sound | ) |
Add a SoundBase object to the list. Every SoundBase object should be in this list.
sound | Pointer to the SoundBase object to add |
References soundlist_.
Referenced by orxonox::SoundBase::SoundBase().
static SoundManager& orxonox::SoundManager::getInstance | ( | ) | [inline, static] |
Referenced by orxonox::SoundBase::loadFile(), and orxonox::SoundBase::SoundBase().
bool orxonox::SoundManager::isSoundAvailable | ( | ) |
Check if sound is available
References soundavailable_.
void orxonox::SoundManager::removeSound | ( | SoundBase * | sound | ) |
Remove a SoundBase object from the list and destroy it.
References soundlist_.
void orxonox::SoundManager::tick | ( | float | dt | ) | [virtual] |
Tick function, updates listener and registred SoundBase objects
dt |
Implements orxonox::Tickable.
References COUT, orxonox::CameraManager::getActiveCamera(), orxonox::CameraManager::getInstance(), orxonox::CameraManager::getInstancePtr(), orxonox::WorldEntity::getOrientation(), orxonox::WorldEntity::getPosition(), orxonox::MT_Type::Quaternion, soundlist_, and orxonox::MT_Type::Vector3.
ALCcontext* orxonox::SoundManager::context_ [private] |
Referenced by SoundManager(), and ~SoundManager().
ALCdevice* orxonox::SoundManager::device_ [private] |
Referenced by SoundManager(), and ~SoundManager().
SoundManager * orxonox::SoundManager::singletonRef_s = NULL [static, private] |
Referenced by SoundManager(), and ~SoundManager().
bool orxonox::SoundManager::soundavailable_ [private] |
Referenced by isSoundAvailable(), and SoundManager().
std::list<SoundBase*> orxonox::SoundManager::soundlist_ [private] |
Referenced by addSound(), removeSound(), and tick().