summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/sound/qs1000.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/qs1000.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/qs1000.cpp')
-rw-r--r--src/devices/sound/qs1000.cpp18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/devices/sound/qs1000.cpp b/src/devices/sound/qs1000.cpp
index b3f494890b4..b3e87b1515a 100644
--- a/src/devices/sound/qs1000.cpp
+++ b/src/devices/sound/qs1000.cpp
@@ -423,12 +423,8 @@ void qs1000_device::wave_w(offs_t offset, uint8_t data)
//-------------------------------------------------
// sound_stream_update -
//-------------------------------------------------
-void qs1000_device::sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs)
+void qs1000_device::sound_stream_update(sound_stream &stream)
{
- // Rset the output stream
- outputs[0].fill(0);
- outputs[1].fill(0);
-
// Iterate over voices and accumulate sample data
for (auto & chan : m_channels)
{
@@ -440,7 +436,7 @@ void qs1000_device::sound_stream_update(sound_stream &stream, std::vector<read_s
{
if (chan.m_flags & QS1000_ADPCM)
{
- for (int samp = 0; samp < outputs[0].samples(); samp++)
+ for (int samp = 0; samp < stream.samples(); samp++)
{
if (chan.m_addr >= chan.m_loop_end)
{
@@ -484,13 +480,13 @@ void qs1000_device::sound_stream_update(sound_stream &stream, std::vector<read_s
chan.m_addr = (chan.m_addr + (chan.m_acc >> 18)) & QS1000_ADDRESS_MASK;
chan.m_acc &= ((1 << 18) - 1);
- outputs[0].add_int(samp, result * 4 * lvol * vol, 32768 << 12);
- outputs[1].add_int(samp, result * 4 * rvol * vol, 32768 << 12);
+ stream.add_int(0, samp, result * 4 * lvol * vol, 32768 << 12);
+ stream.add_int(1, samp, result * 4 * rvol * vol, 32768 << 12);
}
}
else
{
- for (int samp = 0; samp < outputs[0].samples(); samp++)
+ for (int samp = 0; samp < stream.samples(); samp++)
{
if (chan.m_addr >= chan.m_loop_end)
{
@@ -513,8 +509,8 @@ void qs1000_device::sound_stream_update(sound_stream &stream, std::vector<read_s
chan.m_addr = (chan.m_addr + (chan.m_acc >> 18)) & QS1000_ADDRESS_MASK;
chan.m_acc &= ((1 << 18) - 1);
- outputs[0].add_int(samp, result * lvol * vol, 32768 << 12);
- outputs[1].add_int(samp, result * rvol * vol, 32768 << 12);
+ stream.add_int(0, samp, result * lvol * vol, 32768 << 12);
+ stream.add_int(1, samp, result * rvol * vol, 32768 << 12);
}
}
}