mirror of
https://github.com/libretro/ppsspp.git
synced 2024-12-04 07:00:51 +00:00
Fix audio regression: Don't "WalkCurve" on state OFF
This commit is contained in:
parent
dda6a39b6f
commit
2c9a1123f0
@ -804,23 +804,26 @@ void ADSREnvelope::SetState(ADSRState state) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ADSREnvelope::Step() {
|
void ADSREnvelope::Step() {
|
||||||
WalkCurve(type_);
|
|
||||||
switch (state_) {
|
switch (state_) {
|
||||||
case STATE_ATTACK:
|
case STATE_ATTACK:
|
||||||
|
WalkCurve(type_);
|
||||||
if (height_ > PSP_SAS_ENVELOPE_HEIGHT_MAX || height_ < 0)
|
if (height_ > PSP_SAS_ENVELOPE_HEIGHT_MAX || height_ < 0)
|
||||||
SetState(STATE_DECAY);
|
SetState(STATE_DECAY);
|
||||||
break;
|
break;
|
||||||
case STATE_DECAY:
|
case STATE_DECAY:
|
||||||
|
WalkCurve(type_);
|
||||||
if (height_ > PSP_SAS_ENVELOPE_HEIGHT_MAX || height_ < sustainLevel)
|
if (height_ > PSP_SAS_ENVELOPE_HEIGHT_MAX || height_ < sustainLevel)
|
||||||
SetState(STATE_SUSTAIN);
|
SetState(STATE_SUSTAIN);
|
||||||
break;
|
break;
|
||||||
case STATE_SUSTAIN:
|
case STATE_SUSTAIN:
|
||||||
|
WalkCurve(type_);
|
||||||
if (height_ <= 0) {
|
if (height_ <= 0) {
|
||||||
height_ = 0;
|
height_ = 0;
|
||||||
SetState(STATE_RELEASE);
|
SetState(STATE_RELEASE);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case STATE_RELEASE:
|
case STATE_RELEASE:
|
||||||
|
WalkCurve(type_);
|
||||||
if (height_ <= 0) {
|
if (height_ <= 0) {
|
||||||
height_ = 0;
|
height_ = 0;
|
||||||
SetState(STATE_OFF);
|
SetState(STATE_OFF);
|
||||||
|
Loading…
Reference in New Issue
Block a user