diff options
author | Lord-Nightmare <Lord-Nightmare@users.noreply.github.com> | 2015-09-13 00:23:53 -0400 |
---|---|---|
committer | Lord-Nightmare <Lord-Nightmare@users.noreply.github.com> | 2015-09-13 00:23:53 -0400 |
commit | e92ac9e0fa8e99869894bea00589bbb526be30aa (patch) | |
tree | c9424e5e20b8a983adddb096ef2be9cb2281adcc | |
parent | 760eda9d9465d93ad6e642c80bca497ecf5a3d1f (diff) |
TMS5220 and TMS5110: Fix an off-by-one in the interpolator causing the k5 coefficient to not be zeroed during unvoiced frames. Fixes various speech glitches. [Lord Nightmare]
-rw-r--r-- | src/emu/sound/tms5110.c | 2 | ||||
-rw-r--r-- | src/emu/sound/tms5220.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/emu/sound/tms5110.c b/src/emu/sound/tms5110.c index a8ff58387cb..481229a6bc3 100644 --- a/src/emu/sound/tms5110.c +++ b/src/emu/sound/tms5110.c @@ -481,7 +481,7 @@ void tms5110_device::process(INT16 *buffer, unsigned int size) break; case 2: case 3: case 4: case 5: case 6: case 7: case 8: case 9: case 10: case 11: /* PC = 2 through 11, B cycle, write updated K1 through K10 */ - m_current_k[m_PC-2] = (m_current_k[m_PC-2] + (((m_coeff->ktable[m_PC-2][m_new_frame_k_idx[m_PC-2]] - m_current_k[m_PC-2])*(1-inhibit_state)) INTERP_SHIFT))*(((m_PC-2)>4)?(1-m_uv_zpar):(1-m_zpar)); + m_current_k[m_PC-2] = (m_current_k[m_PC-2] + (((m_coeff->ktable[m_PC-2][m_new_frame_k_idx[m_PC-2]] - m_current_k[m_PC-2])*(1-inhibit_state)) INTERP_SHIFT))*(1-(((m_PC-2)<4)?m_zpar:m_uv_zpar)); break; case 12: /* PC = 12 */ /* we should NEVER reach this point, PC=12 doesn't have a subcycle 2 */ diff --git a/src/emu/sound/tms5220.c b/src/emu/sound/tms5220.c index 0e7674161db..12b718c98c7 100644 --- a/src/emu/sound/tms5220.c +++ b/src/emu/sound/tms5220.c @@ -879,7 +879,7 @@ void tms5220_device::process(INT16 *buffer, unsigned int size) break; case 2: case 3: case 4: case 5: case 6: case 7: case 8: case 9: case 10: case 11: /* PC = 2 through 11, B cycle, write updated K1 through K10 */ - m_current_k[m_PC-2] = (m_current_k[m_PC-2] + (((m_coeff->ktable[m_PC-2][m_new_frame_k_idx[m_PC-2]] - m_current_k[m_PC-2])*(1-inhibit_state)) INTERP_SHIFT))*(((m_PC-2)>4)?(1-m_uv_zpar):(1-m_zpar)); + m_current_k[m_PC-2] = (m_current_k[m_PC-2] + (((m_coeff->ktable[m_PC-2][m_new_frame_k_idx[m_PC-2]] - m_current_k[m_PC-2])*(1-inhibit_state)) INTERP_SHIFT))*(1-(((m_PC-2)<4)?m_zpar:m_uv_zpar)); break; case 12: /* PC = 12 */ /* we should NEVER reach this point, PC=12 doesn't have a subcycle 2 */ |