From 7a82ae09433ec2d2b2800a60f4461f0f187ca8ad Mon Sep 17 00:00:00 2001 From: hrydgard Date: Tue, 14 Jul 2009 22:39:34 +0000 Subject: [PATCH] cleanup, minor probably unnoticable fix git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3793 8ced0084-cf51-0410-be5f-012b33b47a6e --- .../Plugin_DSP_HLE/Src/UCodes/UCode_Zelda_Voice.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Zelda_Voice.cpp b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Zelda_Voice.cpp index e10bc50c42..5bf65ae595 100644 --- a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Zelda_Voice.cpp +++ b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Zelda_Voice.cpp @@ -115,8 +115,6 @@ void CUCode_Zelda::RenderVoice_PCM16(ZeldaVoicePB &PB, s16 *_Buffer, int _Size) { int _RealSize = SizeForResampling(PB, _Size, PB.RatioInt); int rem_samples = _RealSize; - // KeyOff doesn't seem to work the way it's done in PCM16, so let's try the way - // it really works in the ucode here... if (PB.KeyOff) goto clear_buffer; if (PB.NeedsReset) @@ -174,8 +172,6 @@ void CUCode_Zelda::RenderVoice_PCM8(ZeldaVoicePB &PB, s16 *_Buffer, int _Size) { int _RealSize = SizeForResampling(PB, _Size, PB.RatioInt); int rem_samples = _RealSize; - // KeyOff doesn't seem to work the way it's done in PCM16, so let's try the way - // it really works in the ucode here... if (PB.KeyOff) goto clear_buffer; if (PB.NeedsReset) @@ -252,7 +248,11 @@ void CUCode_Zelda::RenderVoice_AFC(ZeldaVoicePB &PB, s16 *_Buffer, int _Size) } if (PB.KeyOff != 0) // 0747 early out... i dunno if this can happen because we filter it above + { + for (int i = 0; i < _RealSize; i++) + *_Buffer++ = 0; return; + } // Round upwards how many samples we need to copy, 0759 // u32 frac = NumberOfSamples & 0xF;