summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/sound/sp0250.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/sound/sp0250.cpp')
-rw-r--r--src/devices/sound/sp0250.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/devices/sound/sp0250.cpp b/src/devices/sound/sp0250.cpp
index 2c4384888e9..763fc5b11e0 100644
--- a/src/devices/sound/sp0250.cpp
+++ b/src/devices/sound/sp0250.cpp
@@ -257,18 +257,16 @@ int8_t sp0250_device::next()
// sound_stream_update - handle a stream update
//-------------------------------------------------
-void sp0250_device::sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs)
+void sp0250_device::sound_stream_update(sound_stream &stream)
{
- auto &output = outputs[0];
-
if (!m_pwm_mode)
{
- for (int sampindex = 0; sampindex < output.samples(); sampindex++)
- output.put_int(sampindex, next(), 128);
+ for (int sampindex = 0; sampindex < stream.samples(); sampindex++)
+ stream.put_int(0, sampindex, next(), 128);
}
else
{
- for (int sampindex = 0; sampindex < output.samples(); )
+ for (int sampindex = 0; sampindex < stream.samples(); )
{
// see where we're at in the current PWM cycle
if (m_pwm_index >= PWM_CLOCKS)
@@ -282,7 +280,7 @@ void sp0250_device::sound_stream_update(sound_stream &stream, std::vector<read_s
// determine the value to fill and the number of samples remaining
// until it changes
- stream_buffer::sample_t value;
+ sound_stream::sample_t value;
int remaining;
if (m_pwm_index < m_pwm_count)
{
@@ -296,13 +294,13 @@ void sp0250_device::sound_stream_update(sound_stream &stream, std::vector<read_s
}
// clamp to the number of samples requested and advance the counters
- if (remaining > output.samples() - sampindex)
- remaining = output.samples() - sampindex;
+ if (remaining > stream.samples() - sampindex)
+ remaining = stream.samples() - sampindex;
m_pwm_index += remaining;
// fill the output
while (remaining-- != 0)
- outputs[0].put(sampindex++, value);
+ stream.put(0, sampindex++, value);
}
}
}