diff options
Diffstat (limited to 'src/devices/sound/ym2413.cpp')
-rw-r--r-- | src/devices/sound/ym2413.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/devices/sound/ym2413.cpp b/src/devices/sound/ym2413.cpp index ca4a9acb874..28cf77c097b 100644 --- a/src/devices/sound/ym2413.cpp +++ b/src/devices/sound/ym2413.cpp @@ -1470,12 +1470,12 @@ void ym2413_device::write_reg(int r, int v) } //------------------------------------------------- -// sound_stream_update_legacy - handle a stream update +// sound_stream_update - handle a stream update //------------------------------------------------- -void ym2413_device::sound_stream_update_legacy(sound_stream &stream, stream_sample_t const * const *inputs, stream_sample_t * const *outputs, int samples) +void ym2413_device::sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs) { - for(int i=0; i < samples ; i++ ) + for(int i=0; i < outputs[0].samples() ; i++ ) { output[0] = 0; output[1] = 0; @@ -1496,8 +1496,8 @@ void ym2413_device::sound_stream_update_legacy(sound_stream &stream, stream_samp rhythm_calc(&P_CH[0], noise_rng & 1 ); } - outputs[0][i] = limit( output[0] , 32767, -32768 ); - outputs[1][i] = limit( output[1] , 32767, -32768 ); + outputs[0].put_int_clamp(i, output[0], 32768); + outputs[1].put_int_clamp(i, output[1], 32768); advance(); } @@ -1511,7 +1511,7 @@ void ym2413_device::device_start() { int rate = clock()/72; - m_stream = stream_alloc_legacy(0,2,rate); + m_stream = stream_alloc(0,2,rate); for (int x=0; x<TL_RES_LEN; x++) { |