Prevent endless read of silent files
[ardour.git] / gtk2_ardour / analysis_window.cc
index f3d3036c73bd593834eca1bb48bdad1a8577b3fe..91e6d133624a4479415cf9732f6a59c0e0f5f36b 100644 (file)
@@ -36,7 +36,7 @@
 #include "selection.h"
 #include "audio_region_view.h"
 
-#include "i18n.h"
+#include "pbd/i18n.h"
 
 using namespace ARDOUR;
 using namespace PBD;
@@ -45,12 +45,12 @@ AnalysisWindow::AnalysisWindow()
        : source_selection_label       (_("Signal source"))
        , source_selection_ranges_rb   (_("Selected ranges"))
        , source_selection_regions_rb  (_("Selected regions"))
-       , show_minmax_button     (_("Show frequency power range"))
-       , show_normalized_button (_("Fit dB range"))
-       , show_proportional_button (_("Proportional Spectum, -18dB"))
-       , fft_graph (16384)
+       , show_minmax_button           (_("Show frequency power range"))
+       , show_normalized_button       (_("Fit dB range"))
+       , show_proportional_button     (_("Proportional Spectrum, -18dB"))
+       , fft_graph                    (16384)
 {
-       set_name(_("FFT analysis window"));
+       set_name  (_("FFT analysis window"));
        set_title (_("Spectral Analysis"));
 
        track_list_ready = false;
@@ -255,12 +255,12 @@ AnalysisWindow::analyze_data (Gtk::Button * /*button*/)
 
                                // std::cerr << "Analyzing ranges on track " << rui->route()->name() << std::endl;
 
-                               FFTResult *res = fft_graph.prepareResult(rui->color(), rui->route()->name());
+                               FFTResult *res = fft_graph.prepareResult(rui->route_color(), rui->route()->name());
                                for (std::list<AudioRange>::iterator j = ts.begin(); j != ts.end(); ++j) {
 
                                        int n;
                                        for (int channel = 0; channel < n_inputs; channel++) {
-                                               framecnt_t x = 0;
+                                               samplecnt_t x = 0;
 
                                                while (x < j->length()) {
                                                        // TODO: What about stereo+ channels? composite all to one, I guess
@@ -290,7 +290,7 @@ AnalysisWindow::analyze_data (Gtk::Button * /*button*/)
                                Gtk::TreeModel::Row newrow = *(tlmodel)->append();
                                newrow[tlcols.trackname]   = rui->route()->name();
                                newrow[tlcols.visible]     = true;
-                               newrow[tlcols.color]       = rui->color();
+                               newrow[tlcols.color]       = rui->route_color ();
                                newrow[tlcols.graph]       = res;
                        }
                } else if (source_selection_regions_rb.get_active()) {
@@ -313,8 +313,8 @@ AnalysisWindow::analyze_data (Gtk::Button * /*button*/)
                                int n;
                                for (unsigned int channel = 0; channel < arv->region()->n_channels(); channel++) {
 
-                                       framecnt_t x = 0;
-                                       framecnt_t length = arv->region()->length();
+                                       samplecnt_t x = 0;
+                                       samplecnt_t length = arv->region()->length();
 
                                        while (x < length) {
                                                // TODO: What about stereo+ channels? composite all to one, I guess