diff options
Diffstat (limited to 'src/devices/sound/ymz770.cpp')
-rw-r--r-- | src/devices/sound/ymz770.cpp | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/devices/sound/ymz770.cpp b/src/devices/sound/ymz770.cpp index 3934c6ac6dd..9d489d8a89d 100644 --- a/src/devices/sound/ymz770.cpp +++ b/src/devices/sound/ymz770.cpp @@ -77,7 +77,7 @@ ymz770_device::ymz770_device(const machine_config &mconfig, device_type type, co void ymz770_device::device_start() { // create the stream - m_stream = stream_alloc_legacy(0, 2, m_sclock); + m_stream = stream_alloc(0, 2, m_sclock); for (auto & channel : m_channels) { @@ -178,18 +178,16 @@ void ymz770_device::device_reset() //------------------------------------------------- -// sound_stream_update_legacy - handle update requests for +// sound_stream_update - handle update requests for // our sound stream //------------------------------------------------- -void ymz770_device::sound_stream_update_legacy(sound_stream &stream, stream_sample_t const * const *inputs, stream_sample_t * const *outputs, int samples) +void ymz770_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++) { sequencer(); @@ -282,8 +280,8 @@ retry: } if (m_mute) mixr = mixl = 0; - outL[i] = mixl; - outR[i] = mixr; + outL.put_int(i, mixl, 32768); + outR.put_int(i, mixr, 32768); } } |