From 714754e14996b6fd86b51985b9a9b79c7f83ace5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Thu, 7 Nov 2013 11:49:40 +0100 Subject: [PATCH] sceAudio: only use the optimized volume=max path if stereo, add a TODO. Might take care of #4470. --- Core/HLE/__sceAudio.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Core/HLE/__sceAudio.cpp b/Core/HLE/__sceAudio.cpp index fd242a38de..9396b46d9c 100644 --- a/Core/HLE/__sceAudio.cpp +++ b/Core/HLE/__sceAudio.cpp @@ -207,7 +207,9 @@ u32 __AudioEnqueue(AudioChannel &chan, int chanNum, bool blocking) { int leftVol = chan.leftVolume; int rightVol = chan.rightVolume; - if (leftVol == (1 << 15) && rightVol == (1 << 15) && IS_LITTLE_ENDIAN) { + if (leftVol == (1 << 15) && rightVol == (1 << 15) && chan.format == PSP_AUDIO_FORMAT_STEREO && IS_LITTLE_ENDIAN) { + // TODO: Add mono->stereo conversion to this path. + // Good news: the volume doesn't affect the values at all. // We can just do a direct memory copy. const u32 totalSamples = chan.sampleCount * (chan.format == PSP_AUDIO_FORMAT_STEREO ? 2 : 1);