Don't show DSP stats of inserts that don't collect them.
[ardour.git] / gtk2_ardour / fft_graph.cc
index ec54acbaaae32e18e05eef28bc9ecbfb173897af..25f6c6ff2943d7ae86be5e1c27bf51101e449d77 100644 (file)
@@ -420,8 +420,6 @@ FFTGraph::draw_scales (cairo_t* cr)
 void
 FFTGraph::redraw ()
 {
-       Glib::Threads::Mutex::Lock lm  (_a_window->track_list_lock);
-
        assert (_surface);
        cairo_t* cr = cairo_create (_surface);
 
@@ -433,6 +431,8 @@ FFTGraph::redraw ()
                return;
        }
 
+       Glib::Threads::Mutex::Lock lm  (_a_window->track_list_lock);
+
        if (!_a_window->track_list_ready) {
                cairo_destroy (cr);
                queue_draw ();
@@ -651,7 +651,7 @@ FFTGraph::on_size_allocate (Gtk::Allocation & alloc)
 void
 FFTGraph::update_size ()
 {
-       framecnt_t SR = PublicEditor::instance ().session ()->nominal_frame_rate ();
+       samplecnt_t SR = PublicEditor::instance ().session ()->nominal_sample_rate ();
        _fft_start = SR / (double)_dataSize;
        _fft_end = .5 * SR;
        _fft_log_base = logf (.5 * _dataSize);