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/aica.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/aica.cpp')
-rw-r--r-- | src/devices/sound/aica.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/devices/sound/aica.cpp b/src/devices/sound/aica.cpp index f7cf5875e93..1e3eaac954e 100644 --- a/src/devices/sound/aica.cpp +++ b/src/devices/sound/aica.cpp @@ -1234,11 +1234,11 @@ s32 aica_device::UpdateSlot(AICA_SLOT *slot) return sample; } -void aica_device::DoMasterSamples(std::vector<read_stream_view> const &inputs, write_stream_view &bufl, write_stream_view &bufr) +void aica_device::DoMasterSamples(sound_stream &stream) { int i; - for (int s = 0; s < bufl.samples(); ++s) + for (int s = 0; s < stream.samples(); ++s) { s32 smpl = 0, smpr = 0; @@ -1279,7 +1279,7 @@ void aica_device::DoMasterSamples(std::vector<read_stream_view> const &inputs, w { if (EFSDL(i + 16)) // 16,17 for EXTS { - m_DSP.EXTS[i] = s16(inputs[i].get(s) * 32767.0); + m_DSP.EXTS[i] = s16(stream.get(i, s) * 32767.0); u32 Enc = ((EFPAN(i + 16)) << 0x8) | ((EFSDL(i + 16)) << 0xd); smpl += (m_DSP.EXTS[i] * m_LPANTABLE[Enc]) >> SHIFT; smpr += (m_DSP.EXTS[i] * m_RPANTABLE[Enc]) >> SHIFT; @@ -1297,9 +1297,9 @@ void aica_device::DoMasterSamples(std::vector<read_stream_view> const &inputs, w smpr = clip16(smpr >> 3); } - bufl.put_int(s, smpl * m_LPANTABLE[MVOL() << 0xd], 32768 << SHIFT); + stream.put_int(0, s, smpl * m_LPANTABLE[MVOL() << 0xd], 32768 << SHIFT); // TODO: diverges with SCSP, also wut? - bufr.put_int(s, smpr * m_LPANTABLE[MVOL() << 0xd], 32768 << SHIFT); + stream.put_int(1, s, smpr * m_LPANTABLE[MVOL() << 0xd], 32768 << SHIFT); } } @@ -1385,9 +1385,9 @@ void aica_device::exec_dma() // sound_stream_update - handle a stream update //------------------------------------------------- -void aica_device::sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs) +void aica_device::sound_stream_update(sound_stream &stream) { - DoMasterSamples(inputs, outputs[0], outputs[1]); + DoMasterSamples(stream); } //------------------------------------------------- |