diff options
author | 2025-04-14 11:31:53 +0200 | |
---|---|---|
committer | 2025-04-14 22:28:31 +0200 | |
commit | cef6157803320544651bfc96457d2f8a6df0abd6 (patch) | |
tree | f8a64867e3d654cdcad5f4c24824ea82e2c77194 /src/devices/sound/segapcm.cpp | |
parent | 9473c027358e1a2d5c93d240a48052368f9d3b84 (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/segapcm.cpp')
-rw-r--r-- | src/devices/sound/segapcm.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/devices/sound/segapcm.cpp b/src/devices/sound/segapcm.cpp index 9f7a9b6fc63..81f6ceffec9 100644 --- a/src/devices/sound/segapcm.cpp +++ b/src/devices/sound/segapcm.cpp @@ -72,12 +72,8 @@ void segapcm_device::rom_bank_pre_change() // sound_stream_update - handle a stream update //------------------------------------------------- -void segapcm_device::sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs) +void segapcm_device::sound_stream_update(sound_stream &stream) { - /* clear the buffers */ - outputs[0].fill(0); - outputs[1].fill(0); - // reg function // ------------------------------------------------ // 0x00 ? @@ -114,7 +110,7 @@ void segapcm_device::sound_stream_update(sound_stream &stream, std::vector<read_ int i; /* loop over samples on this channel */ - for (i = 0; i < outputs[0].samples(); i++) + for (i = 0; i < stream.samples(); i++) { int8_t v; @@ -133,8 +129,8 @@ void segapcm_device::sound_stream_update(sound_stream &stream, std::vector<read_ v = read_byte(offset + (addr >> 8)) - 0x80; /* apply panning and advance */ - outputs[0].add_int(i, v * (regs[2] & 0x7f), 32768); - outputs[1].add_int(i, v * (regs[3] & 0x7f), 32768); + stream.add_int(0, i, v * (regs[2] & 0x7f), 32768); + stream.add_int(1, i, v * (regs[3] & 0x7f), 32768); addr = (addr + regs[7]) & 0xffffff; } |