]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - snd_mix.c
crypto: some simplifications; also apply policies properly to NQ legacy accept messages
[xonotic/darkplaces.git] / snd_mix.c
index fa0069aaafce4f1f755401dc0554ddbc9c335351..4f3310bfcf1a83b3ef3eaad472b70fa7e850ceae 100644 (file)
--- a/snd_mix.c
+++ b/snd_mix.c
@@ -28,7 +28,6 @@ static portable_sampleframe_t paintbuffer_unswapped[PAINTBUFFER_SIZE];
 
 extern speakerlayout_t snd_speakerlayout; // for querying the listeners
 
-extern void SCR_CaptureVideo_SoundFrame(const portable_sampleframe_t *paintbuffer, size_t length);
 static void S_CaptureAVISound(const portable_sampleframe_t *paintbuffer, size_t length)
 {
        size_t i;
@@ -56,6 +55,8 @@ static void S_SoftClipPaintBuffer(portable_sampleframe_t *painted_ptr, int nbfra
 
        if((snd_softclip.integer == 1 && width <= 2) || snd_softclip.integer > 1)
        {
+               portable_sampleframe_t *p = painted_ptr;
+
 #if 0
 /* Soft clipping, the sound of a dream, thanks to Jon Wattes
    post to Musicdsp.org */
@@ -67,7 +68,6 @@ static void S_SoftClipPaintBuffer(portable_sampleframe_t *painted_ptr, int nbfra
                maxvol = max(1.0f, maxvol * (1.0f - nbframes / (0.4f * snd_renderbuffer->format.speed)));
 #define SOFTCLIP(x) if(fabs(x)>maxvol) maxvol=fabs(x); (x) /= maxvol;
 
-               portable_sampleframe_t *p = painted_ptr;
                if (channels == 8)  // 7.1 surround
                {
                        for (i = 0;i < nbframes;i++, p++)