summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/sound/namco_163.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/namco_163.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/namco_163.cpp')
-rw-r--r--src/devices/sound/namco_163.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/devices/sound/namco_163.cpp b/src/devices/sound/namco_163.cpp
index 3735e3147df..7f20a25928c 100644
--- a/src/devices/sound/namco_163.cpp
+++ b/src/devices/sound/namco_163.cpp
@@ -145,16 +145,13 @@ u8 namco_163_sound_device::data_r()
}
-void namco_163_sound_device::sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs)
+void namco_163_sound_device::sound_stream_update(sound_stream &stream)
{
if (m_disable)
- {
- outputs[0].fill(0);
return;
- }
// Slightly noisy but closer to real hardware behavior
- for (int s = 0; s < outputs[0].samples(); s++)
+ for (int s = 0; s < stream.samples(); s++)
{
u32 phase = (m_ram[m_reg_addr + 5] << 16) | (m_ram[m_reg_addr + 3] << 8) | m_ram[m_reg_addr + 1];
const u32 freq = ((m_ram[m_reg_addr + 4] & 0x3) << 16) | (m_ram[m_reg_addr + 2] << 8) | m_ram[m_reg_addr + 0];
@@ -174,6 +171,6 @@ void namco_163_sound_device::sound_stream_update(sound_stream &stream, std::vect
{
m_reg_addr = 0x78 - ((m_ram[0x7f] & 0x70) >> 1);
}
- outputs[0].put_int(s, output, 128);
+ stream.put_int(0, s, output, 128);
}
}