forked from mirror/openmw-tes3mp
Update the actual sounds and music volume when settings change
This commit is contained in:
parent
6ea7bdb224
commit
05fd8f0211
1 changed files with 24 additions and 0 deletions
|
@ -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…
Reference in a new issue