diff options
author | Alex W. Jackson <alex.w.jackson@gmail.com> | 2014-10-22 23:04:13 -0400 |
---|---|---|
committer | Alex W. Jackson <alex.w.jackson@gmail.com> | 2014-10-22 23:04:13 -0400 |
commit | 43f31c6e6e629dd5a5d0d158e4a7739095dc5635 (patch) | |
tree | c88849952bda8512943d91fd6f1f690ac8246da8 | |
parent | e095956d7d0fdf5e20f662ab92403c6f6e37786d (diff) |
ay8910: only build the table that will be actually used (per-channel or pre-mixed) (nw)
-rw-r--r-- | src/emu/sound/ay8910.c | 7 |
1 files 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() |