From 18e20127f0df792e2e2e557c5a92392fd92f0889 Mon Sep 17 00:00:00 2001 From: Aaron Giles Date: Mon, 21 Sep 2020 01:28:37 -0700 Subject: Fix for last commit --- src/devices/sound/rp2c33_snd.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/devices/sound/rp2c33_snd.cpp b/src/devices/sound/rp2c33_snd.cpp index 57e60cf9fb5..506e21ce21c 100644 --- a/src/devices/sound/rp2c33_snd.cpp +++ b/src/devices/sound/rp2c33_snd.cpp @@ -56,7 +56,7 @@ void rp2c33_sound_device::device_start() for (int i = 0; i < 4; i++) m_mvol_table[i] = int((65536.0 / (32.0 * 64.0)) * 2.0 / double(i + 2)); - m_stream = stream_alloc_legacy(0, 1, clock()); + m_stream = stream_alloc(0, 1, clock()); // save states save_item(NAME(m_regs)); @@ -221,9 +221,9 @@ void rp2c33_sound_device::write(offs_t offset, u8 data) // sound_stream_update_legacy - handle a stream update //------------------------------------------------- -void rp2c33_sound_device::sound_stream_update_legacy(sound_stream &stream, stream_sample_t const * const *inputs, stream_sample_t * const *outputs, int samples) +void rp2c33_sound_device::sound_stream_update(sound_stream &stream, std::vector const &inputs, std::vector &outputs) { - for (int i = 0; i < samples; i++) + for (int i = 0; i < outputs[0].samples(); i++) { m_output = 0; if (!m_env_halt && !m_wave_halt) @@ -234,7 +234,7 @@ void rp2c33_sound_device::sound_stream_update_legacy(sound_stream &stream, strea exec_mod(); exec_wave(); /* Update the buffers */ - outputs[0][i] = m_output * m_mvol_table[m_mvol]; + outputs[0].put_int(i, m_output * m_mvol_table[m_mvol], 32768); } } -- cgit v1.2.3