Files
escape-the-dawn/Escape-the-Dawn/Systems/SoundsSystem.cpp
T
Jace bca46de9e1 Merge branch 'master' of github.com:sippeangelo/Escape-the-Dawn
Conflicts:
	Escape-the-Dawn/Escape-the-Dawn.vcxproj
2014-03-09 20:01:59 +01:00

42 lines
793 B
C++

#include "SoundSystem.h"
#include "World.h"
#include <AL/al.h>
#include <AL/alc.h>
Systems::SoundSystem::SoundSystem(World* world)
: System(world)
{
ALCdevice* Device = alcOpenDevice(nullptr);
if(Device)
{
context = alcCreateContext(Device, nullptr);
alcMakeContextCurrent(context);
}
}
void Systems::SoundSystem::Update(double dt)
{
}
void Systems::SoundSystem::UpdateEntity(double dt, EntityID entity, EntityID parent)
{
auto soundEmitter = m_World->GetComponent<Components::SoundEmitter>(entity, "SoundEmitter");
if(soundEmitter == nullptr)
return;
}
void Systems::SoundSystem::PlaySound(std::shared_ptr<Components::SoundEmitter> emitter, std::string fileName)
{
LoadFile(fileName);
}
void Systems::SoundSystem::LoadFile(std::string fileName)
{
//loadWavFile()
}