diff carfac/carfac.cc @ 641:fe8ac95fcf9e

Delete CARFAC::Run to tighten up the interface.
author ronw@google.com
date Wed, 29 May 2013 20:33:06 +0000
parents d08c02c8e26f
children 8b70f4cf00c7
line wrap: on
line diff
--- a/carfac/carfac.cc	Wed May 29 15:37:28 2013 +0000
+++ b/carfac/carfac.cc	Wed May 29 20:33:06 2013 +0000
@@ -59,30 +59,6 @@
   }
 }
 
-void CARFAC::Run(const vector<vector<float>>& sound_data,
-                 CARFACOutput* output) {
-  int n_audio_channels = sound_data.size();
-  int32_t seg_len = 441;  // We use a fixed segment length for now.
-  int32_t n_timepoints = sound_data[0].size();
-  int32_t n_segs = ceil((n_timepoints * 1.0) / seg_len);
-  // These values store the start and endpoints for each segment
-  int32_t start;
-  int32_t length = seg_len;
-  // This section loops over the individual audio segments.
-  for (int32_t i = 0; i < n_segs; ++i) {
-    // For each segment we calculate the start point and the segment length.
-    start = i * seg_len;
-    if (i == n_segs - 1) {
-      // The last segment can be shorter than the rest.
-      length = n_timepoints - start;
-    }
-    // Once we've determined the start point and segment length, we run the
-    // CARFAC model on the current segment.
-    RunSegment(sound_data, start,
-               length, false, output);
-  }
-}
-
 void CARFAC::RunSegment(const vector<vector<float>>& sound_data,
                         const int32_t start, const int32_t length,
                         const bool open_loop, CARFACOutput* seg_output) {
@@ -347,4 +323,4 @@
     previous_stage_gain = agc_coeff.agc_gain;
     decim = agc_coeff.decim;
   }
-}
\ No newline at end of file
+}