summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/sound/huc6230.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-14 22:28:31 +0200
commitcef6157803320544651bfc96457d2f8a6df0abd6 (patch)
treef8a64867e3d654cdcad5f4c24824ea82e2c77194 /src/devices/sound/huc6230.cpp
parent9473c027358e1a2d5c93d240a48052368f9d3b84 (diff)
New sound infrastructure.sound
Should be added soon: - mute - lua hookup (with documentation) - 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/huc6230.cpp')
-rw-r--r--src/devices/sound/huc6230.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/devices/sound/huc6230.cpp b/src/devices/sound/huc6230.cpp
index ba969479cf2..33e59309f2b 100644
--- a/src/devices/sound/huc6230.cpp
+++ b/src/devices/sound/huc6230.cpp
@@ -19,16 +19,16 @@
#include "huc6230.h"
-void huc6230_device::sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs)
+void huc6230_device::sound_stream_update(sound_stream &stream)
{
- for (int i = 0; i < outputs[0].samples(); i++)
+ for (int i = 0; i < stream.samples(); i++)
{
// TODO: this implies to read from the PSG inputs
// doesn't seem right at all, eventually causes extreme DC offset on BIOS main menu,
// possibly because adpcm_timer runs from a different thread,
// needs to be rechecked once we have better examples ...
- s32 samp0 = inputs[0].get(i) * 32768.0;
- s32 samp1 = inputs[1].get(i) * 32768.0;
+ s32 samp0 = stream.get(0, i) * 32768.0;
+ s32 samp1 = stream.get(1, i) * 32768.0;
for (int adpcm = 0; adpcm < 2; adpcm++)
{
@@ -42,8 +42,8 @@ void huc6230_device::sound_stream_update(sound_stream &stream, std::vector<read_
samp1 = std::clamp(samp1 + ((channel->m_output * channel->m_rvol) >> 4), -32768, 32767);
}
- outputs[0].put_int(i, samp0, 32768);
- outputs[1].put_int(i, samp1, 32768);
+ stream.put_int(0, i, samp0, 32768);
+ stream.put_int(1, i, samp1, 32768);
}
}