From 43f31c6e6e629dd5a5d0d158e4a7739095dc5635 Mon Sep 17 00:00:00 2001 From: "Alex W. Jackson" Date: Wed, 22 Oct 2014 23:04:13 -0400 Subject: ay8910: only build the table that will be actually used (per-channel or pre-mixed) (nw) --- src/emu/sound/ay8910.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/emu/sound/ay8910.c b/src/emu/sound/ay8910.c index d46a9d1cc06..7ebd22d1080 100644 --- a/src/emu/sound/ay8910.c +++ b/src/emu/sound/ay8910.c @@ -828,7 +828,7 @@ void ay8910_device::build_mixer_table() build_mosfet_resistor_table(ay8910_mosfet_param, m_res_load[chan], m_env_table[chan]); } } - else + else if (m_streams == AY8910_NUM_CHANNELS) { for (chan=0; chan < AY8910_NUM_CHANNELS; chan++) { @@ -840,7 +840,10 @@ void ay8910_device::build_mixer_table() * The previous implementation added all three channels up instead of averaging them. * The factor of 3 will force the same levels if normalizing is used. */ - build_3D_table(m_res_load[0], m_par, m_par_env, normalize, 3, m_zero_is_off, m_vol3d_table); + else + { + build_3D_table(m_res_load[0], m_par, m_par_env, normalize, 3, m_zero_is_off, m_vol3d_table); + } } void ay8910_device::ay8910_statesave() -- cgit v1.2.3