]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - snd_wav.c
added description string to all cvars and commands
[xonotic/darkplaces.git] / snd_wav.c
index 4be917dbed6858bd66a3b12018c92f7c2de52957..b6cfe26cc83d683cf42ac55b20294c00bf76bacd 100644 (file)
--- a/snd_wav.c
+++ b/snd_wav.c
@@ -205,7 +205,7 @@ static wavinfo_t GetWavinfo (char *name, unsigned char *wav, int wavlength)
        {
                if (samples < info.samples)
                {
-                       Con_Printf ("Sound %s has a bad loop length", name);
+                       Con_Printf ("Sound %s has a bad loop length\n", name);
                        info.samples = samples;
                }
        }
@@ -255,6 +255,7 @@ S_LoadWavFile
 */
 qboolean S_LoadWavFile (const char *filename, sfx_t *s)
 {
+       fs_offset_t filesize;
        unsigned char *data;
        wavinfo_t info;
        int len;
@@ -266,7 +267,7 @@ qboolean S_LoadWavFile (const char *filename, sfx_t *s)
                return true;
 
        // Load the file
-       data = FS_LoadFile(filename, snd_mempool, false);
+       data = FS_LoadFile(filename, snd_mempool, false, &filesize);
        if (!data)
                return false;
 
@@ -279,7 +280,7 @@ qboolean S_LoadWavFile (const char *filename, sfx_t *s)
 
        Con_DPrintf ("Loading WAV file \"%s\"\n", filename);
 
-       info = GetWavinfo (s->name, data, (int)fs_filesize);
+       info = GetWavinfo (s->name, data, (int)filesize);
        // Stereo sounds are allowed (intended for music)
        if (info.channels < 1 || info.channels > 2)
        {