Merge branch 'ekeeke:master' into master

This commit is contained in:
ds22x 2022-02-10 16:14:42 +01:00 committed by GitHub
commit d0ba771160
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 2 additions and 7 deletions

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

View File

@ -634,13 +634,8 @@ void OPLL_EnvelopeGenerate(opll_t *chip) {
switch (state) { switch (state) {
case eg_num_attack: case eg_num_attack:
if (!chip->eg_maxrate && (chip->eg_kon & 2) && !zero) { if (!chip->eg_maxrate && (chip->eg_kon & 2) && !zero) {
int32_t shift = chip->eg_rate_hi - 11 + chip->eg_inc_hi; int32_t shift = (chip->eg_rate_hi < 12) ? chip->eg_inc_lo : (chip->eg_rate_hi - 11 + chip->eg_inc_hi);
if (chip->eg_inc_lo) {
shift = 1;
}
if (shift > 0) { if (shift > 0) {
if (shift > 4)
shift = 4;
step = ~level >> (5 - shift); step = ~level >> (5 - shift);
} }
} }

View File

@ -103,7 +103,7 @@ typedef struct
UINT8 eg_sh_dp; /* (dump state) */ UINT8 eg_sh_dp; /* (dump state) */
UINT8 eg_sel_dp; /* (dump state) */ UINT8 eg_sel_dp; /* (dump state) */
UINT8 eg_sh_ar; /* (attack state) */ UINT8 eg_sh_ar; /* (attack state) */
UINT8 eg_sel_ar; /* (attack state) */ UINT16 eg_sel_ar; /* (attack state) */
UINT8 eg_sh_dr; /* (decay state) */ UINT8 eg_sh_dr; /* (decay state) */
UINT8 eg_sel_dr; /* (decay state) */ UINT8 eg_sel_dr; /* (decay state) */
UINT8 eg_sh_rr; /* (release state for non-perc.) */ UINT8 eg_sh_rr; /* (release state for non-perc.) */