Improve comment about the sas delay

This commit is contained in:
Henrik Rydgård 2014-01-26 14:37:41 +01:00
parent 7701784608
commit 5b355c4a64

View File

@ -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;
}
}