]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - snd_main.c
Fix an overrun in altstr_prepare.
[xonotic/darkplaces.git] / snd_main.c
index 6bda6fd0d519eeaa47374c2b853ac1141cd4064f..251084a06fb38a2281c4d09e9a70914d5fb384f2 100644 (file)
@@ -25,7 +25,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #include "snd_ogg.h"
 #include "csprogs.h"
 #include "cl_collision.h"
+#ifdef CONFIG_CD
 #include "cdaudio.h"
+#endif
 
 
 #define SND_MIN_SPEED 8000
@@ -325,7 +327,7 @@ static void S_SoundList_f (void)
                {
                        unsigned int size;
 
-                       size = sfx->memsize;
+                       size = (unsigned int)sfx->memsize;
                        Con_Printf ("%c%c%c(%5iHz %2db %6s) %8i : %s\n",
                                                (sfx->loopstart < sfx->total_length) ? 'L' : ' ',
                                                (sfx->flags & SFXFLAG_STREAMED) ? 'S' : ' ',
@@ -1818,8 +1820,10 @@ void S_StopAllSounds (void)
        if (snd_renderbuffer == NULL)
                return;
 
+#ifdef CONFIG_CD
        // stop CD audio because it may be using a faketrack
        CDAudio_Stop();
+#endif
 
        if (simsound || SndSys_LockRenderBuffer ())
        {