summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/casio/pv1000.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-27 22:23:20 +0200
commitd0f1c15a0f6df2dd51a754cb46e6175b7079c8f2 (patch)
treebe35c94340442af08c316a8679089ee68e119fac /src/mame/casio/pv1000.cpp
parentec636faeba5c5841c5a4a35b7c9dc2f06a00f538 (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/mame/casio/pv1000.cpp')
-rw-r--r--src/mame/casio/pv1000.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/mame/casio/pv1000.cpp b/src/mame/casio/pv1000.cpp
index 9ce06f3af3d..5f0f7dfebae 100644
--- a/src/mame/casio/pv1000.cpp
+++ b/src/mame/casio/pv1000.cpp
@@ -32,7 +32,7 @@ protected:
virtual void device_start() override ATTR_COLD;
// sound stream update overrides
- virtual void sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs) override;
+ virtual void sound_stream_update(sound_stream &stream) override;
private:
// internal state
@@ -117,14 +117,12 @@ void pv1000_sound_device::voice_w(offs_t offset, uint8_t data)
square1 via i/o$F8 is -6dB, square2 via i/o$F9 is -3dB, defining square3 via i/o$FA as 0dB
*/
-void pv1000_sound_device::sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs)
+void pv1000_sound_device::sound_stream_update(sound_stream &stream)
{
- auto &buffer = outputs[0];
-
// Each channel has a different volume via resistor mixing which correspond to -6dB, -3dB, 0dB drops
static const int volumes[3] = { 0x1000, 0x1800, 0x2000 };
- for (int index = 0; index < buffer.samples(); index++)
+ for (int index = 0; index < stream.samples(); index++)
{
s32 sum = 0;
@@ -161,7 +159,7 @@ void pv1000_sound_device::sound_stream_update(sound_stream &stream, std::vector<
sum += m_voice[2].val * volumes[2];
}
- buffer.put_int(index, sum, 32768);
+ stream.put_int(0, index, sum, 32768);
}
}