From 57eb86d3c5d90014bfe9372edbeb1998b0bef73d Mon Sep 17 00:00:00 2001 From: havoc Date: Sun, 10 Apr 2011 16:00:21 +0000 Subject: [PATCH] don't infinite loop if a sound has total_length 0 git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11046 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=381deb3d52c866c59a6925b4d64fa780415363f1 --- snd_mix.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/snd_mix.c b/snd_mix.c index 9094ce6c..05abc83a 100644 --- a/snd_mix.c +++ b/snd_mix.c @@ -503,6 +503,8 @@ void S_MixToBuffer(void *stream, unsigned int bufferframes) continue; if (ch->flags & CHANNELFLAG_PAUSED) continue; + if (!sfx->total_length) + continue; ltime = 0; if (ch->pos < 0) -- 2.39.2