mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 09:35:28 +00:00
Merge pull request #4 from ChrisKCat/sound-volume-updates
Sound volume updates
This commit is contained in:
commit
38208653be
@ -539,6 +539,30 @@ namespace MWSound
|
|||||||
mSFXVolume = Settings::Manager::getFloat("sfx volume", "Sound");
|
mSFXVolume = Settings::Manager::getFloat("sfx volume", "Sound");
|
||||||
mFootstepsVolume = Settings::Manager::getFloat("footsteps volume", "Sound");
|
mFootstepsVolume = Settings::Manager::getFloat("footsteps volume", "Sound");
|
||||||
mVoiceVolume = Settings::Manager::getFloat("voice volume", "Sound");
|
mVoiceVolume = Settings::Manager::getFloat("voice volume", "Sound");
|
||||||
|
|
||||||
|
SoundMap::iterator snditer = mActiveSounds.begin();
|
||||||
|
while(snditer != mActiveSounds.end())
|
||||||
|
{
|
||||||
|
if(snditer->second.second != "_say_sound")
|
||||||
|
{
|
||||||
|
float basevol = mMasterVolume * mSFXVolume;
|
||||||
|
float min, max;
|
||||||
|
lookup(snditer->second.second, basevol, min, max);
|
||||||
|
snditer->first->mBaseVolume = basevol;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
float basevol = mMasterVolume * mVoiceVolume;
|
||||||
|
snditer->first->mBaseVolume = basevol;
|
||||||
|
}
|
||||||
|
snditer->first->update();
|
||||||
|
snditer++;
|
||||||
|
}
|
||||||
|
if(mMusic)
|
||||||
|
{
|
||||||
|
mMusic->mBaseVolume = mMasterVolume * mMusicVolume;
|
||||||
|
mMusic->update();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Default readAll implementation, for decoders that can't do anything
|
// Default readAll implementation, for decoders that can't do anything
|
||||||
|
Loading…
x
Reference in New Issue
Block a user