diff options
Diffstat (limited to 'src/devices/sound/c140.cpp')
-rw-r--r-- | src/devices/sound/c140.cpp | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/src/devices/sound/c140.cpp b/src/devices/sound/c140.cpp index 688ebec6459..9c83dac32db 100644 --- a/src/devices/sound/c140.cpp +++ b/src/devices/sound/c140.cpp @@ -215,12 +215,12 @@ void c140_device::rom_bank_pre_change() // sound_stream_update - handle a stream update //------------------------------------------------- -void c140_device::sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs) +void c140_device::sound_stream_update(sound_stream &stream) { float pbase = (float)m_baserate * 2.0f / (float)m_sample_rate; s16 *lmix, *rmix; - int samples = outputs[0].samples(); + int samples = stream.samples(); if (samples > m_sample_rate) samples = m_sample_rate; /* zap the contents of the mixer buffer */ @@ -317,22 +317,20 @@ void c140_device::sound_stream_update(sound_stream &stream, std::vector<read_str lmix = m_mixer_buffer_left.get(); rmix = m_mixer_buffer_right.get(); { - auto &dest1 = outputs[0]; - auto &dest2 = outputs[1]; for (int i = 0; i < samples; i++) { - dest1.put_int_clamp(i, *lmix++, 32768 / 8); - dest2.put_int_clamp(i, *rmix++, 32768 / 8); + stream.put_int_clamp(0, i, *lmix++, 32768 / 8); + stream.put_int_clamp(1, i, *rmix++, 32768 / 8); } } } -void c219_device::sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs) +void c219_device::sound_stream_update(sound_stream &stream) { float pbase = (float)m_baserate * 2.0f / (float)m_sample_rate; s16 *lmix, *rmix; - int samples = outputs[0].samples(); + int samples = stream.samples(); if (samples > m_sample_rate) samples = m_sample_rate; /* zap the contents of the mixer buffer */ @@ -448,12 +446,10 @@ void c219_device::sound_stream_update(sound_stream &stream, std::vector<read_str lmix = m_mixer_buffer_left.get(); rmix = m_mixer_buffer_right.get(); { - auto &dest1 = outputs[0]; - auto &dest2 = outputs[1]; for (int i = 0; i < samples; i++) { - dest1.put_int_clamp(i, *lmix++, 32768 / 8); - dest2.put_int_clamp(i, *rmix++, 32768 / 8); + stream.put_int_clamp(0, i, *lmix++, 32768 / 8); + stream.put_int_clamp(1, i, *rmix++, 32768 / 8); } } } |