>From cde634a52cee52ddab01f50b344ce851e7763559 Mon Sep 17 00:00:00 2001
From: "Jonatan \"jaw\" Wallmander" <jonatan@vovoid.com>
Date: Mon, 12 Mar 2012 22:04:47 +0100
Subject: [PATCH 2/2] Cleaned out some debug printfs

---
 modules/visualization/cyclic_buffer.h |    7 -------
 modules/visualization/vsxu.cpp        |    8 ++------
 2 files changed, 2 insertions(+), 13 deletions(-)

diff --git a/modules/visualization/cyclic_buffer.h b/modules/visualization/cyclic_buffer.h
index 4610aed..c020133 100644
--- a/modules/visualization/cyclic_buffer.h
+++ b/modules/visualization/cyclic_buffer.h
@@ -29,11 +29,9 @@ class block_holder
 public:
     float data[512]; // data holder
     mtime_t pts; // machine time when this is to be played
-//    size_t size; // data elements written
     block_holder()
     {
         pts = 0; // max_int 64-bit
-//        size = 0;
     }
 };
 
@@ -61,14 +59,11 @@ public:
               )
         {
             consumer_pos++;
-            //printf("----------------------step %f\n",(float)cycl_buffer[consumer_pos].pts*0.000001f);
             if (consumer_pos == CYCLIC_BUFFER_SIZE)
             {
                 consumer_pos = 0;
             }
         }
-        //printf("consumer_pos                               %d                     %f\n",consumer_pos,(float)cur_machine_time*0.000001);
-        //printf("                                                                  %f\n",(float)cycl_buffer[consumer_pos].pts*0.000001);
         return &cycl_buffer[consumer_pos];
     }
 
@@ -79,7 +74,6 @@ public:
       {
           insertion_pos = 0;
       }
-      //printf("insertion_pos                %d\n",insertion_pos);
       return &cycl_buffer[insertion_pos];
   }
 
@@ -88,7 +82,6 @@ public:
       for (size_t i = 0; i < CYCLIC_BUFFER_SIZE; i++)
       {
           cycl_buffer[i].pts = 0;
-//          cycl_buffer[i].size = 0;
           consumer_pos = 0;
           insertion_pos = 0;
       }
diff --git a/modules/visualization/vsxu.cpp b/modules/visualization/vsxu.cpp
index 13f6c0f..2ae2d0d 100644
--- a/modules/visualization/vsxu.cpp
+++ b/modules/visualization/vsxu.cpp
@@ -236,7 +236,6 @@ static block_t *DoWork( filter_t *p_filter, block_t *p_in_buf )
     {
         p_sys->i_nb_samples = __MIN( p_sys->i_buffer_size,
                                      p_in_buf->i_nb_samples );
-        //printf("dowork in samples: %d\n",p_in_buf->i_nb_samples);
 
         const float *p_src = (float*)p_in_buf->p_buffer;
         // iterate block holder
@@ -244,7 +243,6 @@ static block_t *DoWork( filter_t *p_filter, block_t *p_in_buf )
 
         // calc 512-byte-aligned sample count to grab, we don't need more
         unsigned i_num_samples = p_sys->i_nb_samples - p_sys->i_nb_samples % 512;
-        //printf("num samples: %d\n",num_samples);
 
         // muls are cheaper than divs
         float f_onedivchannels = 1.0f / p_sys->i_channels;
@@ -264,16 +262,13 @@ static block_t *DoWork( filter_t *p_filter, block_t *p_in_buf )
             i_bh_data_iter++;
             if (i_bh_data_iter == 512 && i < i_num_samples-256)
             {
-                //printf("starting on next 512\n");
                 p_block_holder = vsxu_cyclic_buffer.get_insertion_object();
                 p_block_holder->pts = p_in_buf->i_pts + 11609;
-                //printf("eob %f\n",(float)p_block_holder->pts*0.000001);
 
                 i_bh_data_iter = 0;
             }
             p_sys->p_buffer[i] = f_v * f_onedivchannels;
         }
-        //printf("eob %f\n",(float)bh->pts*0.000001);
     }
 
     vlc_mutex_unlock( &cyclic_block_mutex );
@@ -381,7 +376,6 @@ static void *Thread( void *p_data )
 
         /* Render the image and swap the buffers */
         vlc_mutex_lock( &p_sys->lock );
-        //printf("number of samples gotten: %d\n",p_sys->i_nb_samples);
         if( p_sys->i_nb_samples > 0 )
         {
             p_sys->i_nb_samples = 0;
@@ -392,6 +386,7 @@ static void *Thread( void *p_data )
 
             // stop vsxu
             manager->stop();
+
             // call abstract factory to destruct our manager object
             manager_destroy( manager );
 
@@ -419,6 +414,7 @@ static void *Thread( void *p_data )
         {
             // only run this once
             first = false;
+
             // create a new manager
             manager = manager_factory();
 
-- 
1.7.5.4

