]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
100% untested: additionally apply mastervolume to ambient sound channels
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 1 Dec 2010 08:12:17 +0000 (08:12 +0000)
committerRudolf Polzer <divverent@alientrap.org>
Sat, 4 Dec 2010 10:24:28 +0000 (11:24 +0100)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10645 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=750d19efdc7013c4380d3a5823389e2617af41a1

snd_main.c

index 1a59c3b76ed0e196ba7603f15db2fef0abbdb7b2..e328b9399ba434acd4cb9fea40d228d63af1306f 100644 (file)
@@ -1889,15 +1889,15 @@ void S_UpdateAmbientSounds (void)
 
                if (snd_spatialization_prologic.integer != 0)
                {
-                       chan->listener_volume[0] = (int)bound(0, chan->master_vol * ambient_level.value * snd_speakerlayout.listeners[0].ambientvolume * sqrt(0.5), 65536);
-                       chan->listener_volume[1] = (int)bound(0, chan->master_vol * ambient_level.value * snd_speakerlayout.listeners[1].ambientvolume * sqrt(0.5), 65536);
+                       chan->listener_volume[0] = (int)bound(0, chan->master_vol * ambient_level.value * mastervolume.value * snd_speakerlayout.listeners[0].ambientvolume * sqrt(0.5), 65536);
+                       chan->listener_volume[1] = (int)bound(0, chan->master_vol * ambient_level.value * mastervolume.value * snd_speakerlayout.listeners[1].ambientvolume * sqrt(0.5), 65536);
                        for (i = 2;i < SND_LISTENERS;i++)
                                chan->listener_volume[i] = 0;
                }
                else
                {
                        for (i = 0;i < SND_LISTENERS;i++)
-                               chan->listener_volume[i] = (int)bound(0, chan->master_vol * ambient_level.value * snd_speakerlayout.listeners[i].ambientvolume, 65536);
+                               chan->listener_volume[i] = (int)bound(0, chan->master_vol * ambient_level.value * mastervolume.value * snd_speakerlayout.listeners[i].ambientvolume, 65536);
                }
        }
 }