summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/sound/sp0256.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/sp0256.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/sp0256.cpp')
-rw-r--r--src/devices/sound/sp0256.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/devices/sound/sp0256.cpp b/src/devices/sound/sp0256.cpp
index 3486f710be3..ba84d002eb5 100644
--- a/src/devices/sound/sp0256.cpp
+++ b/src/devices/sound/sp0256.cpp
@@ -1259,12 +1259,11 @@ void sp0256_device::set_clock(int clock)
// sound_stream_update - handle a stream update
//-------------------------------------------------
-void sp0256_device::sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs)
+void sp0256_device::sound_stream_update(sound_stream &stream)
{
- auto &output = outputs[0];
int output_index = 0;
- while (output_index < output.samples())
+ while (output_index < stream.samples())
{
/* ---------------------------------------------------------------- */
/* First, drain as much of our scratch buffer as we can into the */
@@ -1272,20 +1271,20 @@ void sp0256_device::sound_stream_update(sound_stream &stream, std::vector<read_s
/* ---------------------------------------------------------------- */
while (m_sc_tail != m_sc_head)
{
- output.put_int(output_index++, m_scratch[m_sc_tail++ & SCBUF_MASK], 32768);
+ stream.put_int(0, output_index++, m_scratch[m_sc_tail++ & SCBUF_MASK], 32768);
m_sc_tail &= SCBUF_MASK;
- if (output_index >= output.samples())
+ if (output_index >= stream.samples())
break;
}
/* ---------------------------------------------------------------- */
/* If output outputs is full, then we're done. */
/* ---------------------------------------------------------------- */
- if (output_index > output.samples())
+ if (output_index > stream.samples())
break;
- int length = output.samples() - output_index;
+ int length = stream.samples() - output_index;
/* ---------------------------------------------------------------- */
/* Process the current set of filter coefficients as long as the */