summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/sound/c140.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/sound/c140.cpp')
-rw-r--r--src/devices/sound/c140.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/devices/sound/c140.cpp b/src/devices/sound/c140.cpp
index 0227fd47d08..0edb1920a8c 100644
--- a/src/devices/sound/c140.cpp
+++ b/src/devices/sound/c140.cpp
@@ -327,14 +327,14 @@ void c140_device::sound_stream_update(sound_stream &stream, std::vector<read_str
auto &dest1 = outputs[0];
auto &dest2 = outputs[1];
constexpr stream_buffer::sample_t sample_scale = 8.0 / 32768.0;
- while (!dest1.done())
+ for (int i = 0; i < samples; i++)
{
stream_buffer::sample_t val;
val = stream_buffer::sample_t(*lmix++) * sample_scale;
- dest1.put(limit(val));
+ dest1.put(i, limit(val));
val = stream_buffer::sample_t(*rmix++) * sample_scale;
- dest2.put(limit(val));
+ dest2.put(i, limit(val));
}
}
}
@@ -466,14 +466,14 @@ void c219_device::sound_stream_update(sound_stream &stream, std::vector<read_str
auto &dest1 = outputs[0];
auto &dest2 = outputs[1];
constexpr stream_buffer::sample_t sample_scale = 8.0 / 32768.0;
- while (!dest1.done())
+ for (int i = 0; i < samples; i++)
{
stream_buffer::sample_t val;
val = stream_buffer::sample_t(*lmix++) * sample_scale;
- dest1.put(limit(val));
+ dest1.put(i, limit(val));
val = stream_buffer::sample_t(*rmix++) * sample_scale;
- dest2.put(limit(val));
+ dest2.put(i, limit(val));
}
}
}