Fix restoration of connections to control surface ports.
[ardour.git] / libs / ardour / globals.cc
index ca2432eda77d60477e5a7a3784ea5b72fcea5a0c..fd70aa34d7ba3c070c3a2f6c0a582bd6fa3fd93f 100644 (file)
@@ -16,7 +16,6 @@
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
 
-
 #ifdef WAF_BUILD
 #include "libardour-config.h"
 #endif
 #include "ardour/control_protocol_manager.h"
 #include "ardour/debug.h"
 #include "ardour/filesystem_paths.h"
+#include "ardour/midi_region.h"
 #include "ardour/mix.h"
-#include "ardour/playlist.h"
+#include "ardour/audioplaylist.h"
+#include "ardour/panner_manager.h"
 #include "ardour/plugin_manager.h"
 #include "ardour/process_thread.h"
 #include "ardour/profile.h"
@@ -248,9 +249,11 @@ ARDOUR::init (bool use_vst, bool try_optimization)
        make_property_quarks ();
        SessionObject::make_property_quarks ();
        Region::make_property_quarks ();
+       MidiRegion::make_property_quarks ();
        AudioRegion::make_property_quarks ();
        RouteGroup::make_property_quarks ();
         Playlist::make_property_quarks ();
+        AudioPlaylist::make_property_quarks ();
 
        /* this is a useful ready to use PropertyChange that many
           things need to check. This avoids having to compose
@@ -321,6 +324,8 @@ ARDOUR::init (bool use_vst, bool try_optimization)
         ProcessThread::init ();
         BufferManager::init (10); // XX should be num_processors_for_dsp
 
+        PannerManager::instance().discover_panners();
+
        return 0;
 }
 
@@ -336,8 +341,6 @@ ARDOUR::init_post_engine ()
        if ((node = Config->control_protocol_state()) != 0) {
                ControlProtocolManager::instance().set_state (*node, Stateful::loading_state_version);
        }
-
-       MIDI::Manager::instance()->set_port_states (Config->midi_port_states ());
 }
 
 int
@@ -526,3 +529,15 @@ ARDOUR::coverage (framepos_t sa, framepos_t ea,
        return OverlapNone;
 }
 
+string
+ARDOUR::translation_kill_path ()
+{
+        return Glib::build_filename (user_config_directory().to_string(), ".love_is_the_language_of_audio");
+}
+
+bool
+ARDOUR::translations_are_disabled ()
+{
+        /* if file does not exist, we don't translate (bundled ardour only) */
+        return Glib::file_test (translation_kill_path(), Glib::FILE_TEST_EXISTS) == false;
+}