change software clipping range
some ASIO drivers overflow when given a 1.0 or -1.0 sample. this changes the range to -0.9999 - 0.9999, which prevents overflow with imperceptible impact on output.
This commit is contained in:
parent
54a2507780
commit
808523b9c6
1 changed files with 2 additions and 2 deletions
|
|
@ -3394,8 +3394,8 @@ void DivEngine::nextBuf(float** in, float** out, int inChans, int outChans, unsi
|
|||
if (clampSamples) {
|
||||
for (size_t i=0; i<size; i++) {
|
||||
for (int j=0; j<outChans; j++) {
|
||||
if (out[j][i]<-1.0) out[j][i]=-1.0;
|
||||
if (out[j][i]>1.0) out[j][i]=1.0;
|
||||
if (out[j][i]<-0.9999) out[j][i]=-0.9999;
|
||||
if (out[j][i]>0.9999) out[j][i]=0.9999;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue