Counters should be unsigned.
authorAlexander Koenig <alex@lisas.de>
Fri, 17 Jun 2016 21:25:21 +0000 (23:25 +0200)
committerAlexander Koenig <alex@lisas.de>
Fri, 17 Jun 2016 21:25:21 +0000 (23:25 +0200)
src/tX_vtt.cc
src/tX_vtt.h
src/tX_vttfx.cc

index 72b4d72fb02c43843346273b49feaabf8c674aa5..d2462b6e5ac5a77df60c5465bb7f55b97af1410e 100644 (file)
@@ -72,7 +72,7 @@ f_prec * vtt_class::mix_buffer=NULL;
 f_prec * vtt_class::mix_buffer_end=NULL;
 int vtt_class::solo_ctr=0;
 
-int vtt_class::samples_in_mix_buffer=0;
+unsigned int vtt_class::samples_in_mix_buffer=0;
 pthread_mutex_t vtt_class::render_lock=PTHREAD_MUTEX_INITIALIZER;
 f_prec vtt_class::master_volume=1.0;
 f_prec vtt_class::res_master_volume=1.0;
@@ -853,8 +853,8 @@ int vtt_class :: set_mix_buffer_size(int no_samples)
 int16_t * vtt_class :: render_all_turntables()
 {
        list <vtt_class *> :: iterator vtt, next;
-       int sample;
-       int mix_sample;
+       unsigned int sample;
+       unsigned int mix_sample;
        
        pthread_mutex_lock(&render_lock);
        
index feda29e0f645190120e140ccd23e22bdcea29dd1..f8179d2e06f1e36801bf6d866aef62e027c1ee7d 100644 (file)
@@ -63,7 +63,7 @@ class vtt_class
        static int16_t *mix_out_buffer;
        static f_prec mix_max_l;
        static f_prec mix_max_r;
-       static int samples_in_mix_buffer;
+       static unsigned int samples_in_mix_buffer;
        static pthread_mutex_t render_lock;
        
        static f_prec master_volume;
index 832c4acde3dcd829e443a6f4890f674ace017fe0..bb168dabf0960ed70e503acc293050cc193226ba 100644 (file)
@@ -251,7 +251,7 @@ void vtt_fx_ladspa :: run()
                f_prec wet=sp_wet->get_value();
                f_prec dry=1.0-wet;
                
-               for (int sample=0; sample < (vtt_class::samples_in_mix_buffer)>>1; sample++) {
+               for (unsigned int sample=0; sample < (vtt_class::samples_in_mix_buffer)>>1; sample++) {
                        myvtt->output_buffer[sample]=dry*myvtt->output_buffer[sample]+wet*wet_buffer[sample];
                }
        }
@@ -451,7 +451,7 @@ void vtt_fx_stereo_ladspa :: run()
                f_prec wet=sp_wet->get_value();
                f_prec dry=1.0-wet;
                
-               for (int sample=0; sample < (vtt_class::samples_in_mix_buffer)>>1; sample++) {
+               for (unsigned int sample=0; sample < (vtt_class::samples_in_mix_buffer)>>1; sample++) {
                        myvtt->output_buffer[sample]=dry*myvtt->output_buffer[sample]+wet*wet_buffer[sample];
                        myvtt->output_buffer2[sample]=dry*myvtt->output_buffer2[sample]+wet*wet_buffer2[sample];
                }