]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
don't infinite loop if a sound has total_length 0
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 10 Apr 2011 16:00:21 +0000 (16:00 +0000)
committerRudolf Polzer <divverent@alientrap.org>
Sun, 10 Apr 2011 19:06:12 +0000 (21:06 +0200)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11046 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=381deb3d52c866c59a6925b4d64fa780415363f1

snd_mix.c

index 9094ce6ccd5f959aa1cddfd7f86d2085f87c2d97..05abc83a5fc95dbdaf803d97bfa9dc698152ab74 100644 (file)
--- 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)