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/cpu/m6502/st2205u.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/cpu/m6502/st2205u.cpp')
-rw-r--r-- | src/devices/cpu/m6502/st2205u.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/devices/cpu/m6502/st2205u.cpp b/src/devices/cpu/m6502/st2205u.cpp index 8e63a20fab4..cf7639b9aca 100644 --- a/src/devices/cpu/m6502/st2205u.cpp +++ b/src/devices/cpu/m6502/st2205u.cpp @@ -101,25 +101,19 @@ st2302u_device::st2302u_device(const machine_config &mconfig, const char *tag, d { } -void st2205u_base_device::sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs) +void st2205u_base_device::sound_stream_update(sound_stream &stream) { - // reset the output stream - outputs[0].fill(0); - outputs[1].fill(0); - outputs[2].fill(0); - outputs[3].fill(0); - - int samples = outputs[0].samples(); + int samples = stream.samples(); int outpos = 0; while (samples-- != 0) { for (int channel = 0; channel < 4; channel++) { s16 adpcm_contribution = m_adpcm_level[channel]; - outputs[channel].add_int(outpos, adpcm_contribution * 0x10, 32768); + stream.add_int(channel, outpos, adpcm_contribution * 0x10, 32768); auto psg_contribution = std::sin((double)m_psg_freqcntr[channel]/4096.0f); - outputs[channel].add_int(outpos, psg_contribution * m_psg_amplitude[channel]*0x80,32768); + stream.add_int(channel, outpos, psg_contribution * m_psg_amplitude[channel]*0x80,32768); } outpos++; |