summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/sound/hc55516.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/sound/hc55516.cpp')
-rw-r--r--src/devices/sound/hc55516.cpp37
1 files changed, 15 insertions, 22 deletions
diff --git a/src/devices/sound/hc55516.cpp b/src/devices/sound/hc55516.cpp
index 885751c1a6a..0bd36ae381f 100644
--- a/src/devices/sound/hc55516.cpp
+++ b/src/devices/sound/hc55516.cpp
@@ -197,15 +197,12 @@ void cvsd_device_base::process_bit(bool bit, bool clock_state)
// sound_stream_update - handle a stream update
//-------------------------------------------------
-void cvsd_device_base::sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs)
+void cvsd_device_base::sound_stream_update(sound_stream &stream)
{
// Stub, just return silence
- auto &buffer = outputs[0];
-
- m_samples_generated += buffer.samples();
+ m_samples_generated += stream.samples();
if (m_samples_generated >= SAMPLE_RATE)
m_samples_generated -= SAMPLE_RATE;
- buffer.fill(0);
}
@@ -356,16 +353,14 @@ void hc55516_device::process_bit(bool bit, bool clock_state)
// sound_stream_update_legacy - handle a stream update
//-------------------------------------------------
-void hc55516_device::sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs)
+void hc55516_device::sound_stream_update(sound_stream &stream)
{
- auto &buffer = outputs[0];
-
if (is_external_oscillator())
{
// external oscillator
- for (int i = 0; i < buffer.samples(); i++)
+ for (int i = 0; i < stream.samples(); i++)
{
- buffer.put_int(i, m_next_sample, 32768);
+ stream.put_int(0, i, m_next_sample, 32768);
m_samples_generated++;
@@ -384,8 +379,8 @@ void hc55516_device::sound_stream_update(sound_stream &stream, std::vector<read_
// software driven clock
else
{
- for (int i = 0; i < buffer.samples(); i++)
- buffer.put_int(i, m_next_sample, 32768);
+ for (int i = 0; i < stream.samples(); i++)
+ stream.put_int(0, i, m_next_sample, 32768);
}
}
@@ -493,14 +488,12 @@ void mc3417_device::process_bit(bool bit, bool clock_state)
}
}
-void mc3417_device::sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs)
+void mc3417_device::sound_stream_update(sound_stream &stream)
{
- auto &buffer = outputs[0];
-
if (!is_external_oscillator())
{
// track how many samples we've updated without a clock; if it's been more than 1/32 of a second, output silence
- m_samples_generated += buffer.samples();
+ m_samples_generated += stream.samples();
if (m_samples_generated > SAMPLE_RATE / 32)
{
m_samples_generated = SAMPLE_RATE;
@@ -509,16 +502,16 @@ void mc3417_device::sound_stream_update(sound_stream &stream, std::vector<read_s
}
// compute the interpolation slope
- stream_buffer::sample_t sample = m_curr_sample;
- stream_buffer::sample_t slope = (m_next_sample - sample) / buffer.samples();
+ sound_stream::sample_t sample = m_curr_sample;
+ sound_stream::sample_t slope = (m_next_sample - sample) / stream.samples();
m_curr_sample = m_next_sample;
if (is_external_oscillator())
{
// external oscillator
- for (int i = 0; i < buffer.samples(); i++, sample += slope)
+ for (int i = 0; i < stream.samples(); i++, sample += slope)
{
- buffer.put(i, sample);
+ stream.put(0, i, sample);
m_samples_generated++;
@@ -537,8 +530,8 @@ void mc3417_device::sound_stream_update(sound_stream &stream, std::vector<read_s
// software driven clock
else
{
- for (int i = 0; i < buffer.samples(); i++, sample += slope)
- buffer.put(i, sample);
+ for (int i = 0; i < stream.samples(); i++, sample += slope)
+ stream.put(0, i, sample);
}
}