diff options
Diffstat (limited to 'fmdriver')
-rw-r--r-- | fmdriver/fmdriver_pmd.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/fmdriver/fmdriver_pmd.c b/fmdriver/fmdriver_pmd.c index a3a50c3..f4eaab7 100644 --- a/fmdriver/fmdriver_pmd.c +++ b/fmdriver/fmdriver_pmd.c @@ -1650,13 +1650,14 @@ static void pmd_adpcm_vol_out( vol = 0; // -> 053f } else { - vol = (vol * (envvol+1)) >> 3; - if (vol & 1) { - vol >>= 1; - vol++; + int ivol = (vol * (envvol+1)) >> 3; + if (ivol & 1) { + ivol >>= 1; + ivol++; } else { - vol >>= 1; + ivol >>= 1; } + vol = ivol; } } else { // 04e8 @@ -1711,13 +1712,14 @@ static void pmd_ppz8_vol_out( vol = 0; // -> 0bd4 } else { - vol = (vol * (envvol+1)) >> 3; - if (vol & 1) { - vol >>= 1; - vol++; + int ivol = (vol * (envvol+1)) >> 3; + if (ivol & 1) { + ivol >>= 1; + ivol++; } else { - vol >>= 1; + ivol >>= 1; } + vol = ivol; } } else { // 0b7d |