From 1dd2d0424fda2dd172b948a2985d0a14e0ddbbf7 Mon Sep 17 00:00:00 2001 From: havoc Date: Wed, 27 Feb 2008 11:35:48 +0000 Subject: [PATCH] fix bug in wav loader that messed up loopstart, now looping sounds in quake work properly git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8141 d7cf8633-e32d-0410-b094-e92efae38249 --- snd_wav.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snd_wav.c b/snd_wav.c index 01c7993f..d643ae19 100644 --- 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; -- 2.39.2