]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - snd_mix.c
renamed r_shadow_shadows to r_shadow_dlightshadows and added r_shadow_worldshadows...
[xonotic/darkplaces.git] / snd_mix.c
index e9325085348f6a4582af37d1224ceb3a28792ab2..3f9f01b60b4fd2ae0d3bb1e918ff9552224c2633 100644 (file)
--- a/snd_mix.c
+++ b/snd_mix.c
@@ -21,10 +21,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 #include "quakedef.h"
 
-#ifdef _WIN32
-#include "winquake.h"
-#endif
-
 // LordHavoc: was 512, expanded to 2048
 #define        PAINTBUFFER_SIZE 2048
 portable_samplepair_t paintbuffer[PAINTBUFFER_SIZE];
@@ -44,8 +40,7 @@ void S_CaptureAVISound(portable_samplepair_t *buf, int length)
        {
                if (cl_avidemo_soundfile == NULL)
                {
-                       sprintf (filename, "%s/dpavi.wav", com_gamedir);
-                       cl_avidemo_soundfile = fopen(filename, "wb");
+                       cl_avidemo_soundfile = FS_Open ("dpavi.wav", "wb", false);
                        memset(out, 0, 44);
                        fwrite(out, 1, 44, cl_avidemo_soundfile);
                        // header will be filled out when file is closed
@@ -318,9 +313,9 @@ void S_PaintChannels(int endtime)
                                // if at end of loop, restart
                                if (ltime >= ch->end)
                                {
-                                       if (sc->loopstart >= 0)
+                                       if (sc->loopstart >= 0 || ch->forceloop)
                                        {
-                                               ch->pos = sc->loopstart;
+                                               ch->pos = bound(0, sc->loopstart, sc->length - 1);
                                                ch->end = ltime + sc->length - ch->pos;
                                        }
                                        else