diff options
author | 2025-04-14 11:31:53 +0200 | |
---|---|---|
committer | 2025-04-27 22:23:20 +0200 | |
commit | d0f1c15a0f6df2dd51a754cb46e6175b7079c8f2 (patch) | |
tree | be35c94340442af08c316a8679089ee68e119fac /src/devices/sound/huc6230.cpp | |
parent | ec636faeba5c5841c5a4a35b7c9dc2f06a00f538 (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/huc6230.cpp')
-rw-r--r-- | src/devices/sound/huc6230.cpp | 12 |
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); } } |