From 4f3c95c5895e84a98d6fb0804e989c4c1d18d14e Mon Sep 17 00:00:00 2001 From: Tim Angus Date: Mon, 1 Sep 2014 11:13:47 +0100 Subject: [PATCH] Fix client warnings --- code/client/snd_mix.c | 4 ++++ code/client/snd_wavelet.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/code/client/snd_mix.c b/code/client/snd_mix.c index f4fa01a4..1efe1e3d 100644 --- a/code/client/snd_mix.c +++ b/code/client/snd_mix.c @@ -422,6 +422,10 @@ static void S_PaintChannelFrom16_scalar( channel_t *ch, const sfx_t *sc, int cou short *samples; float ooff, fdata[2], fdiv, fleftvol, frightvol; + if (sc->soundChannels <= 0) { + return; + } + samp = &paintbuffer[ bufferOffset ]; if (ch->doppler) { diff --git a/code/client/snd_wavelet.c b/code/client/snd_wavelet.c index a325ffdc..3d8f5c7b 100644 --- a/code/client/snd_wavelet.c +++ b/code/client/snd_wavelet.c @@ -119,7 +119,7 @@ void NXPutc(NXStream *stream, char out) { void encodeWavelet( sfx_t *sfx, short *packets) { - float wksp[4097], temp; + float wksp[4097] = {0}, temp; int i, samples, size; sndBuffer *newchunk, *chunk; byte *out; @@ -169,7 +169,7 @@ void encodeWavelet( sfx_t *sfx, short *packets) { } void decodeWavelet(sndBuffer *chunk, short *to) { - float wksp[4097]; + float wksp[4097] = {0}; int i; byte *out;