aboutsummaryrefslogtreecommitdiff
path: root/fmdriver/fmdriver_pmd.c
diff options
context:
space:
mode:
authorTakamichi Horikawa <takamichiho@gmail.com>2017-08-20 00:35:21 +0900
committerTakamichi Horikawa <takamichiho@gmail.com>2017-08-20 00:35:21 +0900
commitc4cac5a7bcef3630505a01296e2f04ec6d0e93a3 (patch)
tree2c8f2621767d272da9d972d5ce0f4df7a6d8f5c8 /fmdriver/fmdriver_pmd.c
parentd38e40158eca32668d86a9a77419733c9cd0737e (diff)
PMD: fixed SSG volume LFO overflow
Diffstat (limited to 'fmdriver/fmdriver_pmd.c')
-rw-r--r--fmdriver/fmdriver_pmd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fmdriver/fmdriver_pmd.c b/fmdriver/fmdriver_pmd.c
index bd1c424..a7ba18d 100644
--- a/fmdriver/fmdriver_pmd.c
+++ b/fmdriver/fmdriver_pmd.c
@@ -560,6 +560,7 @@ static void pmd_lfo_tick_waveform(
}
break;
case LFO_WF_ONESHOT:
+ // 2f18
if (part->lfo.times) {
if (part->lfo.times != 0xff) {
part->lfo.times--;
@@ -1604,8 +1605,8 @@ static void pmd_ssg_vol_out(
if (part->lfof.vol || part->lfof_b.vol) {
int32_t lfovol = 0;
// TODO:
- if (part->lfof.vol) vol += part->lfo_diff;
- if (part->lfof_b.vol) vol += part->lfo_diff_b;
+ if (part->lfof.vol) lfovol += part->lfo_diff;
+ if (part->lfof_b.vol) lfovol += part->lfo_diff_b;
lfovol += vol;
vol = lfovol;
if (lfovol < 0) {