SS fix
This commit is contained in:
@@ -94,7 +94,7 @@ void GameWorld::Initialize()
|
|||||||
bounds->VolumeVector = glm::vec3(4.f, 0.7f, 1);
|
bounds->VolumeVector = glm::vec3(4.f, 0.7f, 1);
|
||||||
soundEmitter = AddComponent<Components::SoundEmitter>(m_Player, "SoundEmitter");
|
soundEmitter = AddComponent<Components::SoundEmitter>(m_Player, "SoundEmitter");
|
||||||
soundEmitter->Loop = true;
|
soundEmitter->Loop = true;
|
||||||
soundEmitter->MaxDistance = FLT_MAX;
|
//soundEmitter->MaxDistance = FLT_MAX;
|
||||||
soundEmitter->ReferenceDistance = 10;
|
soundEmitter->ReferenceDistance = 10;
|
||||||
soundEmitter->Gain = 1;
|
soundEmitter->Gain = 1;
|
||||||
soundEmitter->Pitch = 1;
|
soundEmitter->Pitch = 1;
|
||||||
|
|||||||
@@ -89,14 +89,14 @@ void Systems::SoundSystem::PlaySound(std::shared_ptr<Components::SoundEmitter> e
|
|||||||
void Systems::SoundSystem::PlaySound(std::shared_ptr<Components::SoundEmitter> emitter)
|
void Systems::SoundSystem::PlaySound(std::shared_ptr<Components::SoundEmitter> emitter)
|
||||||
{
|
{
|
||||||
ALuint buffer = LoadFile(emitter->Path);
|
ALuint buffer = LoadFile(emitter->Path);
|
||||||
ALuint source = m_Source[emitter.get()];
|
ALuint source = m_Sources[emitter.get()];
|
||||||
alSourcei(source, AL_BUFFER, buffer);
|
alSourcei(source, AL_BUFFER, buffer);
|
||||||
alSourcePlay(m_Source[emitter.get()]);
|
alSourcePlay(m_Sources[emitter.get()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Systems::SoundSystem::StopSound(std::shared_ptr<Components::SoundEmitter> emitter)
|
void Systems::SoundSystem::StopSound(std::shared_ptr<Components::SoundEmitter> emitter)
|
||||||
{
|
{
|
||||||
alSourceStop(m_Source[emitter.get()]);
|
alSourceStop(m_Sources[emitter.get()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Systems::SoundSystem::OnComponentCreated(std::string type, std::shared_ptr<Component> component)
|
void Systems::SoundSystem::OnComponentCreated(std::string type, std::shared_ptr<Component> component)
|
||||||
|
|||||||
Reference in New Issue
Block a user