From 4ef021e975293f7530c1f2115408aebca0a721e2 Mon Sep 17 00:00:00 2001 From: Pierre Bourdon Date: Sun, 20 Jan 2013 17:36:57 +0100 Subject: [PATCH] Better global volume adjustment on a voice. Fixes one of the 2 issues with the HOME button menu sound. --- Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX_Voice.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX_Voice.h b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX_Voice.h index f41c4c47ff..f731fc5360 100644 --- a/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX_Voice.h +++ b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX_Voice.h @@ -364,8 +364,7 @@ void ProcessVoice(PB_TYPE& pb, const AXBuffers& buffers, AXMixControl mctrl) // Apply a global volume ramp using the volume envelope parameters. for (u32 i = 0; i < SAMPLES_PER_FRAME; ++i) { - s64 sample = 2 * (s16)samples[i] * (s16)pb.vol_env.cur_volume; - samples[i] = (s16)(sample >> 16); + samples[i] = ((s32)samples[i] * pb.vol_env.cur_volume) >> 15; pb.vol_env.cur_volume += pb.vol_env.cur_volume_delta; }