From c255f112dbaf2cfeadf87ad806ea149d7dfd8338 Mon Sep 17 00:00:00 2001 From: MarcZX10 <67475268+MarcZX10@users.noreply.github.com> Date: Wed, 28 Oct 2026 19:29:07 +0000 Subject: [PATCH] feat(libSceAudioOut): apply the host volume where AudioOut2 hands PCM to the device DeviceCallback applies the context's ramp to the stereo float it just filled, which is the only place the AudioOut2 main mix reaches the speakers; the title's own volumes and the mastering stay before it. At the default volume the ramp is at unity and the call returns without touching the stream. The controller sound card keeps its own path and is not touched. --- core/libs/prx/libSceAudioOut/src/AudioOut2Context.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/libs/prx/libSceAudioOut/src/AudioOut2Context.cpp b/core/libs/prx/libSceAudioOut/src/AudioOut2Context.cpp index c2149823d0..1cc02766fe 100644 --- a/core/libs/prx/libSceAudioOut/src/AudioOut2Context.cpp +++ b/core/libs/prx/libSceAudioOut/src/AudioOut2Context.cpp @@ -17,6 +17,7 @@ #include "prx/libc/include/PreciseWait.hpp" #include "prx/libc/include/Shutdown.hpp" #include "AudioOut2Internal.hpp" +#include "prx/libSceAudioOut/include/HostVolumeControl.hpp" #include "AudioOutShutdown.hpp" #include "prx/libSceAudioOut/include/AudioOutSdl.hpp" #include "prx/libScePad/include/PadState.hpp" @@ -263,6 +264,7 @@ static void DeviceCallback(void* userdata, Uint8* stream, int length) { std::copy_n(context.output.begin(), count, out); context.output.erase(context.output.begin(), context.output.begin() + static_cast(count)); std::fill(out + count, out + samples, 0.0f); + context.hostGain.Apply(out, samples / AUDIO_OUT2_OUTPUT_CHANNELS, AUDIO_OUT2_OUTPUT_CHANNELS, HostVolumeGain_nid_no_patch()); if (count < samples && !context.priming) { context.priming = true; context.primes++;