diff options
Diffstat (limited to 'src/devices/sound/upd7759.cpp')
-rw-r--r-- | src/devices/sound/upd7759.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/devices/sound/upd7759.cpp b/src/devices/sound/upd7759.cpp index 1da8fd7c11c..fc07c0f95ab 100644 --- a/src/devices/sound/upd7759.cpp +++ b/src/devices/sound/upd7759.cpp @@ -738,11 +738,12 @@ void upd775x_device::sound_stream_update(sound_stream &stream, std::vector<read_ uint32_t pos = m_pos; /* loop until done */ + u32 index = 0; if (m_state != STATE_IDLE) - while (!outputs[0].done()) + for ( ; index < outputs[0].samples(); index++) { /* store the current sample */ - outputs[0].put(sample); + outputs[0].put(index, sample); /* advance by the number of clocks/output sample */ pos += step; @@ -774,7 +775,8 @@ void upd775x_device::sound_stream_update(sound_stream &stream, std::vector<read_ } /* if we got out early, just zap the rest of the buffer */ - outputs[0].fill(0); + for (; index < outputs[0].samples(); index++) + outputs[0].put(index, 0); /* flush the state back */ m_clocks_left = clocks_left; |