summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/sound/tms36xx.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/tms36xx.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/tms36xx.cpp')
-rw-r--r--src/devices/sound/tms36xx.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/devices/sound/tms36xx.cpp b/src/devices/sound/tms36xx.cpp
index 08df1d03f51..e969987d129 100644
--- a/src/devices/sound/tms36xx.cpp
+++ b/src/devices/sound/tms36xx.cpp
@@ -397,19 +397,15 @@ void tms36xx_device::device_start()
// sound_stream_update - handle a stream update
//-------------------------------------------------
-void tms36xx_device::sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs)
+void tms36xx_device::sound_stream_update(sound_stream &stream)
{
int samplerate = m_samplerate;
- auto &buffer = outputs[0];
/* no tune played? */
if( !tunes[m_tune_num] || m_voices == 0 )
- {
- buffer.fill(0);
return;
- }
- for (int sampindex = 0; sampindex < buffer.samples(); sampindex++)
+ for (int sampindex = 0; sampindex < stream.samples(); sampindex++)
{
int sum = 0;
@@ -443,7 +439,7 @@ void tms36xx_device::sound_stream_update(sound_stream &stream, std::vector<read_
TONE( 0) TONE( 1) TONE( 2) TONE( 3) TONE( 4) TONE( 5)
TONE( 6) TONE( 7) TONE( 8) TONE( 9) TONE(10) TONE(11)
- buffer.put_int(sampindex, sum, 32768 * m_voices);
+ stream.put_int(0, sampindex, sum, 32768 * m_voices);
}
}