]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - snd_mix.c
gcc 4.0 signedness warning fixes and uninitialized vector fixes
[xonotic/darkplaces.git] / snd_mix.c
index 76614bfad0ab89b9d85db27b11418b366cded533..80363c80274f1a9d9bc727569c9aaa73641afa11 100644 (file)
--- a/snd_mix.c
+++ b/snd_mix.c
@@ -355,7 +355,7 @@ qboolean SND_PaintChannelFrom8 (channel_t *ch, int count)
        // Stereo sound support
        if (ch->sfx->format.channels == 2)
        {
-               sfx = sb->data + (ch->pos - sb->offset) * 2;
+               sfx = (signed char *)sb->data + (ch->pos - sb->offset) * 2;
                for (i = 0;i < count;i++)
                {
                        paintbuffer[i].left += (*sfx++ * leftvol) >> 8;
@@ -364,13 +364,12 @@ qboolean SND_PaintChannelFrom8 (channel_t *ch, int count)
        }
        else
        {
-               sfx = sb->data + ch->pos - sb->offset;
+               sfx = (signed char *)sb->data + ch->pos - sb->offset;
                for (i = 0;i < count;i++)
                {
                        paintbuffer[i].left += (*sfx * leftvol) >> 8;
                        paintbuffer[i].right += (*sfx++ * rightvol) >> 8;
                }
-
        }
        ch->pos += count;
        return true;