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/sound/tms3615.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/sound/tms3615.cpp')
-rw-r--r-- | src/devices/sound/tms3615.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/devices/sound/tms3615.cpp b/src/devices/sound/tms3615.cpp index 3f595c8a97b..5cdf269f77e 100644 --- a/src/devices/sound/tms3615.cpp +++ b/src/devices/sound/tms3615.cpp @@ -49,17 +49,14 @@ void tms3615_device::device_start() // sound_stream_update - handle a stream update //------------------------------------------------- -void tms3615_device::sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs) +void tms3615_device::sound_stream_update(sound_stream &stream) { - auto &buffer8 = outputs[FOOTAGE_8]; - auto &buffer16 = outputs[FOOTAGE_16]; + int samplerate = stream.sample_rate(); - int samplerate = buffer8.sample_rate(); - - constexpr stream_buffer::sample_t VMAX = 1.0f / stream_buffer::sample_t(TMS3615_TONES); - for (int sampindex = 0; sampindex < buffer8.samples(); sampindex++) + constexpr sound_stream::sample_t VMAX = 1.0f / sound_stream::sample_t(TMS3615_TONES); + for (int sampindex = 0; sampindex < stream.samples(); sampindex++) { - stream_buffer::sample_t sum8 = 0, sum16 = 0; + sound_stream::sample_t sum8 = 0, sum16 = 0; for (int tone = 0; tone < TMS3615_TONES; tone++) { @@ -94,8 +91,8 @@ void tms3615_device::sound_stream_update(sound_stream &stream, std::vector<read_ } } - buffer8.put(sampindex, sum8); - buffer16.put(sampindex, sum16); + stream.put(FOOTAGE_8, sampindex, sum8); + stream.put(FOOTAGE_16, sampindex, sum16); } } |