#68 Fixed warning in SoundSystem.cpp

This commit is contained in:
stiffly
2016-02-01 17:15:51 +01:00
parent 0a43f8104e
commit 5474a18753
+5 -1
View File
@@ -116,7 +116,11 @@ void SoundSystem::updateEmitters(double dt)
setSourcePos(it->second->ALsource, nextPos);
setSourceVel(it->second->ALsource, velocity);
float gain;
(bool)(it->second->Type) ? gain = m_SFXVolumeChannel : gain = m_BGMVolumeChannel;
if (it->second->Type == SoundType::SFX) {
gain = m_SFXVolumeChannel;
} else if (it->second->Type == SoundType::BGM) {
gain = m_BGMVolumeChannel;
}
auto emitter = m_World->GetComponent(it->first, "SoundEmitter");
setSoundProperties(it->second->ALsource, &emitter);