summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/sound/mos6560.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/mos6560.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/mos6560.cpp')
-rw-r--r--src/devices/sound/mos6560.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/devices/sound/mos6560.cpp b/src/devices/sound/mos6560.cpp
index 6434621f13d..5f77f5e0781 100644
--- a/src/devices/sound/mos6560.cpp
+++ b/src/devices/sound/mos6560.cpp
@@ -865,12 +865,11 @@ void mos6560_device::device_reset()
// sound_stream_update - handle a stream update
//-------------------------------------------------
-void mos6560_device::sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs)
+void mos6560_device::sound_stream_update(sound_stream &stream)
{
int i, v;
- auto &buffer = outputs[0];
- for (i = 0; i < buffer.samples(); i++)
+ for (i = 0; i < stream.samples(); i++)
{
v = 0;
if (TONE1_ON /*||(m_tone1pos != 0) */ )
@@ -883,7 +882,7 @@ void mos6560_device::sound_stream_update(sound_stream &stream, std::vector<read_
if (m_tone1pos >= m_tone1samples)
{
m_tone1pos = 0;
- m_tone1samples = buffer.sample_rate() / TONE1_FREQUENCY;
+ m_tone1samples = stream.sample_rate() / TONE1_FREQUENCY;
if (m_tone1samples == 0)
m_tone1samples = 1;
}
@@ -899,7 +898,7 @@ void mos6560_device::sound_stream_update(sound_stream &stream, std::vector<read_
if (m_tone2pos >= m_tone2samples)
{
m_tone2pos = 0;
- m_tone2samples = buffer.sample_rate() / TONE2_FREQUENCY;
+ m_tone2samples = stream.sample_rate() / TONE2_FREQUENCY;
if (m_tone2samples == 0)
m_tone2samples = 1;
}
@@ -915,7 +914,7 @@ void mos6560_device::sound_stream_update(sound_stream &stream, std::vector<read_
if (m_tone3pos >= m_tone3samples)
{
m_tone3pos = 0;
- m_tone3samples = buffer.sample_rate() / TONE3_FREQUENCY;
+ m_tone3samples = stream.sample_rate() / TONE3_FREQUENCY;
if (m_tone3samples == 0)
m_tone3samples = 1;
}
@@ -935,6 +934,6 @@ void mos6560_device::sound_stream_update(sound_stream &stream, std::vector<read_
v = 8191;
else if (v < -8191)
v = -8191;
- buffer.put_int(i, v, 8192);
+ stream.put_int(0, i, v, 8192);
}
}