]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
Fixed the WAV file loading code (loopstart was always 0 if the sound was looped)
authormolivier <molivier@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 23 Mar 2004 15:59:10 +0000 (15:59 +0000)
committermolivier <molivier@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 23 Mar 2004 15:59:10 +0000 (15:59 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4053 d7cf8633-e32d-0410-b094-e92efae38249

snd_mem.c

index d924d66e1e517fd4be374902563d8704eb5afeb5..5e1ea8f94c0a9bcad721fe72f4132d53883f808e 100644 (file)
--- a/snd_mem.c
+++ b/snd_mem.c
@@ -283,7 +283,7 @@ qboolean S_LoadWavFile (const char *filename, sfx_t *s)
        if (info.loopstart < 0)
                s->loopstart = -1;
        else
-               s->loopstart = (double) s->loopstart * (double) shm->format.speed / (double) s->format.speed;
+               s->loopstart = (double)info.loopstart * (double)shm->format.speed / (double)s->format.speed;
 
 #if BYTE_ORDER != LITTLE_ENDIAN
        // We must convert the WAV data from little endian