Used config for soundsystem properties.

This commit is contained in:
stiffly
2016-02-08 16:40:13 +01:00
parent 7752832ce5
commit aa5878d6df
6 changed files with 18 additions and 5 deletions
+3 -1
View File
@@ -2,12 +2,14 @@
SoundManager::SoundManager(World* world, EventBroker* eventBroker, bool editorMode)
{
ConfigFile* config = ResourceManager::Load<ConfigFile>("Config.ini");
m_EventBroker = eventBroker;
m_World = world;
m_EditorEnabled = editorMode;
m_BGMVolumeChannel = config->Get<float>("Sound.BGMVolume", 1.f);
m_SFXVolumeChannel = config->Get<float>("Sound.SFXVolume", 1.f);
initOpenAL();
alSpeedOfSound(340.29f);
alDistanceModel(AL_LINEAR_DISTANCE);
alDopplerFactor(1);