mirror of
https://github.com/libretro/ppsspp.git
synced 2025-01-18 22:53:08 +00:00
Fix audio crash in FF type-0
This commit is contained in:
parent
0d6cfab61b
commit
c7a9c40827
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user