fix crash when resampling using BLEP algo

if data16 had nothing
This commit is contained in:
tildearrow 2023-04-20 02:32:20 -05:00
parent c0c3d03dd1
commit 8b39f00d73

View file

@ -892,10 +892,10 @@ bool DivSample::resampleBlep(double r) {
}
}
for (int i=0; i<finalCount; i++) {
float result=floatData[i]+data16[i];
float result=floatData[i]+data8[i];
if (result<-128) result=-128;
if (result>127) result=127;
data16[i]=round(result);
data8[i]=round(result);
}
}
delete[] floatData;