Make the FFT Anaylsis optional and disabled by default until further discussion.
authorTim Mayberry <mojofunk@gmail.com>
Mon, 13 Mar 2006 03:27:58 +0000 (03:27 +0000)
committerTim Mayberry <mojofunk@gmail.com>
Mon, 13 Mar 2006 03:27:58 +0000 (03:27 +0000)
git-svn-id: svn://localhost/trunk/ardour2@386 d708f5d6-7413-0410-9779-e7cbd77b26cf

SConstruct
gtk2_ardour/SConscript
gtk2_ardour/editor.cc
gtk2_ardour/editor.h

index da4d446ae6d4794abdf13f9973bab576b6d3c400..e0e4042d22ab31cd23724e55d7b3c2f5fc8f9c8d 100644 (file)
@@ -34,7 +34,8 @@ opts.AddOptions(
     BoolOption('VST', 'Compile with support for VST', 0),
     BoolOption('VERSIONED', 'Add version information to ardour/gtk executable name inside the build directory', 0),
     EnumOption('DIST_TARGET', 'Build target for cross compiling packagers', 'auto', allowed_values=('auto', 'i386', 'i686', 'x86_64', 'powerpc', 'tiger', 'panther', 'none' ), ignorecase=2),
-    BoolOption('FPU_OPTIMIZATION', 'Build runtime checked assembler code', 1)
+    BoolOption('FPU_OPTIMIZATION', 'Build runtime checked assembler code', 1),
+       BoolOption('FFT_ANALYSIS', 'Include FFT analysis window', 0)
   )
 
 #----------------------------------------------------------------------
@@ -361,8 +362,9 @@ libraries['raptor'].ParseConfig('pkg-config --cflags --libs raptor')
 libraries['samplerate'] = LibraryInfo()
 libraries['samplerate'].ParseConfig('pkg-config --cflags --libs samplerate')
 
-libraries['fftw3f'] = LibraryInfo()
-libraries['fftw3f'].ParseConfig('pkg-config --cflags --libs fftw3f')
+if env['FFT_ANALYSIS']: 
+       libraries['fftw3f'] = LibraryInfo()
+       libraries['fftw3f'].ParseConfig('pkg-config --cflags --libs fftw3f')
 
 libraries['jack'] = LibraryInfo()
 libraries['jack'].ParseConfig('pkg-config --cflags --libs jack')
index afcb92b8e841205e74f701f22ef9d45a0629d560..ac58fe3f24434579fe32d99419c96f3faffb97d6 100644 (file)
@@ -44,12 +44,14 @@ gtkardour.Merge ([
     libraries['xml'],
     libraries['soundtouch'],
     libraries['samplerate'],
-       libraries['fftw3f'],
     libraries['jack'],
     libraries['glade2'],
     libraries['libglademm']
 ])
 
+if gtkardour['FFT_ANALYSIS']:
+       gtkardour.Merge ([libraries['fftw3f']])
+
 if gtkardour['VST']:
     gtkardour.Merge ([ libraries['fst']])
 
@@ -176,6 +178,9 @@ utils.cc
 version.cc
 visual_time_axis.cc
 waveview.cc
+""")
+
+fft_analysis_files=Split("""
 analysis_window.cc
 fft_graph.cc
 fft_result.cc
@@ -199,6 +204,10 @@ vst_files = [ 'vst_pluginui.cc' ]
 if env['VST']:
    extra_sources += vst_files
 
+if env['FFT_ANALYSIS']:
+       extra_sources += fft_analysis_files
+
+
 intl_files += extra_sources
 
 gtkardour.Append(CCFLAGS="-D_REENTRANT -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE")
index f10492ce2d151e0d212bbb79093f5769ac124651..88f1d05f3b9b2df076e7be9842cd9a8a5d2fa5dd 100644 (file)
 #include "canvas_impl.h"
 #include "actions.h"
 #include "gui_thread.h"
+
+#ifdef FFT_ANALYSIS
 #include "analysis_window.h"
+#endif
 
 #include "i18n.h"
 
@@ -252,7 +255,11 @@ Editor::Editor (AudioEngine& eng)
        canvas_height = 0;
        autoscroll_timeout_tag = -1;
        interthread_progress_window = 0;
+
+#ifdef FFT_ANALYSIS
        analysis_window = 0;
+#endif
+
        current_interthread_info = 0;
        _show_measures = true;
        _show_waveforms = true;
@@ -1170,8 +1177,10 @@ Editor::connect_to_session (Session *t)
        _playlist_selector->set_session (session);
        nudge_clock.set_session (session);
 
+#ifdef FFT_ANALYSIS
        if (analysis_window != 0)
                analysis_window->set_session (session);
+#endif
 
        switch (session->get_edit_mode()) {
        case Splice:
@@ -1589,6 +1598,7 @@ Editor::build_track_crossfade_context_menu (jack_nframes_t frame)
        return &track_crossfade_context_menu;
 }
 
+#ifdef FFT_ANALYSIS
 void
 Editor::analyze_region_selection()
 {
@@ -1624,7 +1634,7 @@ Editor::analyze_range_selection()
        
        analysis_window->present();
 }
-
+#endif /* FFT_ANALYSIS */
 
 
 
@@ -1729,7 +1739,11 @@ Editor::add_region_context_items (StreamView* sv, Region* region, Menu_Helpers::
        items.push_back (MenuElem (_("Audition"), mem_fun(*this, &Editor::audition_selected_region)));
        items.push_back (MenuElem (_("Export"), mem_fun(*this, &Editor::export_region)));
        items.push_back (MenuElem (_("Bounce"), mem_fun(*this, &Editor::bounce_region_selection)));
+
+#ifdef FFT_ANALYSIS
        items.push_back (MenuElem (_("Analyze region"), mem_fun(*this, &Editor::analyze_region_selection)));
+#endif
+
        items.push_back (SeparatorElem());
 
        /* XXX hopefully this nonsense will go away with SigC++ 2.X, where the compiler
@@ -1836,8 +1850,12 @@ Editor::add_selection_context_items (Menu_Helpers::MenuList& edit_items)
 
        items.push_back (MenuElem (_("Play range"), mem_fun(*this, &Editor::play_selection)));
        items.push_back (MenuElem (_("Loop range"), mem_fun(*this, &Editor::set_route_loop_selection)));
+
+#ifdef FFT_ANALYSIS
        items.push_back (SeparatorElem());
        items.push_back (MenuElem (_("Analyze range"), mem_fun(*this, &Editor::analyze_range_selection)));
+#endif
+       
        items.push_back (SeparatorElem());
        items.push_back (MenuElem (_("Separate range to track"), mem_fun(*this, &Editor::separate_region_from_selection)));
        items.push_back (MenuElem (_("Separate range to region list"), mem_fun(*this, &Editor::new_region_from_selection)));
index e729a27fc110b95d4aa18727de7c33632f7664cf..ecf9da747d14fb4b64f53cc30d98c2ce24574f79 100644 (file)
@@ -102,7 +102,9 @@ class AutomationSelection;
 class MixerStrip;
 class StreamView;
 class ControlPoint;
+#ifdef FFT_ANALYSIS
 class AnalysisWindow;
+#endif
 
 /* <CMT Additions> */
 class ImageFrameView;
@@ -226,9 +228,11 @@ class Editor : public PublicEditor
        void set_show_measures (bool yn);
        bool show_measures () const { return _show_measures; }
 
+#ifdef FFT_ANALYSIS
        /* analysis window */
        void analyze_region_selection();
        void analyze_range_selection();
+#endif
 
        /* export */
 
@@ -982,7 +986,10 @@ class Editor : public PublicEditor
        void interthread_cancel_clicked ();
        void build_interthread_progress_window ();
        ARDOUR::InterThreadInfo* current_interthread_info;
+
+#ifdef FFT_ANALYSIS
        AnalysisWindow* analysis_window;
+#endif
 
        /* import specific info */