summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine/netlist.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/machine/netlist.cpp')
-rw-r--r--src/devices/machine/netlist.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/devices/machine/netlist.cpp b/src/devices/machine/netlist.cpp
index 988c21c33e1..06e574890d2 100644
--- a/src/devices/machine/netlist.cpp
+++ b/src/devices/machine/netlist.cpp
@@ -825,10 +825,10 @@ void netlist_mame_stream_output_device::sound_update_fill(write_stream_view &tar
if (target.samples() < m_buffer.size())
osd_printf_warning("sound %s: samples %d less bufsize %d\n", name(), target.samples(), m_buffer.size());
- int sampindex;
- for (sampindex = 0; sampindex < m_buffer.size(); sampindex++)
- target.put(sampindex, m_buffer[sampindex]);
- target.fill(m_cur, sampindex);
+ int sampindex = 0;
+ while (!target.done() && sampindex < m_buffer.size())
+ target.put(m_buffer[sampindex++]);
+ target.fill(m_cur);
}