From cef6157803320544651bfc96457d2f8a6df0abd6 Mon Sep 17 00:00:00 2001 From: Olivier Galibert Date: Mon, 14 Apr 2025 11:31:53 +0200 Subject: New sound infrastructure. 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 --- src/devices/sound/huc6230.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/devices/sound/huc6230.cpp') 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 const &inputs, std::vector &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::vectorm_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); } } -- cgit v1.2.3-70-g09d2