summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/sound/sn76477.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/sn76477.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/sn76477.cpp')
-rw-r--r--src/devices/sound/sn76477.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/devices/sound/sn76477.cpp b/src/devices/sound/sn76477.cpp
index 1ed2f8b57fe..ec855769be6 100644
--- a/src/devices/sound/sn76477.cpp
+++ b/src/devices/sound/sn76477.cpp
@@ -1700,7 +1700,7 @@ void sn76477_device::state_save_register()
// sound_stream_update - handle a stream update
//-------------------------------------------------
-void sn76477_device::sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs)
+void sn76477_device::sound_stream_update(sound_stream &stream)
{
double one_shot_cap_charging_step;
double one_shot_cap_discharging_step;
@@ -1719,8 +1719,6 @@ void sn76477_device::sound_stream_update(sound_stream &stream, std::vector<read_
double voltage_out;
double center_to_peak_voltage_out;
- auto &buffer = outputs[0];
-
/* compute charging values, doing it here ensures that we always use the latest values */
one_shot_cap_charging_step = compute_one_shot_cap_charging_rate() / m_our_sample_rate;
one_shot_cap_discharging_step = compute_one_shot_cap_discharging_rate() / m_our_sample_rate;
@@ -1743,7 +1741,7 @@ void sn76477_device::sound_stream_update(sound_stream &stream, std::vector<read_
/* process 'samples' number of samples */
- for (int sampindex = 0; sampindex < buffer.samples(); sampindex++)
+ for (int sampindex = 0; sampindex < stream.samples(); sampindex++)
{
/* update the one-shot cap voltage */
if (!m_one_shot_cap_voltage_ext)
@@ -1995,7 +1993,7 @@ void sn76477_device::sound_stream_update(sound_stream &stream, std::vector<read_
sample = | ----------- - 1 |
\ Vcen - Vmin /
*/
- buffer.put(sampindex, ((voltage_out - OUT_LOW_CLIP_THRESHOLD) / (OUT_CENTER_LEVEL_VOLTAGE - OUT_LOW_CLIP_THRESHOLD)) - 1);
+ stream.put(0, sampindex, ((voltage_out - OUT_LOW_CLIP_THRESHOLD) / (OUT_CENTER_LEVEL_VOLTAGE - OUT_LOW_CLIP_THRESHOLD)) - 1);
if (LOG_WAV && (!m_enable || !LOG_WAV_ENABLED_ONLY))
{