summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2014-09-01 11:13:47 +0100
committerTim Angus <tim@ngus.net>2015-03-17 11:38:07 +0000
commita6dd4b35538c9d02e0edd9e076c52ba862f58110 (patch)
tree846eb6fa343695dd8d89df973329bec776f519e7
parent6e00ca44037e0cfd5deb07079f3f0208f22cc9fb (diff)
Fix client warnings
-rw-r--r--src/client/snd_mix.c4
-rw-r--r--src/client/snd_wavelet.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/src/client/snd_mix.c b/src/client/snd_mix.c
index faa0044c..56ef7185 100644
--- a/src/client/snd_mix.c
+++ b/src/client/snd_mix.c
@@ -423,6 +423,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/src/client/snd_wavelet.c b/src/client/snd_wavelet.c
index 51624614..5846f808 100644
--- a/src/client/snd_wavelet.c
+++ b/src/client/snd_wavelet.c
@@ -120,7 +120,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;
@@ -170,7 +170,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;