summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/sound/i5000.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/sound/i5000.cpp')
-rw-r--r--src/devices/sound/i5000.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/devices/sound/i5000.cpp b/src/devices/sound/i5000.cpp
index c317d976d9f..6978b9336f3 100644
--- a/src/devices/sound/i5000.cpp
+++ b/src/devices/sound/i5000.cpp
@@ -44,7 +44,7 @@ void i5000snd_device::device_start()
m_lut_volume[0xff] = 0;
// create the stream
- m_stream = machine().sound().stream_alloc(*this, 0, 2, clock() / 0x400);
+ m_stream = stream_alloc(0, 2, clock() / 0x400);
m_rom_base = (uint16_t *)device().machine().root_device().memregion(":i5000snd")->base();
m_rom_mask = device().machine().root_device().memregion(":i5000snd")->bytes() / 2 - 1;
@@ -114,9 +114,9 @@ bool i5000snd_device::read_sample(int ch)
}
-void i5000snd_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples)
+void i5000snd_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_l = 0;
int32_t mix_r = 0;
@@ -157,8 +157,8 @@ void i5000snd_device::sound_stream_update(sound_stream &stream, stream_sample_t
mix_l += m_channels[ch].output_l;
}
- outputs[0][i] = mix_r / 16;
- outputs[1][i] = mix_l / 16;
+ outputs[0].put_int(i, mix_r, 32768 * 16);
+ outputs[1].put_int(i, mix_l, 32768 * 16);
}
}