diff options
| author | Pierre Bourdon <delroth@gmail.com> | 2013-01-20 17:36:57 +0100 |
|---|---|---|
| committer | Pierre Bourdon <delroth@gmail.com> | 2013-01-20 17:36:57 +0100 |
| commit | 4ef021e975293f7530c1f2115408aebca0a721e2 (patch) | |
| tree | 239ae62514c36ca1ef1b75b95486f1cc81e732ba /Source/Core | |
| parent | 7252becf24583e6bf34f89889944611ccf343bb4 (diff) | |
Better global volume adjustment on a voice. Fixes one of the 2 issues with the HOME button menu sound.
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX_Voice.h | 3 |
1 files changed, 1 insertions, 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; } |
