From cf8f2d689abe3555a3ed6a148808c9f67fe33c54 Mon Sep 17 00:00:00 2001 From: Rupert Carmichael <5050061-carmiker@users.noreply.gitlab.com> Date: Sun, 10 May 2020 15:14:34 +0000 Subject: [PATCH] Fix scratchy audio in SMB3 and others --- source/core/NstApu.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/core/NstApu.cpp b/source/core/NstApu.cpp index a5e1876..19e4388 100644 --- a/source/core/NstApu.cpp +++ b/source/core/NstApu.cpp @@ -1870,7 +1870,8 @@ namespace Nes amp = (sum * outputVolume + rate/2) / rate * 3; } } - else if (amp < Channel::OUTPUT_DECAY) + // Disabling these blocks fixes scratchy audio in many games + /*else if (amp < Channel::OUTPUT_DECAY) { return 0; } @@ -1878,7 +1879,7 @@ namespace Nes { amp -= Channel::OUTPUT_DECAY; step &= STEP_CHECK; - } + }*/ return amp; }