I've been attacking the envelope problems a bit more, mostly targeting problems with Radiant Silvergun, and I've came up with some more fixes. One problem I discovered is that if a slot was already in the release state, keying it off stopped it cold - this shouldn't be happening.
Changes: -Prevented keyoffs from killing slots when already in the release state -Envelope steps in the attack state are apparently exponential. To account for this, I change the envelope output to linear for attacks. -Change the release rate calculation to use the decay table instead of the attack one.
Also, I noticed in the MAME scsp.c source that the 16-bit PCM sample fix I posted earlier in this thread didn't get put in. Radiant Silvergun will need it for correct sound playback.
Here's the fix again, slightly modified so that it compiles without warnings in MAME (strict C90 compliance):