Merge branch 'master' of github.com:sippeangelo/Escape-the-Dawn

Conflicts:
	Escape-the-Dawn/Escape-the-Dawn.vcxproj
This commit is contained in:
2014-03-09 20:01:59 +01:00
6 changed files with 81 additions and 10 deletions
+42
View File
@@ -0,0 +1,42 @@
#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()
}