hrydgard/ppsspp — pull request #5361 by unknownbrackets (2014-02-08 08:05:57+00:00)
Title: Improve SAS ADSR rates and types

This does not actually affect the envelope calculation, just the initial values as set by the __sceSasSetSimpleADSR() func and validations for the other two __sceSasSetADSR*() funcs.

The simple bitfields were not being parsed entirely correctly. Final Fantasy Tactics, at least, hits basically all of these cases. I don't have a good ear for it, but this may possibly improve some of its sound effects. It could also affect games hanging, since a couple cases produced negative or 0 rates incorrectly.

This passes some in-progress tests I have, but they depend on the sceSas struct being written properly, which I'm still not ready with.

Also adds reporting for the "Every Extend Extra" case which I can't reproduce returning success. Worried this could break things, does anyone have Every Extend Extra to verify it calls it this way still (I see from blame history that this was quite a long time ago)?

@gid15 I believe the "simple ADSR" bit stuff came from JPCSP. I checked really quick and AFAICT it's incorrect per these changes / my tests. Just FYI.

-[Unknown]