From: havoc Date: Mon, 26 Sep 2011 16:00:20 +0000 (+0000) Subject: fix two warnings (both were bad but unlikely to cause issues) X-Git-Tag: xonotic-v0.6.0~163^2~182 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=119cbafe56ebbac24781cd5526d200e443327267;p=xonotic%2Fdarkplaces.git fix two warnings (both were bad but unlikely to cause issues) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11370 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/snd_mix.c b/snd_mix.c index e976bca7..67898912 100644 --- a/snd_mix.c +++ b/snd_mix.c @@ -246,6 +246,7 @@ void S_MixToBuffer(void *stream, unsigned int bufferframes) vol[i] = ch->volume[i]; // check total volume level, because we can skip some code on silent sounds but other code must still run (position updates mainly) + sum = 0; for (i = 0;i < SND_LISTENERS;i++) sum += vol[i]*vol[i]; silent = sum < 0.001f; @@ -262,6 +263,7 @@ void S_MixToBuffer(void *stream, unsigned int bufferframes) // do the actual paint now (may skip work if silent) paint = paintbuffer; wantframes = totalmixframes; + istartframe = 0; for (wantframes = totalmixframes;wantframes > 0;posd += count * speedd, wantframes -= count) { // check if this is a delayed sound