#include <VirtualSoundSource.h>
Public Member Functions | |
| VirtualSoundSource (unsigned int priority, bool looping, bool managed) | |
| virtual | ~VirtualSoundSource () |
| void | play (SoundBuffer *buffer) |
| void | stop () |
| bool | getPlaying () |
| bool | getManaged () |
| bool | getLooping () |
| bool | getRelative () |
| Vector & | getPosition () |
| unsigned int | getPriority () |
| SoundBuffer * | getBuffer () |
| PlayingSoundSource * | getPlayingSource () |
| float | getDistance () |
| void | setRelative () |
| void | setPosition (Vector &position) |
| void | setVelocity (Vector &velocity) |
| void | setGain (float gain) |
| void | setReferenceDistance (float refDist) |
| void | setRolloff (float rolloff) |
| void | actualPlay () |
| void | setPlayingSource (PlayingSoundSource *s) |
| void | updateDistance (Vector &listener) |
Protected Attributes | |
| unsigned int | priority_ |
| PlayingSoundSource * | playingSource_ |
| SoundBuffer * | buffer_ |
| Vector | position_ |
| Vector | velocity_ |
| float | distance_ |
| float | gain_ |
| float | refDist_ |
| float | rolloff_ |
| bool | relative_ |
| bool | looping_ |
| bool | managed_ |
Definition at line 29 of file VirtualSoundSource.h.
| VirtualSoundSource::VirtualSoundSource | ( | unsigned int | priority, | |
| bool | looping, | |||
| bool | managed | |||
| ) |
Definition at line 26 of file VirtualSoundSource.cpp.
References Sound::addManaged(), Sound::instance(), and managed_.
| VirtualSoundSource::~VirtualSoundSource | ( | ) | [virtual] |
| void VirtualSoundSource::play | ( | SoundBuffer * | buffer | ) |
Definition at line 45 of file VirtualSoundSource.cpp.
References Sound::addPlaying(), buffer_, Sound::instance(), and stop().
Referenced by TankMovement::init(), TankKeyboardControlUtil::moveLeftRight(), TankKeyboardControlUtil::movePower(), TankKeyboardControlUtil::moveUpDown(), LandscapeSoundSoundFile::play(), SoundUtils::playAbsoluteSound(), SoundUtils::playRelativeSound(), SoundAction::simulate(), MissileActionRenderer::simulate(), LandscapeMusicManager::simulate(), and Sound::soundPlay().
| void VirtualSoundSource::stop | ( | ) |
Definition at line 64 of file VirtualSoundSource.cpp.
References Sound::instance(), playingSource_, and Sound::removePlaying().
Referenced by TankKeyboardControlUtil::endPlayMove(), TankKeyboardControlUtil::moveLeftRight(), TankKeyboardControlUtil::movePower(), TankKeyboardControlUtil::moveUpDown(), play(), TankMovement::simulate(), LandscapeSoundManager::simulate(), LandscapeMusicManager::simulate(), and ~VirtualSoundSource().
| bool VirtualSoundSource::getPlaying | ( | ) |
Definition at line 77 of file VirtualSoundSource.cpp.
References PlayingSoundSource::getActualSource(), SoundSource::getPlaying(), and playingSource_.
Referenced by Sound::showSoundBuffers(), and Sound::updateSources().
| bool VirtualSoundSource::getManaged | ( | ) | [inline] |
| bool VirtualSoundSource::getLooping | ( | ) | [inline] |
Definition at line 41 of file VirtualSoundSource.h.
References looping_.
Referenced by Sound::showSoundBuffers(), and Sound::updateSources().
| bool VirtualSoundSource::getRelative | ( | ) | [inline] |
Definition at line 42 of file VirtualSoundSource.h.
References relative_.
Referenced by updateDistance().
| Vector& VirtualSoundSource::getPosition | ( | ) | [inline] |
Definition at line 43 of file VirtualSoundSource.h.
References position_.
Referenced by updateDistance().
| unsigned int VirtualSoundSource::getPriority | ( | ) | [inline] |
Definition at line 44 of file VirtualSoundSource.h.
References priority_.
Referenced by lt_virt(), and Sound::showSoundBuffers().
| SoundBuffer* VirtualSoundSource::getBuffer | ( | ) | [inline] |
Definition at line 45 of file VirtualSoundSource.h.
References buffer_.
Referenced by Sound::showSoundBuffers().
| PlayingSoundSource* VirtualSoundSource::getPlayingSource | ( | ) | [inline] |
Definition at line 46 of file VirtualSoundSource.h.
References playingSource_.
Referenced by Sound::removePlaying().
| float VirtualSoundSource::getDistance | ( | ) | [inline] |
Definition at line 47 of file VirtualSoundSource.h.
References distance_.
Referenced by lt_virt(), and Sound::showSoundBuffers().
| void VirtualSoundSource::setRelative | ( | ) |
Definition at line 86 of file VirtualSoundSource.cpp.
References PlayingSoundSource::getActualSource(), playingSource_, relative_, and SoundSource::setRelative().
Referenced by SoundUtils::playRelativeSound(), LandscapeSoundPositionAmbient::setPosition(), LandscapeSoundPositionWater::setPosition(), LandscapeSoundPositionGroup::setPosition(), SoundAction::simulate(), LandscapeMusicManager::simulate(), and Sound::soundPlay().
| void VirtualSoundSource::setPosition | ( | Vector & | position | ) |
Definition at line 95 of file VirtualSoundSource.cpp.
References PlayingSoundSource::getActualSource(), playingSource_, position_, and SoundSource::setPosition().
Referenced by TankMovement::init(), TankKeyboardControlUtil::keyboardCheck(), TankMovement::moveTank(), SoundUtils::playAbsoluteSound(), LandscapeSoundPositionAbsoulte::setPosition(), LandscapeSoundPositionAmbient::setPosition(), LandscapeSoundPositionWater::setPosition(), LandscapeSoundPositionGroup::setPosition(), LandscapeSoundPositionSet::setPosition(), SoundAction::simulate(), and MissileActionRenderer::simulate().
| void VirtualSoundSource::setVelocity | ( | Vector & | velocity | ) |
Definition at line 104 of file VirtualSoundSource.cpp.
References PlayingSoundSource::getActualSource(), playingSource_, SoundSource::setVelocity(), and velocity_.
Referenced by LandscapeSoundPositionSet::setPosition(), and MissileActionRenderer::simulate().
| void VirtualSoundSource::setGain | ( | float | gain | ) |
Definition at line 113 of file VirtualSoundSource.cpp.
References gain_, PlayingSoundSource::getActualSource(), playingSource_, and SoundSource::setGain().
Referenced by LandscapeSoundSoundFile::play(), SoundAction::simulate(), MissileActionRenderer::simulate(), LandscapeSoundManager::simulate(), and LandscapeMusicManager::simulate().
| void VirtualSoundSource::setReferenceDistance | ( | float | refDist | ) |
Definition at line 122 of file VirtualSoundSource.cpp.
References PlayingSoundSource::getActualSource(), playingSource_, refDist_, and SoundSource::setReferenceDistance().
Referenced by LandscapeSoundSoundFile::play(), and SoundAction::simulate().
| void VirtualSoundSource::setRolloff | ( | float | rolloff | ) |
Definition at line 131 of file VirtualSoundSource.cpp.
References PlayingSoundSource::getActualSource(), playingSource_, rolloff_, and SoundSource::setRolloff().
Referenced by LandscapeSoundSoundFile::play(), and SoundAction::simulate().
| void VirtualSoundSource::actualPlay | ( | ) |
Definition at line 53 of file VirtualSoundSource.cpp.
References buffer_, gain_, PlayingSoundSource::getActualSource(), looping_, SoundSource::play(), playingSource_, position_, refDist_, relative_, rolloff_, SoundSource::setGain(), SoundSource::setPosition(), SoundSource::setReferenceDistance(), SoundSource::setRelative(), SoundSource::setRolloff(), SoundSource::setVelocity(), and velocity_.
Referenced by Sound::updateSources().
| void VirtualSoundSource::setPlayingSource | ( | PlayingSoundSource * | s | ) |
Definition at line 72 of file VirtualSoundSource.cpp.
References playingSource_.
Referenced by Sound::addPlaying(), Sound::removePlaying(), and Sound::updateSources().
| void VirtualSoundSource::updateDistance | ( | Vector & | listener | ) |
Definition at line 140 of file VirtualSoundSource.cpp.
References distance_, getPosition(), and getRelative().
Referenced by Sound::updateSources().
unsigned int VirtualSoundSource::priority_ [protected] |
PlayingSoundSource* VirtualSoundSource::playingSource_ [protected] |
Definition at line 63 of file VirtualSoundSource.h.
Referenced by actualPlay(), getPlaying(), getPlayingSource(), setGain(), setPlayingSource(), setPosition(), setReferenceDistance(), setRelative(), setRolloff(), setVelocity(), stop(), and ~VirtualSoundSource().
SoundBuffer* VirtualSoundSource::buffer_ [protected] |
Definition at line 64 of file VirtualSoundSource.h.
Referenced by actualPlay(), getBuffer(), and play().
Vector VirtualSoundSource::position_ [protected] |
Definition at line 65 of file VirtualSoundSource.h.
Referenced by actualPlay(), getPosition(), and setPosition().
Vector VirtualSoundSource::velocity_ [protected] |
float VirtualSoundSource::distance_ [protected] |
Definition at line 66 of file VirtualSoundSource.h.
Referenced by getDistance(), and updateDistance().
float VirtualSoundSource::gain_ [protected] |
float VirtualSoundSource::refDist_ [protected] |
Definition at line 67 of file VirtualSoundSource.h.
Referenced by actualPlay(), and setReferenceDistance().
float VirtualSoundSource::rolloff_ [protected] |
bool VirtualSoundSource::relative_ [protected] |
Definition at line 68 of file VirtualSoundSource.h.
Referenced by actualPlay(), getRelative(), and setRelative().
bool VirtualSoundSource::looping_ [protected] |
bool VirtualSoundSource::managed_ [protected] |
Definition at line 70 of file VirtualSoundSource.h.
Referenced by getManaged(), and VirtualSoundSource().
1.5.3