]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - snd_wav.c
fixed signed/unsigned mismatch warnings
[xonotic/darkplaces.git] / snd_wav.c
index ff4bb4069f3c56845ef279e8cdf3358a8433006b..439ec73cbaf4cab9dd281e75976cdb516785c966 100644 (file)
--- a/snd_wav.c
+++ b/snd_wav.c
@@ -204,7 +204,10 @@ static wavinfo_t GetWavinfo (char *name, qbyte *wav, int wavlength)
        if (info.samples)
        {
                if (samples < info.samples)
-                       Host_Error ("Sound %s has a bad loop length", name);
+               {
+                       Con_Printf ("Sound %s has a bad loop length", name);
+                       info.samples = samples;
+               }
        }
        else
                info.samples = samples;
@@ -261,7 +264,7 @@ qboolean S_LoadWavFile (const char *filename, sfx_t *s)
 
        Con_DPrintf ("Loading WAV file \"%s\"\n", filename);
 
-       info = GetWavinfo (s->name, data, fs_filesize);
+       info = GetWavinfo (s->name, data, (int)fs_filesize);
        // Stereo sounds are allowed (intended for music)
        if (info.channels < 1 || info.channels > 2)
        {
@@ -310,7 +313,7 @@ qboolean S_LoadWavFile (const char *filename, sfx_t *s)
        }
 #endif
 
-       sb->length = ResampleSfx (data + info.dataofs, info.samples, &s->format, sb->data, s->name);
+       sb->length = (int)ResampleSfx (data + info.dataofs, info.samples, &s->format, sb->data, s->name);
        s->format.speed = shm->format.speed;
        s->total_length = sb->length;
        sb->offset = 0;