]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - snd_mix.c
no longer recalculated q3bsp surface normals, this makes q3map2 'phong shading' featu...
[xonotic/darkplaces.git] / snd_mix.c
index 7aef154ee0db5173bccda01ebca71192eb7da54e..03ba042a6a71a027edabf171fa6031aba7bff7e9 100644 (file)
--- a/snd_mix.c
+++ b/snd_mix.c
@@ -32,14 +32,13 @@ typedef struct portable_samplepair_s
 portable_sampleframe_t paintbuffer[PAINTBUFFER_SIZE];
 
 // FIXME: this desyncs with the video too easily
-extern qboolean cl_capturevideo_active;
 extern void SCR_CaptureVideo_SoundFrame(unsigned char *bufstereo16le, size_t length, int rate);
 void S_CaptureAVISound(portable_sampleframe_t *buf, size_t length)
 {
        int n;
        size_t i;
        unsigned char out[PAINTBUFFER_SIZE * 4];
-       if (!cl_capturevideo_active)
+       if (!cls.capturevideo_active)
                return;
        // write the sound buffer as little endian 16bit interleaved stereo
        for(i = 0;i < length;i++)
@@ -349,8 +348,6 @@ void S_PaintChannels(int endtime)
                        sfx = ch->sfx;
                        if (!sfx)
                                continue;
-                       if (sfx->fetcher)
-                               j++;
                        for (j = 0;j < SND_LISTENERS;j++)
                                if (ch->listener_volume[j])
                                        break;
@@ -460,7 +457,7 @@ qboolean SND_PaintChannel (channel_t *ch, int count)
        if (ch->flags & CHANNELFLAG_FULLVOLUME)
                snd_vol = 256;
        else
-               snd_vol = volume.value * 256;
+               snd_vol = (int)(volume.value * 256);
 
        for (i = 0;i < SND_LISTENERS;i++)
                vol[i] = ch->listener_volume[i] * snd_vol;