From 492b0e0df23dd663c9c1ff844377f717eb23c894 Mon Sep 17 00:00:00 2001 From: angelosa Date: Mon, 11 Apr 2022 18:46:01 +0200 Subject: huc6272.cpp: don't return -1 when running out of nybbles in adpcm_update fn, fixes extremely overdriven PC-FX aliasing huc6230.cpp: code review some dubious paths; --- src/devices/sound/huc6230.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/devices/sound/huc6230.cpp') diff --git a/src/devices/sound/huc6230.cpp b/src/devices/sound/huc6230.cpp index 50a28a37cbb..ed297c36cf8 100644 --- a/src/devices/sound/huc6230.cpp +++ b/src/devices/sound/huc6230.cpp @@ -23,6 +23,10 @@ void huc6230_device::sound_stream_update(sound_stream &stream, std::vectorm_playing) continue; - samp0 = std::clamp(samp0 + ((channel->m_output * channel->m_lvol) >> 3), -32768, 32767); - samp1 = std::clamp(samp1 + ((channel->m_output * channel->m_rvol) >> 3), -32768, 32767); + // TODO: wrong volume scales + samp0 = std::clamp(samp0 + ((channel->m_output * channel->m_lvol) >> 4), -32768, 32767); + samp1 = std::clamp(samp1 + ((channel->m_output * channel->m_rvol) >> 4), -32768, 32767); } outputs[0].put_int(i, samp0, 32768); @@ -124,6 +129,8 @@ TIMER_CALLBACK_MEMBER(huc6230_device::adpcm_timer) } int32_t new_output; + // TODO: BIOS doesn't use interpolation + // which actually is linear interpolation off/on ... if (!channel->m_interpolate) new_output = channel->m_curr_sample; else -- cgit v1.2.3