mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2024-12-23 00:29:47 +00:00
Whoops: correct or/and muddle in the volume envelope.
Signed-off-by: Adrian.Conlon <adrian.conlon@gmail.com>
This commit is contained in:
parent
210286514e
commit
053d649124
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user