#include <Sound.h>

Definition at line 38 of file Sound.h.
typedef std::map<std::string, SoundBuffer *> Sound::BufferMap [protected] |
typedef std::vector<SoundSource *> Sound::SourceList [protected] |
typedef std::vector<VirtualSoundSource *> Sound::VirtualSourceList [protected] |
typedef std::vector<PlayingSoundSource *> Sound::PlayingSourceList [protected] |
| Sound::Sound | ( | ) | [private] |
Definition at line 52 of file Sound.cpp.
References ConsoleRuleTypeString, ConsoleUtil::formParams(), showSoundBuffers(), and soundPlay().
| Sound::~Sound | ( | ) | [private, virtual] |
| Sound * Sound::instance | ( | ) | [static] |
Definition at line 42 of file Sound.cpp.
References instance_.
Referenced by ClientState::addMandatoryComponents(), SoundDialog::buttonDown(), ClientMain::clientMain(), SoundBufferFactory::createBuffer(), WeaponNapalm::fireWeapon(), HelpButtonDialog::PerformanceMenu::getMenuToolTip(), SoundListener::getPosition(), TankMovement::init(), ExplosionLaserBeamRenderer::init(), initHardware(), LandscapeSoundSoundFile::play(), VirtualSoundSource::play(), ClientDefenseHandler::processMessage(), ProgressDialogSync::progressChange(), SoundListener::setGain(), SoundListener::setOrientation(), SoundListener::setPosition(), SoundListener::setVelocity(), Teleport::simulate(), TankFired::simulate(), SoundAction::simulate(), ShieldHit::simulate(), Lightning::simulate(), Explosion::simulate(), MissileActionRenderer::simulate(), ExplosionRingRenderer::simulate(), LandscapeMusicManager::simulate(), MainCamera::simulate(), VirtualSoundSource::stop(), and VirtualSoundSource::VirtualSoundSource().
| bool Sound::init | ( | int | channels | ) |
Definition at line 108 of file Sound.cpp.
References availableSources_, checkString(), SoundSource::create(), S3D::dialogMessage(), S3D::formatStringBuffer(), OptionsDisplay::getSoundChannels(), init_, OptionsDisplay::instance(), Logger::log(), and totalSources_.
| void Sound::destroy | ( | ) |
Definition at line 97 of file Sound.cpp.
References instance_.
Referenced by ClientMain::clientMain().
| void Sound::showSoundBuffers | ( | ) |
Definition at line 175 of file Sound.cpp.
References S3D::formatStringBuffer(), getAvailableChannels(), VirtualSoundSource::getBuffer(), VirtualSoundSource::getDistance(), SoundBuffer::getFileName(), VirtualSoundSource::getLooping(), VirtualSoundSource::getPlaying(), getPlayingChannels(), VirtualSoundSource::getPriority(), PlayingSoundSource::getStopped(), PlayingSoundSource::getVirtualSource(), Logger::log(), and playingSources_.
Referenced by Sound().
| void Sound::soundPlay | ( | std::vector< ConsoleRuleValue > & | values | ) |
Definition at line 163 of file Sound.cpp.
References fetchOrCreateBuffer(), VirtualSoundSource::play(), VirtualSoundSource::setRelative(), and ConsoleRuleValue::valueString.
Referenced by Sound().
| SoundBuffer * Sound::fetchOrCreateBuffer | ( | const std::string & | filename | ) |
Definition at line 438 of file Sound.cpp.
References bufferMap_, and createBuffer().
Referenced by WeaponNapalm::fireWeapon(), TankMovement::init(), ExplosionLaserBeamRenderer::init(), LandscapeSoundSoundFile::play(), ClientDefenseHandler::processMessage(), Teleport::simulate(), TankFired::simulate(), SoundAction::simulate(), ShieldHit::simulate(), Lightning::simulate(), Explosion::simulate(), MissileActionRenderer::simulate(), ExplosionRingRenderer::simulate(), LandscapeMusicManager::simulate(), and soundPlay().
| SoundListener * Sound::getDefaultListener | ( | ) |
Definition at line 417 of file Sound.cpp.
References listener_.
Referenced by SoundDialog::buttonDown(), initHardware(), and MainCamera::simulate().
| void Sound::addManaged | ( | VirtualSoundSource * | source | ) |
Definition at line 402 of file Sound.cpp.
References managedSources_.
Referenced by VirtualSoundSource::VirtualSoundSource().
| void Sound::addPlaying | ( | VirtualSoundSource * | source | ) |
Definition at line 248 of file Sound.cpp.
References playingSources_, VirtualSoundSource::setPlayingSource(), and updateSources().
Referenced by VirtualSoundSource::play().
| void Sound::removePlaying | ( | VirtualSoundSource * | source | ) |
Definition at line 390 of file Sound.cpp.
References VirtualSoundSource::getPlayingSource(), VirtualSoundSource::setPlayingSource(), PlayingSoundSource::setStopped(), PlayingSoundSource::setVirtualSource(), and updateSources().
Referenced by VirtualSoundSource::stop().
| void Sound::simulate | ( | const unsigned | state, | |
| float | simTime | |||
| ) | [virtual] |
Reimplemented from GameStateI.
Definition at line 205 of file Sound.cpp.
References SoundSource::getPlaying(), playingSources_, SoundSource::simulate(), totalTime_, and updateSources().
Referenced by ProgressDialogSync::progressChange().
| int Sound::getAvailableChannels | ( | ) |
Definition at line 407 of file Sound.cpp.
References availableSources_.
Referenced by showSoundBuffers().
| int Sound::getPlayingChannels | ( | ) |
Definition at line 412 of file Sound.cpp.
References playingSources_.
Referenced by showSoundBuffers().
| void Sound::updateSources | ( | ) | [protected] |
Definition at line 258 of file Sound.cpp.
References VirtualSoundSource::actualPlay(), availableSources_, DIALOG_ASSERT, PlayingSoundSource::getActualSource(), VirtualSoundSource::getLooping(), VirtualSoundSource::getPlaying(), SoundSource::getPlaying(), SoundListener::getPosition(), PlayingSoundSource::getStopped(), PlayingSoundSource::getVirtualSource(), int(), listener_, lt_virt(), managedSources_, playingSources_, PlayingSoundSource::setActualSource(), VirtualSoundSource::setPlayingSource(), PlayingSoundSource::setStopped(), sort(), SoundSource::stop(), totalSources_, and VirtualSoundSource::updateDistance().
Referenced by addPlaying(), removePlaying(), and simulate().
| SoundBuffer * Sound::createBuffer | ( | char * | fileName | ) | [protected] |
Definition at line 422 of file Sound.cpp.
References SoundBufferFactory::createBuffer(), S3D::dialogExit(), and S3D::formatStringBuffer().
Referenced by fetchOrCreateBuffer().
Sound * Sound::instance_ = 0 [static, protected] |
float Sound::totalTime_ [protected] |
BufferMap Sound::bufferMap_ [protected] |
SourceList Sound::totalSources_ [protected] |
SourceList Sound::availableSources_ [protected] |
Definition at line 71 of file Sound.h.
Referenced by getAvailableChannels(), init(), and updateSources().
SoundListener Sound::listener_ [protected] |
VirtualSourceList Sound::managedSources_ [protected] |
PlayingSourceList Sound::playingSources_ [protected] |
Definition at line 74 of file Sound.h.
Referenced by addPlaying(), getPlayingChannels(), showSoundBuffers(), simulate(), and updateSources().
bool Sound::init_ [protected] |
1.5.3