SoundSystem påbörjat

This commit is contained in:
Adam
2014-03-09 18:08:56 +01:00
parent c952953787
commit e4c443042b
4 changed files with 73 additions and 11 deletions
+41
View File
@@ -0,0 +1,41 @@
#include "SoundSystem.h"
#include "World.h"
#include <AL/al.h>
#include <AL/alc.h>
System::SoundSystem::SoundSystem(World* world)
{
ALCdevice* Device = alcOpenDevice(nullptr);
if(Device)
{
context = alcCreateContext(Device, nullptr);
alcMakeContextCurrent(context);
}
}
void System::SoundSystem::Update(double dt)
{
}
void System::SoundSystem::Update(double dt, EntityID entity, EntityID parent)
{
auto soundEmitter = m_World->GetComponent<Components::SoundEmitter>(entity, "SoundEmitter");
if(soundEmitter == nullptr)
return;
}
void System::SoundSystem::PlaySound(std::shared_ptr<Components::SoundEmitter> emitter, std::string fileName)
{
LoadFile(fileName);
}
void System::SoundSystem::LoadFile(std::string fileName)
{
loadWavFile()
}