]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fix bug in wav loader that messed up loopstart, now looping sounds in
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 27 Feb 2008 11:35:48 +0000 (11:35 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 27 Feb 2008 11:35:48 +0000 (11:35 +0000)
quake work properly

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8141 d7cf8633-e32d-0410-b094-e92efae38249

snd_wav.c

index 01c7993f3d8a7f7d5b8124eb0c1bc768b457bc8e..d643ae19e58861eae741402d62a6eaf497798e85 100644 (file)
--- a/snd_wav.c
+++ b/snd_wav.c
@@ -330,7 +330,7 @@ qboolean S_LoadWavFile (const char *filename, sfx_t *sfx)
        if (info.loopstart < 0)
                sfx->loopstart = sfx->total_length;
        else
-               sfx->loopstart = (double)info.loopstart * (double)snd_renderbuffer->format.speed / (double)sb->format.speed;
+               sfx->loopstart = (double)info.loopstart * (double)sb->format.speed / (double)info.rate;
        sfx->loopstart = min(sfx->loopstart, sfx->total_length);
        sfx->flags &= ~SFXFLAG_STREAMED;