diff options
Diffstat (limited to 'src/devices/sound/okim6258.cpp')
-rw-r--r-- | src/devices/sound/okim6258.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/devices/sound/okim6258.cpp b/src/devices/sound/okim6258.cpp index 171100e2080..712b3269f36 100644 --- a/src/devices/sound/okim6258.cpp +++ b/src/devices/sound/okim6258.cpp @@ -147,15 +147,13 @@ void okim6258_device::device_reset() // sound_stream_update - handle a stream update //------------------------------------------------- -void okim6258_device::sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs) +void okim6258_device::sound_stream_update(sound_stream &stream) { - auto &buffer = outputs[0]; - if (m_status & STATUS_PLAYING) { int nibble_shift = m_nibble_shift; - for (int sampindex = 0; sampindex < buffer.samples(); sampindex++) + for (int sampindex = 0; sampindex < stream.samples(); sampindex++) { /* Compute the new amplitude and update the current step */ int nibble = (m_data_in >> nibble_shift) & 0xf; @@ -165,16 +163,12 @@ void okim6258_device::sound_stream_update(sound_stream &stream, std::vector<read nibble_shift ^= 4; - buffer.put_int(sampindex, sample, 32768); + stream.put_int(0, sampindex, sample, 32768); } /* Update the parameters */ m_nibble_shift = nibble_shift; } - else - { - buffer.fill(0); - } } int16_t okim6258_device::clock_adpcm(uint8_t nibble) |