diff options
Diffstat (limited to 'src/devices/sound/iremga20.cpp')
-rw-r--r-- | src/devices/sound/iremga20.cpp | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/src/devices/sound/iremga20.cpp b/src/devices/sound/iremga20.cpp index ba49eaa75c4..3ec07d3de35 100644 --- a/src/devices/sound/iremga20.cpp +++ b/src/devices/sound/iremga20.cpp @@ -73,7 +73,7 @@ iremga20_device::iremga20_device(const machine_config &mconfig, const char *tag, void iremga20_device::device_start() { - m_stream = stream_alloc_legacy(0, 2, clock()/4); + m_stream = stream_alloc(0, 2, clock()/4); save_item(NAME(m_regs)); for (int i = 0; i < 4; i++) @@ -126,19 +126,17 @@ void iremga20_device::rom_bank_updated() } //------------------------------------------------- -// sound_stream_update_legacy - handle a stream update +// sound_stream_update - handle a stream update //------------------------------------------------- -void iremga20_device::sound_stream_update_legacy(sound_stream &stream, stream_sample_t const * const *inputs, stream_sample_t * const *outputs, int samples) +void iremga20_device::sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs) { - stream_sample_t *outL, *outR; + auto &outL = outputs[0]; + auto &outR = outputs[1]; - outL = outputs[0]; - outR = outputs[1]; - - for (int i = 0; i < samples; i++) + for (int i = 0; i < outL.samples(); i++) { - stream_sample_t sampleout = 0; + s32 sampleout = 0; for (auto &ch : m_channel) { @@ -160,9 +158,8 @@ void iremga20_device::sound_stream_update_legacy(sound_stream &stream, stream_sa } } - sampleout >>= 2; - outL[i] = sampleout; - outR[i] = sampleout; + outL.put_int(i, sampleout, 32768 * 4); + outR.put_int(i, sampleout, 32768 * 4); } } |