]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - snd_mix.c
fix broken demos with csqc code
[xonotic/darkplaces.git] / snd_mix.c
index ebf166544c8ba7c435d83c15e720c4b977eebc30..2fa5878efd647fa96a5f883f089a029e5ac4aeaa 100644 (file)
--- a/snd_mix.c
+++ b/snd_mix.c
@@ -487,7 +487,7 @@ void S_MixToBuffer(void *stream, unsigned int bufferframes)
                        if (ch->pos < 0)
                        {
                                count = -ch->pos;
-                               count = min(count, frames);
+                               count = min(count, frames - ltime);
                                ch->pos += count;
                                ltime += count;
                        }
@@ -513,7 +513,7 @@ void S_MixToBuffer(void *stream, unsigned int bufferframes)
                                                ch->pos = 0;
                                        else
                                        {
-                                               S_StopChannel (ch - channels);
+                                               S_StopChannel (ch - channels, false);
                                                break;
                                        }
                                }