mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2024-11-13 06:15:07 +01:00
[Core/Sound] fixed edge case in MAME YM2413 core when Key-Off occurs with envelope already off
This commit is contained in:
parent
17cbc63a10
commit
4a899e8262
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 3.8 MiB After Width: | Height: | Size: 3.8 MiB |
Binary file not shown.
Before Width: | Height: | Size: 4.0 MiB After Width: | Height: | Size: 4.0 MiB |
@ -1208,9 +1208,8 @@ INLINE void KEY_OFF(YM2413_OPLL_SLOT *SLOT, UINT32 key_clr)
|
||||
|
||||
if( !SLOT->key )
|
||||
{
|
||||
/* phase -> Release */
|
||||
if (SLOT->state>EG_REL)
|
||||
SLOT->state = EG_REL;
|
||||
/* phase -> Release (forced off if already at maximal attenuation level) */
|
||||
SLOT->state = ( (SLOT->volume & ~3) == (MAX_ATT_INDEX & ~3) ) ? EG_OFF : EG_REL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user