]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - snd_mem.c
Enable multiprocessor compilation in the VS2012 projects, changed their build directo...
[xonotic/darkplaces.git] / snd_mem.c
index d294b248c7d74c128d52602c8737539dbd4a1093..f6e6fcb35d1f8d878ae40705e41a05173be86a52 100644 (file)
--- a/snd_mem.c
+++ b/snd_mem.c
@@ -24,7 +24,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #include "snd_main.h"
 #include "snd_ogg.h"
 #include "snd_wav.h"
-#include "snd_modplug.h"
 
 
 /*
@@ -82,7 +81,7 @@ snd_buffer_t *Snd_CreateSndBuffer (const unsigned char *samples, unsigned int sa
        size_t newsampleframes, memsize;
        snd_buffer_t* sb;
 
-       newsampleframes = (size_t) ((double)sampleframes * (double)sb_speed / (double)in_format->speed);
+       newsampleframes = (size_t) ceil((double)sampleframes * (double)sb_speed / (double)in_format->speed);
 
        memsize = newsampleframes * in_format->channels * in_format->width;
        memsize += sizeof (*sb) - sizeof (sb->samples);
@@ -344,11 +343,6 @@ qboolean S_LoadSound (sfx_t *sfx, qboolean complain)
                        if (OGG_LoadVorbisFile (namebuffer, sfx))
                                goto loaded;
                }
-               else
-               {
-                       if (ModPlug_LoadModPlugFile (namebuffer, sfx))
-                               goto loaded;
-               }
        }
 
        // LordHavoc: then try without the added sound/ as wav and ogg
@@ -368,11 +362,6 @@ qboolean S_LoadSound (sfx_t *sfx, qboolean complain)
                if (OGG_LoadVorbisFile (namebuffer, sfx))
                        goto loaded;
        }
-       else
-       {
-               if (ModPlug_LoadModPlugFile (namebuffer, sfx))
-                       goto loaded;
-       }
 
        // Can't load the sound!
        sfx->flags |= SFXFLAG_FILEMISSING;