mirror of
https://codeberg.org/armin/wavetable.git
synced 2026-09-01 05:50:46 +02:00
Remove dithers
This commit is contained in:
parent
862419f88f
commit
a376041ab8
14 changed files with 356 additions and 78 deletions
|
|
@ -32,8 +32,8 @@ void DeRez2::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr
|
|||
{
|
||||
double inputSampleL = *in1;
|
||||
double inputSampleR = *in2;
|
||||
if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17;
|
||||
if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17;
|
||||
//if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17;
|
||||
//if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17;
|
||||
double drySampleL = inputSampleL;
|
||||
double drySampleR = inputSampleR;
|
||||
|
||||
|
|
@ -167,7 +167,7 @@ void DeRez2::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr
|
|||
|
||||
lastSampleL = drySampleL;
|
||||
lastSampleR = drySampleR;
|
||||
|
||||
/*
|
||||
//begin 32 bit stereo floating point dither
|
||||
int expon; frexpf((float)inputSampleL, &expon);
|
||||
fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5;
|
||||
|
|
@ -176,7 +176,8 @@ void DeRez2::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr
|
|||
fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5;
|
||||
inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
|
||||
//end 32 bit stereo floating point dither
|
||||
|
||||
*/
|
||||
|
||||
*out1 = inputSampleL;
|
||||
*out2 = inputSampleR;
|
||||
|
||||
|
|
@ -210,8 +211,8 @@ void DeRez2::processDoubleReplacing(double **inputs, double **outputs, VstInt32
|
|||
{
|
||||
double inputSampleL = *in1;
|
||||
double inputSampleR = *in2;
|
||||
if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17;
|
||||
if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17;
|
||||
//if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17;
|
||||
//if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17;
|
||||
double drySampleL = inputSampleL;
|
||||
double drySampleR = inputSampleR;
|
||||
|
||||
|
|
@ -347,6 +348,7 @@ void DeRez2::processDoubleReplacing(double **inputs, double **outputs, VstInt32
|
|||
lastSampleR = drySampleR;
|
||||
|
||||
//begin 64 bit stereo floating point dither
|
||||
/*
|
||||
//int expon; frexp((double)inputSampleL, &expon);
|
||||
fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5;
|
||||
//inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62));
|
||||
|
|
@ -354,7 +356,8 @@ void DeRez2::processDoubleReplacing(double **inputs, double **outputs, VstInt32
|
|||
fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5;
|
||||
//inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62));
|
||||
//end 64 bit stereo floating point dither
|
||||
|
||||
*/
|
||||
|
||||
*out1 = inputSampleL;
|
||||
*out2 = inputSampleR;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue