diff options
Diffstat (limited to 'src/devices/sound/digitalk.cpp')
-rw-r--r-- | src/devices/sound/digitalk.cpp | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/devices/sound/digitalk.cpp b/src/devices/sound/digitalk.cpp index d41c267e798..ebe7fbb14da 100644 --- a/src/devices/sound/digitalk.cpp +++ b/src/devices/sound/digitalk.cpp @@ -544,28 +544,27 @@ void digitalker_device::digitalker_step() // sound_stream_update - handle a stream update //------------------------------------------------- -void digitalker_device::sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs) +void digitalker_device::sound_stream_update(sound_stream &stream) { - auto &sout = outputs[0]; int cpos = 0; - while(cpos != sout.samples()) { + while(cpos != stream.samples()) { if(m_zero_count == 0 && m_dac_index == 128) digitalker_step(); if(m_zero_count) { - int n = sout.samples() - cpos; + int n = stream.samples() - cpos; if(n > m_zero_count) n = m_zero_count; - sout.fill(0, cpos, n); + stream.fill(0, 0, cpos, n); cpos += n; m_zero_count -= n; } else if(m_dac_index != 128) { - while(cpos != sout.samples() && m_dac_index != 128) { + while(cpos != stream.samples() && m_dac_index != 128) { s32 v = m_dac[m_dac_index]; int pp = m_pitch_pos; - while(cpos != sout.samples() && pp != m_pitch) { - sout.put_int(cpos++, v, 32768); + while(cpos != stream.samples() && pp != m_pitch) { + stream.put_int(0, cpos++, v, 32768); pp++; } if(pp == m_pitch) { @@ -575,9 +574,6 @@ void digitalker_device::sound_stream_update(sound_stream &stream, std::vector<re m_pitch_pos = pp; } - } else { - sout.fill(0, cpos); - break; } } } |