diff options
author | Chris Johnson <jinx6568@sover.net> | 2018-12-16 13:54:56 -0500 |
---|---|---|
committer | Chris Johnson <jinx6568@sover.net> | 2018-12-16 13:54:56 -0500 |
commit | 2a6e1bef6b4bd039386aa24c988f5d69364ff874 (patch) | |
tree | ef44a92cb132b9b277dcbbb5120b063213e674ae /plugins/MacAU/DitherMeDiskers/DitherMeDiskers.cpp | |
parent | b25674789c87a1564af673faff8a7ee3dfcbcaf2 (diff) | |
download | airwindows-lv2-port-2a6e1bef6b4bd039386aa24c988f5d69364ff874.tar.gz airwindows-lv2-port-2a6e1bef6b4bd039386aa24c988f5d69364ff874.tar.bz2 airwindows-lv2-port-2a6e1bef6b4bd039386aa24c988f5d69364ff874.zip |
TapeDelay (and DitherMeTimbers overs update)
Diffstat (limited to 'plugins/MacAU/DitherMeDiskers/DitherMeDiskers.cpp')
-rwxr-xr-x | plugins/MacAU/DitherMeDiskers/DitherMeDiskers.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/plugins/MacAU/DitherMeDiskers/DitherMeDiskers.cpp b/plugins/MacAU/DitherMeDiskers/DitherMeDiskers.cpp index a3a6b99..fc8ef54 100755 --- a/plugins/MacAU/DitherMeDiskers/DitherMeDiskers.cpp +++ b/plugins/MacAU/DitherMeDiskers/DitherMeDiskers.cpp @@ -184,6 +184,15 @@ void DitherMeDiskers::DitherMeDiskersKernel::Process( const Float32 *inSourceP noiseShaping += outputSample; noiseShaping -= lastSample; + if (outputSample > 32760.0) { + outputSample = 32760.0; + noiseShaping *= 0.5; + } + if (outputSample < -32760.0) { + outputSample = -32760.0; + noiseShaping *= 0.5; + } + *destP = outputSample / 32768.0; //scale it back down to 16 bit resolution sourceP += inNumChannels; |