]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - snd_mix.c
move sv.active = true; up to fix a VM_bprint warning
[xonotic/darkplaces.git] / snd_mix.c
index 319eebeb5ef4c70e2dc2ffea7b6ad12fa7a2eafc..76614bfad0ab89b9d85db27b11418b366cded533 100644 (file)
--- a/snd_mix.c
+++ b/snd_mix.c
@@ -45,11 +45,11 @@ void S_CaptureAVISound(portable_samplepair_t *buf, size_t length)
        // write the sound buffer as little endian 16bit interleaved stereo
        for(i = 0;i < length;i++)
        {
-               n = buf[i].left >> 2; // quiet enough to prevent clipping most of the time
+               n = buf[i].left;
                n = bound(-32768, n, 32767);
                out[i*4+0] = n & 0xFF;
                out[i*4+1] = (n >> 8) & 0xFF;
-               n = buf[i].right >> 2; // quiet enough to prevent clipping most of the time
+               n = buf[i].right;
                n = bound(-32768, n, 32767);
                out[i*4+2] = n & 0xFF;
                out[i*4+3] = (n >> 8) & 0xFF;
@@ -238,9 +238,7 @@ void S_PaintChannels(int endtime)
                        // if the channel is paused
                        if (ch->flags & CHANNELFLAG_PAUSED)
                        {
-                               size_t pausedtime;
-
-                               pausedtime = end - paintedtime;
+                               int pausedtime = end - paintedtime;
                                ch->lastptime += pausedtime;
                                ch->end += pausedtime;
                                continue;
@@ -279,7 +277,7 @@ void S_PaintChannels(int endtime)
 
                                // paint up to end
                                if (ch->end < end)
-                                       count = ch->end - ltime;
+                                       count = (int)ch->end - ltime;
                                else
                                        count = end - ltime;