Added spatial audio #374
|
@ -91,11 +91,6 @@ namespace SHADE
|
|||
LoadBank((AUDIO_FOLDER_PATH + "SFX.bank").data());
|
||||
LoadBank((AUDIO_FOLDER_PATH + "UI.bank").data());
|
||||
|
||||
//auto clip = CreateAudioClip("event:/Characters/sfx_footsteps_human");
|
||||
//clip->Play();
|
||||
//PlayEventOnce("event:/Characters/sfx_footsteps_raccoon");
|
||||
//PlayEventOnce("event:/SFX/Dawn/Dawn_Attack");
|
||||
|
||||
#ifdef SHEDITOR
|
||||
|
||||
// Subscribe to Editor State Change Events
|
||||
|
@ -163,13 +158,13 @@ namespace SHADE
|
|||
}
|
||||
|
||||
auto [begin, end] = audioClipLibrary.GetDenseAccess();
|
||||
for(auto it = begin; it != end; ++it)
|
||||
for (auto& it = begin; it != end; ++it)
|
||||
{
|
||||
if(it->instance && (it->transformRef != MAX_EID))
|
||||
{
|
||||
if(SHTransformComponent* transformComponent = SHComponentManager::GetComponent_s<SHTransformComponent>(it->transformRef))
|
||||
{
|
||||
FMOD_3D_ATTRIBUTES attribs{ { 0 } }; //TODO: Set other attribs
|
||||
FMOD_3D_ATTRIBUTES attribs{ { 0 } };
|
||||
auto pos = transformComponent->GetWorldPosition();
|
||||
SHQuaternion worldOrientation = transformComponent->GetWorldOrientation();
|
||||
SHVec3 orientatedFoward = (worldOrientation * SHQuaternion::FromEuler(SHVec3::Forward) * SHQuaternion::Conjugate(worldOrientation)).ToEuler();
|
||||
|
|
Loading…
Reference in New Issue