From 6d3c564295b9bcf3a492f9e4ffe89f5dce0e44e1 Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 13 Mar 2014 20:52:54 +0100 Subject: [PATCH] SS fix --- Escape-the-Dawn/GameWorld.cpp | 2 +- Escape-the-Dawn/Systems/SoundsSystem.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Escape-the-Dawn/GameWorld.cpp b/Escape-the-Dawn/GameWorld.cpp index 369afbc..4796bda 100644 --- a/Escape-the-Dawn/GameWorld.cpp +++ b/Escape-the-Dawn/GameWorld.cpp @@ -94,7 +94,7 @@ void GameWorld::Initialize() bounds->VolumeVector = glm::vec3(4.f, 0.7f, 1); soundEmitter = AddComponent(m_Player, "SoundEmitter"); soundEmitter->Loop = true; - soundEmitter->MaxDistance = FLT_MAX; + //soundEmitter->MaxDistance = FLT_MAX; soundEmitter->ReferenceDistance = 10; soundEmitter->Gain = 1; soundEmitter->Pitch = 1; diff --git a/Escape-the-Dawn/Systems/SoundsSystem.cpp b/Escape-the-Dawn/Systems/SoundsSystem.cpp index b66a738..bbe152f 100644 --- a/Escape-the-Dawn/Systems/SoundsSystem.cpp +++ b/Escape-the-Dawn/Systems/SoundsSystem.cpp @@ -89,14 +89,14 @@ void Systems::SoundSystem::PlaySound(std::shared_ptr e void Systems::SoundSystem::PlaySound(std::shared_ptr emitter) { ALuint buffer = LoadFile(emitter->Path); - ALuint source = m_Source[emitter.get()]; + ALuint source = m_Sources[emitter.get()]; alSourcei(source, AL_BUFFER, buffer); - alSourcePlay(m_Source[emitter.get()]); + alSourcePlay(m_Sources[emitter.get()]); } void Systems::SoundSystem::StopSound(std::shared_ptr emitter) { - alSourceStop(m_Source[emitter.get()]); + alSourceStop(m_Sources[emitter.get()]); } void Systems::SoundSystem::OnComponentCreated(std::string type, std::shared_ptr component)