mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Drop height to 0 when VAG ends.
Otherwise we will set it to !playing and never step the height. Should fix Yu-Gi-Oh again. Probably release before was miscalculated as 0 which is why it worked before.
This commit is contained in:
parent
b6d54bbdc4
commit
a14850c16b
2 changed files with 9 additions and 2 deletions
|
@ -367,7 +367,8 @@ void SasVoice::ReadSamples(s16 *output, int numSamples) {
|
|||
// NOTICE_LOG(SCESAS, "Hit end of VAG audio");
|
||||
playing = false;
|
||||
on = false; // ??
|
||||
envelope.KeyOff();
|
||||
// TODO: Should this remain on somehow or just hit rock bottom immediately?
|
||||
envelope.End();
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -396,7 +397,7 @@ void SasVoice::ReadSamples(s16 *output, int numSamples) {
|
|||
// Hit atrac3 voice end
|
||||
playing = false;
|
||||
on = false; // ??
|
||||
envelope.KeyOff();
|
||||
envelope.End();
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -880,6 +881,11 @@ void ADSREnvelope::KeyOff() {
|
|||
height_ = sustainLevel;
|
||||
}
|
||||
|
||||
void ADSREnvelope::End() {
|
||||
SetState(STATE_OFF);
|
||||
height_ = 0;
|
||||
}
|
||||
|
||||
void ADSREnvelope::DoState(PointerWrap &p) {
|
||||
auto s = p.Section("ADSREnvelope", 1);
|
||||
if (!s) {
|
||||
|
|
|
@ -139,6 +139,7 @@ public:
|
|||
|
||||
void KeyOn();
|
||||
void KeyOff();
|
||||
void End();
|
||||
|
||||
void Step();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue