diff options
author | 2025-04-14 11:31:53 +0200 | |
---|---|---|
committer | 2025-04-14 22:28:31 +0200 | |
commit | cef6157803320544651bfc96457d2f8a6df0abd6 (patch) | |
tree | f8a64867e3d654cdcad5f4c24824ea82e2c77194 /src/devices/sound/sn76496.cpp | |
parent | 9473c027358e1a2d5c93d240a48052368f9d3b84 (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/sn76496.cpp')
-rw-r--r-- | src/devices/sound/sn76496.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/devices/sound/sn76496.cpp b/src/devices/sound/sn76496.cpp index 923a1d890d8..38a0c71faf5 100644 --- a/src/devices/sound/sn76496.cpp +++ b/src/devices/sound/sn76496.cpp @@ -365,16 +365,14 @@ inline bool sn76496_base_device::in_noise_mode() return ((m_register[6] & 4)!=0); } -void sn76496_base_device::sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs) +void sn76496_base_device::sound_stream_update(sound_stream &stream) { int i; - auto *lbuffer = &outputs[0]; - auto *rbuffer = m_stereo ? &outputs[1] : nullptr; int16_t out; int16_t out2 = 0; - for (int sampindex = 0; sampindex < lbuffer->samples(); sampindex++) + for (int sampindex = 0; sampindex < stream.samples(); sampindex++) { // clock chip once if (m_current_clock > 0) // not ready for new divided clock @@ -440,9 +438,9 @@ void sn76496_base_device::sound_stream_update(sound_stream &stream, std::vector< if (m_negate) { out = -out; out2 = -out2; } - lbuffer->put_int(sampindex, out, 32768); + stream.put_int(0, sampindex, out, 32768); if (m_stereo) - rbuffer->put_int(sampindex, out2, 32768); + stream.put_int(1, sampindex, out2, 32768); } } |