From 5b355c4a64300f309029d8436dd0b23ea86b4930 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sun, 26 Jan 2014 14:37:41 +0100 Subject: [PATCH] Improve comment about the sas delay --- Core/HLE/sceSas.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Core/HLE/sceSas.cpp b/Core/HLE/sceSas.cpp index 41b90ebf0..d042c5dd0 100644 --- a/Core/HLE/sceSas.cpp +++ b/Core/HLE/sceSas.cpp @@ -131,12 +131,13 @@ u32 _sceSasCore(u32 core, u32 outAddr) { bool ret = sas->Mix(outAddr); // Actual delay time seems to between 240 and 1000 us, based on grain and possibly other factors. - // Let's aim low for now. + // Turns out that delaying only when there's no voicesPlayingCount fixes issue #2304. Feels a bit + // like a hack. Note that Mix() returns true in this case which is a little confusing. if (ret) { - // If voicesPlayingCount == 0 , delay 240 us and rescheldule + // If voicesPlayingCount == 0 , delay 240 us and reschedule return hleDelayResult(0, "sas core", 240); } else { - // if voicesPlayingCount > 0 , no delay + // if voicesPlayingCount > 0 , no delay return 0; } } @@ -151,12 +152,13 @@ u32 _sceSasCoreWithMix(u32 core, u32 inoutAddr, int leftVolume, int rightVolume) bool ret = sas->Mix(inoutAddr, inoutAddr, leftVolume, rightVolume); // Actual delay time seems to between 240 and 1000 us, based on grain and possibly other factors. - // Let's aim low for now. + // Turns out that delaying only when there's no voicesPlayingCount fixes issue #2304. Feels a bit + // like a hack. Note that Mix() returns true in this case which is a little confusing. if (ret) { - // If voicesPlayingCount == 0 , delay 240 us and rescheldule + // If voicesPlayingCount == 0 , delay 240 us and reschedule return hleDelayResult(0, "sas core", 240); } else { - // if voicesPlayingCount > 0 , no delay + // if voicesPlayingCount > 0 , no delay return 0; } }