fix crash when resampling using BLEP algo
if data16 had nothing
This commit is contained in:
parent
c0c3d03dd1
commit
8b39f00d73
|
@ -892,10 +892,10 @@ bool DivSample::resampleBlep(double r) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (int i=0; i<finalCount; i++) {
|
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<-128) result=-128;
|
||||||
if (result>127) result=127;
|
if (result>127) result=127;
|
||||||
data16[i]=round(result);
|
data8[i]=round(result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
delete[] floatData;
|
delete[] floatData;
|
||||||
|
|
Loading…
Reference in a new issue