From c4cac5a7bcef3630505a01296e2f04ec6d0e93a3 Mon Sep 17 00:00:00 2001 From: Takamichi Horikawa Date: Sun, 20 Aug 2017 00:35:21 +0900 Subject: PMD: fixed SSG volume LFO overflow --- fmdriver/fmdriver_pmd.c | 5 +++-- 1 file 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) { -- cgit v1.2.3