Fixed OpenAL Clean-up device. Added playBGM-event.

This commit is contained in:
Stiffly
2015-09-22 16:56:53 +02:00
parent 3f4ede4b7d
commit 5b6556e9fb
5 changed files with 77 additions and 13 deletions
+8 -3
View File
@@ -8,6 +8,7 @@
#include "Core/World.h"
#include "Sound.h"
#include "Sound/EPlaySFX.h"
#include "Sound/EPlayBGM.h"
#include "Physics/EContact.h"
#include "Core/EventBroker.h"
#include "Game/CBall.h"
@@ -36,15 +37,19 @@ private:
//Events
dd::EventRelay<SoundSystem, dd::Events::PlaySFX> m_EPlaySFX;
dd::EventRelay<SoundSystem, dd::Events::Contact> m_EContact;
dd::EventRelay<SoundSystem, dd::Events::PlayBGM> m_EPlayBGM;
bool OnPlaySFX(const dd::Events::PlaySFX &event);
bool OnContact(const dd::Events::Contact &event);
bool OnPlayBGM(const dd::Events::PlayBGM &event);
ALuint CreateSource();
std::map<Component*, ALuint> m_Sources;
std::map<ALuint, ALuint> m_SourcesToBuffers;
ALCdevice* m_Device;
//std::list<ALuint>
//Temp
ALuint m_Source;
ALuint m_Source, m_BGMSource, m_BGMSupportSource;
};
}