Added hover and click sounds. Cleanup in SoundSystem.

This commit is contained in:
Stiffly
2015-10-15 11:43:10 +02:00
parent 816ff6a8e1
commit bb23d5a8c4
6 changed files with 30 additions and 10 deletions
+1
View File
@@ -14,6 +14,7 @@ class Sound : public Resource
friend class ResourceManager;
public:
~Sound();
ALuint Buffer() { return m_Buffer; };
std::string Path() { return m_Path; };
float Gain() { return m_Gain; };
+6 -4
View File
@@ -9,15 +9,16 @@
#include "Core/EventBroker.h"
#include "Core/ResourceManager.h"
#include "Sound.h"
#include "Sound/EPlaySound.h"
#include "Sound/EStopSound.h"
#include "Sound/EMasterVolume.h"
#include "Sound/CCollisionSound.h"
#include "Physics/EContact.h"
#include "Game/CBall.h"
#include "Game/CBrick.h"
#include "Game/CPad.h"
#include "Sound/EPlaySound.h"
#include "Sound/EStopSound.h"
#include "Sound/EMasterVolume.h"
#include "Physics/ECreateParticleSequence.h"
#include "Physics/EContact.h"
namespace dd
{
@@ -40,6 +41,7 @@ private:
std::map<ALuint, Sound*> m_BGMSourcesToBuffers;
std::map<ALuint, Sound*> m_SFXSourcesToBuffers;
ALCdevice* m_Device = nullptr;
ALCcontext* m_Context = nullptr;
//Events
dd::EventRelay<SoundSystem, dd::Events::PlaySound> m_EPlaySFX;