Including Darrick's Anit-Clip-Device and limiting Lowpass Freq to 0.99
authorterminatorX <>
Mon, 25 Nov 2002 23:33:29 +0000 (23:33 +0000)
committerterminatorX <>
Mon, 25 Nov 2002 23:33:29 +0000 (23:33 +0000)
for even less clicking - Alex

terminatorX/src/tX_seqpar.cc
terminatorX/src/tX_vtt.cc

index 57d5306a81ab4b7fe0abeebe3a3a09cffcbc19dc..ddd55c60e299341ffec754233fe4e0ba08967e10 100644 (file)
@@ -679,7 +679,7 @@ const char * tX_seqpar_vtt_lp_reso :: get_name()
 
 tX_seqpar_vtt_lp_freq :: tX_seqpar_vtt_lp_freq()
 {
-       set_mapping_parameters(1.0, 0, TX_SEQPAR_DEFAULT_SCALE, 1);
+       set_mapping_parameters(0.99, 0, TX_SEQPAR_DEFAULT_SCALE, 1);
 }
 
 float tX_seqpar_vtt_lp_freq :: get_value() { return tt->lp_freq; }
index 17552221aba157d358d984088bf8617f44c787d2..ac9f0ec3b180fe2bb82ae337af897d953c1a4bc5 100644 (file)
@@ -1206,6 +1206,14 @@ int16_t * vtt_class :: render_all_turntables()
                        for (sample=0; sample<samples_in_mix_buffer; sample+=2)
                        {                               
                                temp=mix_buffer[sample];
+
+#ifndef TX_DO_CLIP
+#define FL_SHRT_MAX 32767.0
+#define FL_SHRT_MIN -32768.0
+                               if(temp < FL_SHRT_MIN) temp = FL_SHRT_MIN;
+                               else if (temp > FL_SHRT_MAX) temp = FL_SHRT_MAX;
+#endif                                 
+
                                mix_out_buffer[sample]=(int16_t) temp;
                        
                                if (temp>max) max=temp;
@@ -1223,6 +1231,12 @@ int16_t * vtt_class :: render_all_turntables()
                        for (sample=1; sample<samples_in_mix_buffer; sample+=2)
                        {                               
                                temp=mix_buffer[sample];
+
+#ifndef TX_DO_CLIP
+                               if(temp < FL_SHRT_MIN) temp = FL_SHRT_MIN;
+                               else if (temp > FL_SHRT_MAX) temp = FL_SHRT_MAX;
+#endif
+                               
                                mix_out_buffer[sample]=(int16_t) temp;
                        
                                if (temp>max) max=temp;