summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/sound/gb.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/devices/sound/gb.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/devices/sound/gb.cpp')
-rw-r--r--src/devices/sound/gb.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/devices/sound/gb.cpp b/src/devices/sound/gb.cpp
index 81541884162..d8a965e0aa1 100644
--- a/src/devices/sound/gb.cpp
+++ b/src/devices/sound/gb.cpp
@@ -1307,11 +1307,9 @@ constexpr s32 convert_output(s32 sample)
// sound_stream_update - handle a stream update
//-------------------------------------------------
-void gameboy_sound_device::sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs)
+void gameboy_sound_device::sound_stream_update(sound_stream &stream)
{
- auto &outputl = outputs[0];
- auto &outputr = outputs[1];
- for (int sampindex = 0; sampindex < outputl.samples(); sampindex++)
+ for (int sampindex = 0; sampindex < stream.samples(); sampindex++)
{
s32 sample;
s32 left = 0;
@@ -1362,7 +1360,7 @@ void gameboy_sound_device::sound_stream_update(sound_stream &stream, std::vector
right *= 1 + m_snd_control.vol_right;
/* Update the buffers */
- outputl.put_int(sampindex, left, 15 * 4 * (1 + 7));
- outputr.put_int(sampindex, right, 15 * 4 * (1 + 7));
+ stream.put_int(0, sampindex, left, 15 * 4 * (1 + 7));
+ stream.put_int(1, sampindex, right, 15 * 4 * (1 + 7));
}
}