Added logic for mastervolume. And a coresponding event.

(sources need to be updated for it to be fully working)
This commit is contained in:
Stiffly
2015-09-24 22:55:24 +02:00
parent 1f73201943
commit e867722d9a
4 changed files with 71 additions and 19 deletions
+4 -1
View File
@@ -10,6 +10,7 @@
#include "Sound.h"
#include "Sound/EPlaySound.h"
#include "Sound/EStopSound.h"
#include "Sound/EMasterVolume.h"
#include "Physics/EContact.h"
#include "Game/CBall.h"
#include "Game/CBrick.h"
@@ -38,9 +39,11 @@ private:
dd::EventRelay<SoundSystem, dd::Events::PlaySound> m_EPlaySFX;
dd::EventRelay<SoundSystem, dd::Events::Contact> m_EContact;
dd::EventRelay<SoundSystem, dd::Events::StopSound> m_EStopSound;
dd::EventRelay<SoundSystem, dd::Events::MasterVolume> m_EMasterVolume;
bool OnPlaySound(const dd::Events::PlaySound &event);
bool OnContact(const dd::Events::Contact &event);
bool OnStopSound(const dd::Events::StopSound &event);
bool OnMasterVolume(const dd::Events::MasterVolume &event);
ALuint CreateSource();
@@ -48,7 +51,7 @@ private:
ALCdevice* m_Device;
//Temp
float m_BGMMasterVolume, m_SFXMasterVolume;
};
}