From 95fcb3123b17f3699575d10b0b4451191fcdde61 Mon Sep 17 00:00:00 2001 From: Olivier Galibert Date: Sun, 1 Oct 2023 21:46:27 +0200 Subject: swp00: small fixes to the lpf, may need more bits in the calculation though --- src/devices/sound/swp00.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/devices/sound/swp00.cpp b/src/devices/sound/swp00.cpp index aa17e1d4410..c891e754508 100644 --- a/src/devices/sound/swp00.cpp +++ b/src/devices/sound/swp00.cpp @@ -992,9 +992,9 @@ void swp00_device::sound_stream_update(sound_stream &stream, std::vector> 15; - s32 lpf_value = m_lpf_value[chan] + ((lfo_fa_phase * m_lfo_pmod_depth[chan]) << (m_lfo_step[chan] & 0x40 ? 2 : 1)); + s32 lpf_value = m_lpf_value[chan] + ((lfo_fa_phase * (m_lfo_famod_depth[chan] >> 5)) << (m_lfo_step[chan] & 0x40 ? 2 : 1)); - m_lpf_ha[chan] += lpffpapply(lpf_value, sample - fpapply(m_lpf_feedback[chan], m_lpf_ha[chan]) - m_lpf_hb[chan]); + m_lpf_ha[chan] += lpffpapply(lpf_value, sample - 2*fpapply(m_lpf_feedback[chan], m_lpf_ha[chan]) - m_lpf_hb[chan]); m_lpf_hb[chan] += lpffpapply(lpf_value, m_lpf_ha[chan]); sample = m_lpf_hb[chan]; -- cgit v1.2.3