From df9d7ef55a3938598014c6a1585bbce911088c78 Mon Sep 17 00:00:00 2001 From: superctr Date: Sun, 19 Aug 2018 10:02:46 +0200 Subject: [PATCH] taito_zm games: Better default Zoom/SPU balance zsg2.cpp: Clamp audio output to 16-bits --- src/devices/sound/zsg2.cpp | 2 +- src/mame/audio/taito_zm.cpp | 4 ++-- src/mame/drivers/taitogn.cpp | 4 ++-- src/mame/drivers/zn.cpp | 8 ++++---- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/devices/sound/zsg2.cpp b/src/devices/sound/zsg2.cpp index 5b81eb85c0e..962fc666bde 100644 --- a/src/devices/sound/zsg2.cpp +++ b/src/devices/sound/zsg2.cpp @@ -346,7 +346,7 @@ void zsg2_device::sound_stream_update(sound_stream &stream, stream_sample_t **in } for(int output=0; output<4; output++) - outputs[output][i] = mix[output]; + outputs[output][i] = std::min(std::max(mix[output], -32768), 32767); } m_sample_count++; diff --git a/src/mame/audio/taito_zm.cpp b/src/mame/audio/taito_zm.cpp index 8fc4b8c7660..bdb1da11987 100644 --- a/src/mame/audio/taito_zm.cpp +++ b/src/mame/audio/taito_zm.cpp @@ -206,8 +206,8 @@ MACHINE_CONFIG_START(taito_zoom_device::device_add_mconfig) m_tms57002->empty_callback().set_inputline(m_soundcpu, MN10200_IRQ1).invert(); m_tms57002->set_addrmap(AS_DATA, &taito_zoom_device::tms57002_map); - m_tms57002->add_route(2, *this, 0.5, AUTO_ALLOC_INPUT, 0); - m_tms57002->add_route(3, *this, 0.5, AUTO_ALLOC_INPUT, 1); + m_tms57002->add_route(2, *this, 1.0, AUTO_ALLOC_INPUT, 0); + m_tms57002->add_route(3, *this, 1.0, AUTO_ALLOC_INPUT, 1); #else // Unsupported opcode issue m_tms57002->set_disable(); #endif diff --git a/src/mame/drivers/taitogn.cpp b/src/mame/drivers/taitogn.cpp index 414dd856f6b..180b6c507fb 100644 --- a/src/mame/drivers/taitogn.cpp +++ b/src/mame/drivers/taitogn.cpp @@ -741,8 +741,8 @@ MACHINE_CONFIG_START(taitogn_state::coh3002t) SPEAKER(config, "rspeaker").front_right(); MCFG_SPU_ADD("spu", XTAL(67'737'600)/2) - MCFG_SOUND_ROUTE(0, "lspeaker", 0.45) - MCFG_SOUND_ROUTE(1, "rspeaker", 0.45) + MCFG_SOUND_ROUTE(0, "lspeaker", 0.3) + MCFG_SOUND_ROUTE(1, "rspeaker", 0.3) TAITO_ZOOM(config, m_zoom); m_zoom->set_use_flash(); diff --git a/src/mame/drivers/zn.cpp b/src/mame/drivers/zn.cpp index ed7f398b7ac..c122eb05c84 100644 --- a/src/mame/drivers/zn.cpp +++ b/src/mame/drivers/zn.cpp @@ -1203,8 +1203,8 @@ MACHINE_CONFIG_START(zn_state::coh1000tb) /* sound hardware */ MCFG_DEVICE_MODIFY("spu") MCFG_SOUND_ROUTES_RESET() - MCFG_SOUND_ROUTE(0, "lspeaker", 0.45) - MCFG_SOUND_ROUTE(1, "rspeaker", 0.45) + MCFG_SOUND_ROUTE(0, "lspeaker", 0.3) + MCFG_SOUND_ROUTE(1, "rspeaker", 0.3) TAITO_ZOOM(config, m_zoom); m_zoom->add_route(0, "lspeaker", 1.0); @@ -1227,8 +1227,8 @@ MACHINE_CONFIG_START(zn_state::coh1002tb) /* sound hardware */ MCFG_DEVICE_MODIFY("spu") MCFG_SOUND_ROUTES_RESET() - MCFG_SOUND_ROUTE(0, "lspeaker", 0.45) - MCFG_SOUND_ROUTE(1, "rspeaker", 0.45) + MCFG_SOUND_ROUTE(0, "lspeaker", 0.3) + MCFG_SOUND_ROUTE(1, "rspeaker", 0.3) TAITO_ZOOM(config, m_zoom); m_zoom->add_route(0, "lspeaker", 1.0);