summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/audio/vc4000.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/audio/vc4000.cpp')
-rw-r--r--src/mame/audio/vc4000.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/mame/audio/vc4000.cpp b/src/mame/audio/vc4000.cpp
index 84c19a2d942..0454af936a5 100644
--- a/src/mame/audio/vc4000.cpp
+++ b/src/mame/audio/vc4000.cpp
@@ -31,26 +31,22 @@ vc4000_sound_device::vc4000_sound_device(const machine_config &mconfig, const ch
void vc4000_sound_device::device_start()
{
- m_channel = stream_alloc_legacy(0, 1, machine().sample_rate());
+ m_channel = stream_alloc(0, 1, machine().sample_rate());
}
//-------------------------------------------------
-// sound_stream_update_legacy - handle a stream update
+// sound_stream_update - handle a stream update
//-------------------------------------------------
-void vc4000_sound_device::sound_stream_update_legacy(sound_stream &stream, stream_sample_t const * const *inputs, stream_sample_t * const *outputs, int samples)
+void vc4000_sound_device::sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs)
{
int i;
- stream_sample_t *buffer = outputs[0];
+ auto &buffer = outputs[0];
- for (i = 0; i < samples; i++, buffer++)
+ for (i = 0; i < buffer.samples(); i++)
{
- *buffer = 0;
- if (m_reg[0] && m_pos <= m_size / 2)
- {
- *buffer = 0x7fff;
- }
+ buffer.put(i, (m_reg[0] && m_pos <= m_size / 2) ? 1.0 : 0.0);
if (m_pos <= m_size)
m_pos++;
if (m_pos > m_size)