diff options
Diffstat (limited to 'src/mame/audio/segag80r.cpp')
-rw-r--r-- | src/mame/audio/segag80r.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mame/audio/segag80r.cpp b/src/mame/audio/segag80r.cpp index 90a8463cbad..4acd7c2104a 100644 --- a/src/mame/audio/segag80r.cpp +++ b/src/mame/audio/segag80r.cpp @@ -46,7 +46,7 @@ void sega005_sound_device::device_start() segag80r_state *state = machine().driver_data<segag80r_state>(); /* create the stream */ - m_sega005_stream = stream_alloc_legacy(0, 1, SEGA005_COUNTER_FREQ); + m_sega005_stream = stream_alloc(0, 1, SEGA005_COUNTER_FREQ); /* create a timer for the 555 */ m_sega005_sound_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(sega005_sound_device::sega005_auto_timer), this)); @@ -57,17 +57,17 @@ void sega005_sound_device::device_start() } //------------------------------------------------- -// sound_stream_update_legacy - handle a stream update +// sound_stream_update - handle a stream update //------------------------------------------------- -void sega005_sound_device::sound_stream_update_legacy(sound_stream &stream, stream_sample_t const * const *inputs, stream_sample_t * const *outputs, int samples) +void sega005_sound_device::sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs) { segag80r_state *state = machine().driver_data<segag80r_state>(); const uint8_t *sound_prom = state->memregion("proms")->base(); int i; /* no implementation yet */ - for (i = 0; i < samples; i++) + for (i = 0; i < outputs[0].samples(); i++) { if (!(state->m_sound_state[1] & 0x10) && (++state->m_square_count & 0xff) == 0) { @@ -78,7 +78,7 @@ void sega005_sound_device::sound_stream_update_legacy(sound_stream &stream, stre state->m_square_state += 2; } - outputs[0][i] = (state->m_square_state & 2) ? 0x7fff : 0x0000; + outputs[0].put(i, (state->m_square_state & 2) ? 1.0 : 0.0); } } |