2 level structure for theme manager window, to help with all these buttons
[ardour.git] / libs / ardour / globals.cc
index 6e6dd7085673026f1c64f27264e6122cf36c3a32..0a4ec4cab3cbc4d8b1e1e48e4e535ae0d62a0166 100644 (file)
 #include <fst.h>
 #endif
 
-#ifdef HAVE_AUDIOUNITS
+#ifdef LXVST_SUPPORT
+#include "ardour/vstfx.h"
+#endif
+
+#ifdef AUDIOUNIT_SUPPORT
 #include "ardour/audio_unit.h"
 #endif
 
@@ -290,6 +294,9 @@ ARDOUR::init (bool use_vst, bool try_optimization)
        }
 
        Config->set_use_vst (use_vst);
+#ifdef LXVST_SUPPORT
+       Config->set_use_lxvst(true);
+#endif
 
        Profile = new RuntimeProfile;
 
@@ -300,7 +307,13 @@ ARDOUR::init (bool use_vst, bool try_optimization)
        }
 #endif
 
-#ifdef HAVE_AUDIOUNITS
+#ifdef LXVST_SUPPORT
+       if (Config->get_use_lxvst() && vstfx_init (0)) {
+               return -1;
+       }
+#endif
+
+#ifdef AUDIOUNIT_SUPPORT
        AUPluginInfo::load_cached_info ();
 #endif
 
@@ -324,10 +337,28 @@ ARDOUR::init (bool use_vst, bool try_optimization)
        new PluginManager ();
 
         ProcessThread::init ();
-        BufferManager::init (10); // XX should be num_processors_for_dsp
+        BufferManager::init (10); // XX should be num_processors_for_dsp + 1 for the GUI thread
 
         PannerManager::instance().discover_panners();
 
+       // Initialize parameter metadata
+       EventTypeMap::instance().new_parameter(NullAutomation);
+       EventTypeMap::instance().new_parameter(GainAutomation);
+       EventTypeMap::instance().new_parameter(PanAzimuthAutomation);
+       EventTypeMap::instance().new_parameter(PanElevationAutomation);
+       EventTypeMap::instance().new_parameter(PanWidthAutomation);
+       EventTypeMap::instance().new_parameter(PluginAutomation);
+       EventTypeMap::instance().new_parameter(SoloAutomation);
+       EventTypeMap::instance().new_parameter(MuteAutomation);
+       EventTypeMap::instance().new_parameter(MidiCCAutomation);
+       EventTypeMap::instance().new_parameter(MidiPgmChangeAutomation);
+       EventTypeMap::instance().new_parameter(MidiPitchBenderAutomation);
+       EventTypeMap::instance().new_parameter(MidiChannelPressureAutomation);
+       EventTypeMap::instance().new_parameter(FadeInAutomation);
+       EventTypeMap::instance().new_parameter(FadeOutAutomation);
+       EventTypeMap::instance().new_parameter(EnvelopeAutomation);
+       EventTypeMap::instance().new_parameter(MidiCCAutomation);
+
        return 0;
 }
 
@@ -354,6 +385,10 @@ ARDOUR::cleanup ()
 #ifdef VST_SUPPORT
        fst_exit ();
 #endif
+
+#ifdef LXVST_SUPPOR
+       vstfx_exit();
+#endif
        return 0;
 }