Add STATE_SUSTAIN code similar to JPCSP, should fix sound fx again in some games.

Please comment in the github commit if this breaks anything. Fixes #2189
This commit is contained in:
Henrik Rydgard committed 2013-06-10 22:18:50 +02:00
1 parent b7d279e684
commit 43af3d81d1
1 file changed
+4
+4
View File
@@ -738,6 +738,10 @@ void ADSREnvelope::Step() {
break;
case STATE_SUSTAIN:
WalkCurve(sustainRate, sustainType);
if (height_ <= 0) {
height_ = 0;
SetState(STATE_RELEASE);
}
break;
case STATE_RELEASE:
WalkCurve(releaseRate, releaseType);