summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/sound/zsg2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/sound/zsg2.cpp')
-rw-r--r--src/devices/sound/zsg2.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/devices/sound/zsg2.cpp b/src/devices/sound/zsg2.cpp
index 3376f466b19..2fa01cfb3a5 100644
--- a/src/devices/sound/zsg2.cpp
+++ b/src/devices/sound/zsg2.cpp
@@ -283,9 +283,9 @@ void zsg2_device::filter_samples(zchan *ch)
// sound_stream_update - handle a stream update
//-------------------------------------------------
-void zsg2_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples)
+void zsg2_device::sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs)
{
- for (int i = 0; i < samples; i++)
+ for (int i = 0; i < outputs[0].samples(); i++)
{
int32_t mix[4] = {};
@@ -355,8 +355,7 @@ void zsg2_device::sound_stream_update(sound_stream &stream, stream_sample_t **in
}
for(int output=0; output<4; output++)
- outputs[output][i] = std::min<int32_t>(std::max<int32_t>(mix[output], -32768), 32767);
-
+ outputs[output].put_int_clamp(i, mix[output], 32768);
}
m_sample_count++;
}