diff --git a/core/sound/ym3438.c b/core/sound/ym3438.c index 2190ee3..420d99b 100644 --- a/core/sound/ym3438.c +++ b/core/sound/ym3438.c @@ -39,7 +39,7 @@ * OPLx decapsulated(Matthew Gambrell, Olli Niemitalo): * OPL2 ROMs. * - * version: 1.0.3 + * version: 1.0.4 */ #include @@ -651,7 +651,7 @@ void OPN2_EnvelopeADSR(ym3438_t *chip) { nextlevel = 0; } - else if (chip->eg_state[slot] == eg_num_attack && level != 0 && chip->eg_inc) + else if (chip->eg_state[slot] == eg_num_attack && level != 0 && chip->eg_inc && nkon) { inc = (~level << chip->eg_inc) >> 5; } @@ -665,7 +665,7 @@ void OPN2_EnvelopeADSR(ym3438_t *chip) { nextstate = eg_num_decay; } - else if(chip->eg_inc && !chip->eg_ratemax) + else if(chip->eg_inc && !chip->eg_ratemax && nkon) { inc = (~level << chip->eg_inc) >> 5; } diff --git a/core/sound/ym3438.h b/core/sound/ym3438.h index cc54e0a..6678782 100644 --- a/core/sound/ym3438.h +++ b/core/sound/ym3438.h @@ -39,7 +39,7 @@ * OPLx decapsulated(Matthew Gambrell, Olli Niemitalo): * OPL2 ROMs. * - * version: 1.0.3 + * version: 1.0.4 */ #ifndef YM3438_H