]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - snd_main.c
don't hexdump png images while reading them (why did it do this??)
[xonotic/darkplaces.git] / snd_main.c
index 76c08a4ba61e9de2d0e962af375f899eb7bd6a90..ae11f0ca69e2a041ff66de6b67de3db929b50e01 100644 (file)
@@ -852,13 +852,13 @@ void S_UpdateAmbientSounds (void)
                // FIXME: this rounds off to an int each frame, meaning there is little to no fade at extremely high framerates!
                if (chan->master_vol < vol)
                {
-                       chan->master_vol += (int)(host_realframetime * ambient_fade.value);
+                       chan->master_vol += (int)(cl.realframetime * ambient_fade.value);
                        if (chan->master_vol > vol)
                                chan->master_vol = vol;
                }
                else if (chan->master_vol > vol)
                {
-                       chan->master_vol -= (int)(host_realframetime * ambient_fade.value);
+                       chan->master_vol -= (int)(cl.realframetime * ambient_fade.value);
                        if (chan->master_vol < vol)
                                chan->master_vol = vol;
                }
@@ -1111,7 +1111,7 @@ void S_Update_(void)
                paintedtime = soundtime;
 
        // mix ahead of current position
-       endtime = (int)(soundtime + _snd_mixahead.value * shm->format.speed);
+       endtime = soundtime + (unsigned int)(_snd_mixahead.value * shm->format.speed);
        endtime = min(endtime, (unsigned int)(soundtime + shm->sampleframes));
 
        S_PaintChannels (endtime);