Skyscraper 2.0
|
#include <soundsystem.h>
Classes | |
struct | Reverb |
Public Member Functions | |
SoundSystem (Object *parent, FMOD::System *fmodsystem) | |
SoundSystem (Object *parent) | |
~SoundSystem () | |
void | SetListenerPosition (const Vector3 &position) |
void | SetListenerDirection (const Vector3 &front, const Vector3 &top) |
Vector3 | GetListenerPosition () |
void | Loop () |
void | Cleanup (int index=-1) |
unsigned int | GetLength (SoundData *data) |
SoundData * | Load (const std::string &filename) |
bool | IsLoaded (std::string filename) |
void | Report (const std::string &message) |
bool | ReportError (const std::string &message) |
FMOD::Channel * | Prepare (SoundData *data) |
FMOD::System * | GetFmodSystem () |
SoundData * | GetSoundData (std::string filename) |
SoundData * | GetSoundData (int number) |
int | GetPlayingCount () |
int | GetSoundCount () |
void | ShowLoadedSounds () |
void | ShowPlayingSounds (bool verbose=true) |
void | ShowPlayingTotal () |
![]() | |
Object (Object *parent) | |
virtual | ~Object () |
void | SetValues (const std::string &type, const std::string &name, bool is_permanent, bool is_movable=true) |
bool | IsPermanent () |
bool | IsMovable () |
const std::string & | GetType () |
int | GetNumber () |
void | AddChild (Object *object) |
Object * | GetChild (int index) |
int | GetChildrenCount () |
void | RemoveChild (Object *object) |
SceneNode * | GetSceneNode () |
void | ShowBoundingBox (bool value) |
virtual void | Move (const Vector3 &vector, Real speed=1.0) |
virtual void | Move (Real X, Real Y, Real Z, Real speed=1.0) |
virtual void | SetPosition (const Vector3 &position) |
void | SetPositionRelative (const Vector3 &position) |
virtual void | SetPosition (Real X, Real Y, Real Z) |
void | SetPositionRelative (Real X, Real Y, Real Z) |
virtual void | SetPositionY (Real value) |
virtual Vector3 | GetPosition (bool relative=false) |
virtual void | Rotate (const Vector3 &vector, Real speed=1.0) |
virtual void | Rotate (Real X, Real Y, Real Z, Real speed=1.0) |
virtual void | SetRotation (const Vector3 &rotation) |
virtual void | SetRotation (Real X, Real Y, Real Z) |
virtual Vector3 | GetRotation () |
Quaternion | GetOrientation (bool relative=false) |
void | SetOrientation (const Quaternion &q, bool relative=false) |
virtual void | OnMove (bool parent) |
virtual void | OnRotate (bool parent) |
virtual void | OnClick (Vector3 &position, bool shift, bool ctrl, bool alt, bool right) |
virtual void | OnUnclick (bool right) |
virtual void | OnHit () |
void | NotifyMove (bool parent=false) |
void | NotifyRotate (bool parent=false) |
virtual void | ResetState () |
void | ChangeParent (Object *new_parent) |
bool | IsGlobal () |
void | Init (bool children=true) |
virtual void | OnInit () |
void | RegisterLoop (Object *object) |
void | UnregisterLoop (Object *object) |
virtual void | Enabled (bool value) |
std::string | GetNameBase () |
template<typename T > | |
bool | IsType () |
template<typename T > | |
T * | ConvertTo () |
![]() | |
ObjectBase (Object *parent) | |
virtual | ~ObjectBase () |
Object * | GetParent () |
SBS * | GetRoot () |
void | SetName (const std::string &name) |
const std::string & | GetName () |
std::string | GetNameBase () |
Private Attributes | |
FMOD::System * | soundsys |
Vector3 | listener_position |
Vector3 | listener_velocity |
Vector3 | listener_forward |
Vector3 | listener_up |
std::vector< SoundData * > | sounds |
Vector3 | Position |
std::vector< Reverb > | reverbs |
Additional Inherited Members | |
![]() | |
std::string | command |
std::string | command_processed |
std::string | context |
int | linenum |
std::string | includefile |
bool | parent_deleting |
![]() | |
void | EnableLoop (bool value) |
void | LoopChildren () |
bool | SelfDestruct () |
![]() | |
SBS * | sbs |
Definition at line 36 of file soundsystem.h.
SBS::SoundSystem::SoundSystem | ( | Object * | parent, |
FMOD::System * | fmodsystem ) |
Definition at line 38 of file soundsystem.cpp.
References listener_forward, listener_position, listener_up, listener_velocity, Position, SBS::Object::SetValues(), and soundsys.
SBS::SoundSystem::SoundSystem | ( | Object * | parent | ) |
Definition at line 58 of file soundsystem.cpp.
References listener_forward, listener_position, listener_up, listener_velocity, Position, and SBS::Object::SetValues().
SBS::SoundSystem::~SoundSystem | ( | ) |
Definition at line 69 of file soundsystem.cpp.
References sounds.
void SBS::SoundSystem::Cleanup | ( | int | index = -1 | ) |
Definition at line 191 of file soundsystem.cpp.
References GetSoundCount(), Report(), SBS::ObjectBase::sbs, sounds, and SBS::SBS::Verbose.
Referenced by Skyscraper::SoundManager::On_bCleanup_Click(), and Skyscraper::SoundManager::On_bUnload_Click().
FMOD::System * SBS::SoundSystem::GetFmodSystem | ( | ) |
Definition at line 421 of file soundsystem.cpp.
References soundsys.
Referenced by SBS::Reverb::Reverb().
unsigned int SBS::SoundSystem::GetLength | ( | SoundData * | data | ) |
Definition at line 219 of file soundsystem.cpp.
References SBS::SoundData::sound.
Referenced by SBS::Sound::GetPlayPosition(), Skyscraper::SoundManager::Loop(), and SBS::Sound::SetPlayPosition().
|
inline |
Definition at line 45 of file soundsystem.h.
int SBS::SoundSystem::GetPlayingCount | ( | ) |
Definition at line 353 of file soundsystem.cpp.
References soundsys.
Referenced by Skyscraper::SoundManager::Loop(), and ShowPlayingTotal().
int SBS::SoundSystem::GetSoundCount | ( | ) |
Definition at line 364 of file soundsystem.cpp.
References sounds.
Referenced by Skyscraper::SoundManager::BuildSoundList(), Cleanup(), GetSoundData(), GetSoundData(), IsLoaded(), ShowLoadedSounds(), and ShowPlayingSounds().
SoundData * SBS::SoundSystem::GetSoundData | ( | int | number | ) |
Definition at line 333 of file soundsystem.cpp.
References GetSoundCount(), and sounds.
SoundData * SBS::SoundSystem::GetSoundData | ( | std::string | filename | ) |
Definition at line 320 of file soundsystem.cpp.
References GetSoundCount(), SBS::SetCase(), and sounds.
Referenced by Skyscraper::SoundManager::BuildSoundList(), Load(), Skyscraper::SoundManager::Loop(), and SBS::Sound::Play().
bool SBS::SoundSystem::IsLoaded | ( | std::string | filename | ) |
Definition at line 281 of file soundsystem.cpp.
References GetSoundCount(), SBS::SetCase(), and sounds.
SoundData * SBS::SoundSystem::Load | ( | const std::string & | filename | ) |
Definition at line 233 of file soundsystem.cpp.
References SBS::SoundData::filename, SBS::SBS::GetFilesystemPath(), GetSoundData(), ReportError(), SBS::ObjectBase::sbs, SBS::SetCaseCopy(), SBS::SoundData::sound, sounds, soundsys, and SBS::SBS::VerifyFile().
Referenced by SBS::Sound::Load().
|
virtual |
Reimplemented from SBS::Object.
Definition at line 78 of file soundsystem.cpp.
References SBS::SBS::camera, SBS::enable_advanced_profiling, SBS::Camera::GetDirection(), SBS::Camera::GetPosition(), SBS::Camera::IsActive(), SBS::ObjectBase::sbs, SetListenerDirection(), SetListenerPosition(), soundsys, SBS::ProfileManager::Start_Profile(), and SBS::ProfileManager::Stop_Profile().
FMOD::Channel * SBS::SoundSystem::Prepare | ( | SoundData * | data | ) |
Definition at line 297 of file soundsystem.cpp.
References SBS::SoundData::AddChannel(), SBS::SoundData::sound, and soundsys.
Referenced by SBS::Sound::Play().
|
virtual |
Reimplemented from SBS::ObjectBase.
Definition at line 343 of file soundsystem.cpp.
References SBS::ObjectBase::Report().
Referenced by Cleanup().
|
virtual |
Reimplemented from SBS::ObjectBase.
Definition at line 348 of file soundsystem.cpp.
References SBS::ObjectBase::ReportError().
Referenced by Load().
Definition at line 155 of file soundsystem.cpp.
References listener_forward, listener_position, listener_up, listener_velocity, and soundsys.
Referenced by Loop().
void SBS::SoundSystem::SetListenerPosition | ( | const Vector3 & | position | ) |
Definition at line 104 of file soundsystem.cpp.
References SBS::SBS::GetAverageTime(), SBS::SBS::GetElapsedTime(), listener_forward, listener_position, listener_up, listener_velocity, Position, SBS::ObjectBase::sbs, SBS::SBS::SmoothFrames, soundsys, and SBS::SBS::ToGlobal().
Referenced by Loop().
void SBS::SoundSystem::ShowLoadedSounds | ( | ) |
Definition at line 369 of file soundsystem.cpp.
References GetSoundCount(), SBS::ObjectBase::Report(), sounds, and SBS::ToString().
Referenced by Skyscraper::ScriptProcessor::CommandsSection::Run().
void SBS::SoundSystem::ShowPlayingSounds | ( | bool | verbose = true | ) |
Definition at line 385 of file soundsystem.cpp.
References SBS::ObjectBase::GetName(), SBS::ObjectBase::GetParent(), GetSoundCount(), SBS::ObjectBase::Report(), ShowPlayingTotal(), and sounds.
Referenced by Skyscraper::VM::ListPlayingSounds(), Skyscraper::SoundManager::On_bListPlaying_Click(), and Skyscraper::ScriptProcessor::CommandsSection::Run().
void SBS::SoundSystem::ShowPlayingTotal | ( | ) |
Definition at line 415 of file soundsystem.cpp.
References GetPlayingCount(), SBS::ObjectBase::Report(), and SBS::ToString().
Referenced by Skyscraper::VM::ListPlayingSounds(), and ShowPlayingSounds().
|
private |
Definition at line 75 of file soundsystem.h.
Referenced by SetListenerDirection(), SetListenerPosition(), SoundSystem(), and SoundSystem().
|
private |
Definition at line 73 of file soundsystem.h.
Referenced by SetListenerDirection(), SetListenerPosition(), SoundSystem(), and SoundSystem().
|
private |
Definition at line 76 of file soundsystem.h.
Referenced by SetListenerDirection(), SetListenerPosition(), SoundSystem(), and SoundSystem().
|
private |
Definition at line 74 of file soundsystem.h.
Referenced by SetListenerDirection(), SetListenerPosition(), SoundSystem(), and SoundSystem().
|
private |
Definition at line 81 of file soundsystem.h.
Referenced by SetListenerPosition(), SoundSystem(), and SoundSystem().
|
private |
Definition at line 91 of file soundsystem.h.
|
private |
Definition at line 79 of file soundsystem.h.
Referenced by Cleanup(), GetSoundCount(), GetSoundData(), GetSoundData(), IsLoaded(), Load(), ShowLoadedSounds(), ShowPlayingSounds(), and ~SoundSystem().
|
private |
Definition at line 69 of file soundsystem.h.
Referenced by GetFmodSystem(), GetPlayingCount(), Load(), Loop(), Prepare(), SetListenerDirection(), SetListenerPosition(), and SoundSystem().