diff options
Diffstat (limited to 'src/devices/sound/qsoundhle.cpp')
-rw-r--r-- | src/devices/sound/qsoundhle.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/devices/sound/qsoundhle.cpp b/src/devices/sound/qsoundhle.cpp index 9ff99ee8cab..913d22baed1 100644 --- a/src/devices/sound/qsoundhle.cpp +++ b/src/devices/sound/qsoundhle.cpp @@ -64,7 +64,7 @@ void qsound_hle_device::rom_bank_updated() void qsound_hle_device::device_start() { - m_stream = stream_alloc_legacy(0, 2, clock() / 2 / 1248); // DSP program uses 1248 machine cycles per iteration + m_stream = stream_alloc(0, 2, clock() / 2 / 1248); // DSP program uses 1248 machine cycles per iteration init_register_map(); @@ -158,20 +158,16 @@ void qsound_hle_device::device_reset() } //------------------------------------------------- -// sound_stream_update_legacy - handle a stream update +// sound_stream_update - handle a stream update //------------------------------------------------- -void qsound_hle_device::sound_stream_update_legacy(sound_stream &stream, stream_sample_t const * const *inputs, stream_sample_t * const *outputs, int samples) +void qsound_hle_device::sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs) { - // Clear the buffers - std::fill_n(outputs[0], samples, 0); - std::fill_n(outputs[1], samples, 0); - - for (int i = 0; i < samples; i ++) + for (int i = 0; i < outputs[0].samples(); i ++) { update_sample(); - outputs[0][i] = m_out[0]; - outputs[1][i] = m_out[1]; + outputs[0].put_int(i, m_out[0], 32768); + outputs[1].put_int(i, m_out[1], 32768); } } |