summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/sound/dac76.cpp
diff options
context:
space:
mode:
author Olivier Galibert <galibert@pobox.com>2025-04-14 11:31:53 +0200
committer Olivier Galibert <galibert@pobox.com>2025-04-27 22:23:20 +0200
commitd0f1c15a0f6df2dd51a754cb46e6175b7079c8f2 (patch)
treebe35c94340442af08c316a8679089ee68e119fac /src/devices/sound/dac76.cpp
parentec636faeba5c5841c5a4a35b7c9dc2f06a00f538 (diff)
New sound infrastructure.
Should be added soon: - mute - speaker/microphone resampling To be added a little later: - compression - reverb Needs to be added by someone else: - coreaudio - direct - portaudio - xaudio2 - js
Diffstat (limited to 'src/devices/sound/dac76.cpp')
-rw-r--r--src/devices/sound/dac76.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/devices/sound/dac76.cpp b/src/devices/sound/dac76.cpp
index 6e2065dd2cc..d5f6939edd5 100644
--- a/src/devices/sound/dac76.cpp
+++ b/src/devices/sound/dac76.cpp
@@ -103,7 +103,7 @@ void dac76_device::device_reset()
// our sound stream
//-------------------------------------------------
-void dac76_device::sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs)
+void dac76_device::sound_stream_update(sound_stream &stream)
{
// get current output level
int step_size = (2 << m_chord);
@@ -113,7 +113,7 @@ void dac76_device::sound_stream_update(sound_stream &stream, std::vector<read_st
vout *= (m_sb ? +1 : -1);
// range is 0-8031, normalize to 0-1 range
- stream_buffer::sample_t y = stream_buffer::sample_t(vout) * (1.0 / 8031.0);
+ sound_stream::sample_t y = sound_stream::sample_t(vout) * (1.0 / 8031.0);
if (m_voltage_output)
{
@@ -121,16 +121,14 @@ void dac76_device::sound_stream_update(sound_stream &stream, std::vector<read_st
y *= ((y >= 0) ? m_r_pos : m_r_neg) * FULL_SCALE_MULT;
}
- write_stream_view &out = outputs[0];
if (m_streaming_iref)
{
- const read_stream_view &iref = inputs[0];
- const int n = out.samples();
+ const int n = stream.samples();
for (int i = 0; i < n; ++i)
- out.put(i, iref.get(i) * y);
+ stream.put(0, i, stream.get(0, i) * y);
}
else
{
- out.fill(m_fixed_iref * y);
+ stream.fill(0, m_fixed_iref * y);
}
}