From 053d649124ff2a4e8b51f299192a097663b497de Mon Sep 17 00:00:00 2001 From: "Adrian.Conlon" Date: Sat, 23 Sep 2017 11:19:01 +0100 Subject: [PATCH] Whoops: correct or/and muddle in the volume envelope. Signed-off-by: Adrian.Conlon --- LR35902/src/Audio.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LR35902/src/Audio.cpp b/LR35902/src/Audio.cpp index 8863726..582b3da 100644 --- a/LR35902/src/Audio.cpp +++ b/LR35902/src/Audio.cpp @@ -45,7 +45,7 @@ void EightBit::GameBoy::Envelope::step() { if (m_period != 0) { if (--m_position == 0) { auto volume = m_volume + (m_direction == Amplify ? +1 : -1); - if (volume >= 0 || volume <= 15) + if (volume >= 0 && volume <= 15) m_volume = volume; m_position = m_period; }