diff options
Diffstat (limited to 'src/mame/audio/snk6502.cpp')
-rw-r--r-- | src/mame/audio/snk6502.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mame/audio/snk6502.cpp b/src/mame/audio/snk6502.cpp index 4d5550e08c3..0dc3b1868a5 100644 --- a/src/mame/audio/snk6502.cpp +++ b/src/mame/audio/snk6502.cpp @@ -165,7 +165,7 @@ void snk6502_sound_device::device_start() // 38.99 Hz update (according to schematic) set_music_clock(M_LN2 * (RES_K(18) * 2 + RES_K(1)) * CAP_U(1)); - m_tone_stream = stream_alloc_legacy(0, 1, SAMPLE_RATE); + m_tone_stream = stream_alloc(0, 1, SAMPLE_RATE); for (int i = 0; i < NUM_CHANNELS; i++) { @@ -509,17 +509,17 @@ void snk6502_sound_device::speech_w(uint8_t data, const uint16_t *table, int sta */ //------------------------------------------------- -// sound_stream_update_legacy - handle a stream update +// sound_stream_update - handle a stream update //------------------------------------------------- -void snk6502_sound_device::sound_stream_update_legacy(sound_stream &stream, stream_sample_t const * const *inputs, stream_sample_t * const *outputs, int samples) +void snk6502_sound_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]; + auto &buffer = outputs[0]; for (int i = 0; i < NUM_CHANNELS; i++) validate_tone_channel(i); - while (samples-- > 0) + for (int sampindex = 0; sampindex < buffer.samples(); sampindex++) { int32_t data = 0; @@ -541,7 +541,7 @@ void snk6502_sound_device::sound_stream_update_legacy(sound_stream &stream, stre } } - *buffer++ = data; + buffer.put_int(sampindex, data, 3768); m_tone_clock += FRAC_ONE; if (m_tone_clock >= m_tone_clock_expire) |