#include <C4SoundInstance.h>
Public Member Functions | |
| C4SoundEffect () | |
| ~C4SoundEffect () | |
| void | Clear () |
| bool | Load (const char *szFileName, C4Group &hGroup, const char *namespace_prefix) |
| bool | Load (BYTE *pData, size_t iDataLen, bool fRaw=false) |
| void | Execute () |
| C4SoundInstance * | New (bool fLoop=false, int32_t iVolume=100, C4Object *pObj=nullptr, int32_t iCustomFalloffDistance=0, int32_t iPitch=0, C4SoundModifier *modifier=nullptr) |
| C4SoundInstance * | GetInstance (C4Object *pObj) |
| void | ClearPointers (C4Object *pObj) |
| int32_t | GetStartedInstanceCount (int32_t iX, int32_t iY, int32_t iRad) |
| int32_t | GetStartedInstanceCount () |
| const char * | GetFullName () const |
Public Attributes | |
| char | Name [C4MaxSoundName+1] |
| int32_t | Instances {0} |
| int32_t | SampleRate |
| int32_t | Length |
| C4SoundHandle | pSample {0} |
| C4SoundInstance * | FirstInst {nullptr} |
| C4SoundEffect * | Next {nullptr} |
Protected Member Functions | |
| void | AddInst (C4SoundInstance *pInst) |
| void | RemoveInst (C4SoundInstance *pInst) |
Friends | |
| class | C4SoundInstance |
Definition at line 27 of file C4SoundInstance.h.
| C4SoundEffect::C4SoundEffect | ( | ) |
Definition at line 32 of file C4SoundInstance.cpp.
| C4SoundEffect::~C4SoundEffect | ( | ) |
Definition at line 37 of file C4SoundInstance.cpp.
|
protected |
| void C4SoundEffect::Clear | ( | ) |
Definition at line 42 of file C4SoundInstance.cpp.
| void C4SoundEffect::ClearPointers | ( | C4Object * | pObj | ) |
Definition at line 150 of file C4SoundInstance.cpp.
References C4SoundInstance::pNext.
| void C4SoundEffect::Execute | ( | ) |
Definition at line 115 of file C4SoundInstance.cpp.
References C4SoundInstance::pNext.
Referenced by C4SoundSystem::Execute().
|
inline |
| C4SoundInstance * C4SoundEffect::GetInstance | ( | C4Object * | pObj | ) |
| int32_t C4SoundEffect::GetStartedInstanceCount | ( | ) |
| int32_t C4SoundEffect::GetStartedInstanceCount | ( | int32_t | iX, |
| int32_t | iY, | ||
| int32_t | iRad | ||
| ) |
Definition at line 156 of file C4SoundInstance.cpp.
References C4SoundInstance::pNext.
Referenced by C4SoundInstance::CheckStart().
| bool C4SoundEffect::Load | ( | BYTE * | pData, |
| size_t | iDataLen, | ||
| bool | fRaw = false |
||
| ) |
Definition at line 78 of file C4SoundInstance.cpp.
References Application, Config, C4SoundLoaders::SoundInfo::final_handle, C4SoundLoaders::SoundLoader::first_loader, C4SoundLoaders::SoundInfo::format, Log(), C4Application::MusicSystem, C4SoundLoaders::SoundLoader::next, C4SoundLoaders::SoundLoader::OPTION_Raw, C4ConfigSound::RXSound, C4SoundLoaders::SoundInfo::sample_length, C4SoundLoaders::SoundInfo::sample_rate, C4MusicSystem::SelectContext(), C4Config::Sound, and C4SoundLoaders::SoundInfo::sound_data.
| bool C4SoundEffect::Load | ( | const char * | szFileName, |
| C4Group & | hGroup, | ||
| const char * | namespace_prefix | ||
| ) |
Definition at line 53 of file C4SoundInstance.cpp.
References C4MaxSoundName, Config, StdBuf::getMData(), StdBuf::getSize(), C4Group::LoadEntry(), C4ConfigSound::RXSound, SAppend(), SCopy(), and C4Config::Sound.
Referenced by C4SoundSystem::LoadEffects().
| C4SoundInstance * C4SoundEffect::New | ( | bool | fLoop = false, |
| int32_t | iVolume = 100, |
||
| C4Object * | pObj = nullptr, |
||
| int32_t | iCustomFalloffDistance = 0, |
||
| int32_t | iPitch = 0, |
||
| C4SoundModifier * | modifier = nullptr |
||
| ) |
Definition at line 129 of file C4SoundInstance.cpp.
References C4MaxSoundInstances, and C4SoundInstance::Create().
Referenced by C4SoundSystem::NewEffect().
|
protected |
|
friend |
Definition at line 29 of file C4SoundInstance.h.
| C4SoundInstance* C4SoundEffect::FirstInst {nullptr} |
Definition at line 38 of file C4SoundInstance.h.
| int32_t C4SoundEffect::Instances {0} |
Definition at line 35 of file C4SoundInstance.h.
| int32_t C4SoundEffect::Length |
Definition at line 36 of file C4SoundInstance.h.
Referenced by C4SoundInstance::CheckStart().
| char C4SoundEffect::Name[C4MaxSoundName+1] |
Definition at line 34 of file C4SoundInstance.h.
Referenced by C4SoundSystem::GetEffect(), GetFullName(), and C4SoundSystem::LoadEffects().
| C4SoundEffect* C4SoundEffect::Next {nullptr} |
Definition at line 39 of file C4SoundInstance.h.
Referenced by C4SoundSystem::ClearEffects(), C4SoundSystem::ClearPointers(), C4SoundSystem::Execute(), C4SoundSystem::FindInstance(), C4SoundSystem::GetEffect(), C4SoundSystem::GetFirstInstance(), C4SoundSystem::GetNextInstance(), C4SoundSystem::LoadEffects(), and C4SoundSystem::RemoveEffect().
| C4SoundHandle C4SoundEffect::pSample {0} |
Definition at line 37 of file C4SoundInstance.h.
Referenced by C4SoundInstance::Start().
| int32_t C4SoundEffect::SampleRate |
Definition at line 36 of file C4SoundInstance.h.