diff options
Diffstat (limited to 'src/devices/machine/s2636.cpp')
-rw-r--r-- | src/devices/machine/s2636.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/devices/machine/s2636.cpp b/src/devices/machine/s2636.cpp index bdf95dc69d0..8ad26690bcf 100644 --- a/src/devices/machine/s2636.cpp +++ b/src/devices/machine/s2636.cpp @@ -203,7 +203,7 @@ void s2636_device::device_start() save_item(NAME(m_intreq)); save_item(NAME(m_intack)); - m_stream = stream_alloc_legacy(0, 1, machine().sample_rate()); + m_stream = stream_alloc(0, 1, machine().sample_rate()); save_item(NAME(m_sample_cnt)); save_item(NAME(m_sound_lvl)); @@ -247,7 +247,7 @@ void s2636_device::render_next_line() // pre-clear the line for convenience rectangle const &vis_area = screen().visible_area(); - uint16_t *const row = &m_bitmap.pix16(m_screen_line); + uint16_t *const row = &m_bitmap.pix(m_screen_line); m_bitmap.plot_box(0, m_screen_line, m_bitmap.width(), 1, 0); if ((vis_area.min_y > m_screen_line) || (vis_area.max_y < m_screen_line)) @@ -447,13 +447,14 @@ void s2636_device::write_intack(int state) //------------------------------------------------- -// sound_stream_update_legacy - generate audio output +// sound_stream_update - generate audio output //------------------------------------------------- -void s2636_device::sound_stream_update_legacy(sound_stream &stream, stream_sample_t const * const *inputs, stream_sample_t * const *outputs, int samples) + +void s2636_device::sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs) { - stream_sample_t *buffer = outputs[0]; - while (samples--) + auto &buffer = outputs[0]; + for (int sampindex = 0; sampindex < buffer.samples(); sampindex++) { if (!m_sample_cnt) { @@ -469,7 +470,7 @@ void s2636_device::sound_stream_update_legacy(sound_stream &stream, stream_sampl } } - *buffer++ = m_sound_lvl ? 0x7fff : 0x0000; + buffer.put(sampindex, m_sound_lvl ? 1.0 : 0.0); m_sample_cnt--; } } |