mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-18 03:44:32 +01:00
Fix audio crash in FF type-0
This commit is contained in:
1 parent
0d6cfab61b
commit
c7a9c40827
1 file changed
+2
-2
@@ -215,7 +215,7 @@ void SasInstance::Mix(u32 outAddr) {
|
||||
// Figure out number of samples to read.
|
||||
int curSample = voice.samplePos / PSP_SAS_PITCH_BASE;
|
||||
int lastSample = (voice.samplePos + grainSize * voice.pitch) / PSP_SAS_PITCH_BASE;
|
||||
int numSamples = lastSample - curSample;
|
||||
u32 numSamples = lastSample - curSample;
|
||||
if (numSamples > grainSize * 4) {
|
||||
ERROR_LOG(SAS, "numSamples too large, clamping: %i vs %i", numSamples, grainSize * 4);
|
||||
numSamples = grainSize * 4;
|
||||
@@ -491,4 +491,4 @@ void ADSREnvelope::KeyOn() {
|
||||
void ADSREnvelope::KeyOff() {
|
||||
SetState(STATE_RELEASE);
|
||||
height_ = sustainLevel;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user