]> 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)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 10 Apr 2011 16:00:21 +0000 (16:00 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11046 d7cf8633-e32d-0410-b094-e92efae38249

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)