From 2bb93967e149417496d995069e65a88cf4e3c8cd Mon Sep 17 00:00:00 2001 From: terminx Date: Wed, 24 Jul 2019 01:37:32 +0000 Subject: [PATCH] Fix an issue where looping sound effects would play at full volume for a tic after playback began, regardless of distance to the sound git-svn-id: https://svn.eduke32.com/eduke32@7821 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/duke3d/src/sounds.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/source/duke3d/src/sounds.cpp b/source/duke3d/src/sounds.cpp index 540486935..b6df0e085 100644 --- a/source/duke3d/src/sounds.cpp +++ b/source/duke3d/src/sounds.cpp @@ -724,12 +724,7 @@ int S_PlaySound3D(int num, int spriteNum, const vec3_t *pos) return -1; } - // XXX: why is 'right' 0? - // Ambient MUSICANDSFX always start playing using the 3D routines! - int const ambsfxp = S_IsAmbientSFX(spriteNum); - int const voice = (repeatp && !ambsfxp) ? FX_Play(snd.ptr, snd.siz, 0, -1, pitch, sndist >> 6, sndist >> 6, 0, snd.pr, - snd.volume, (sndNum * MAXSOUNDINSTANCES) + sndSlot) - : FX_Play3D(snd.ptr, snd.siz, repeatp ? FX_LOOP : FX_ONESHOT, pitch, sndang >> 4, sndist >> 6, + int const voice = FX_Play3D(snd.ptr, snd.siz, repeatp ? FX_LOOP : FX_ONESHOT, pitch, sndang >> 4, sndist >> 6, snd.pr, snd.volume, (sndNum * MAXSOUNDINSTANCES) + sndSlot); if (voice <= FX_Ok)