because sometimes there are good reasons for not doing things the way a windows progr...
[ardour.git] / libs / ardour / globals.cc
index 91536b18797e4ec08750347b6259b1494503428f..085dfc8e5906345d25cd5274cac2f31f9e3b8cb0 100644 (file)
 #include <xmmintrin.h>
 #endif
 
+#ifdef check
+#undef check /* stupid Apple and their un-namespaced, generic Carbon macros */
+#endif 
+
 #include <giomm.h>
 
 #include <glibmm/fileutils.h>
@@ -200,10 +204,8 @@ lotsa_files_please ()
                                error << string_compose (_("Could not set system open files limit to %1"), rl.rlim_cur) << endmsg;
                        }
                } else {
-                       if (rl.rlim_cur == RLIM_INFINITY) {
-                               info << _("Removed open file count limit. Excellent!") << endmsg;
-                       } else {
-                               info << string_compose (_("%1 will be limited to %2 open files"), PROGRAM_NAME, rl.rlim_cur) << endmsg;
+                       if (rl.rlim_cur != RLIM_INFINITY) {
+                               info << string_compose (_("Your system is configured to limit %1 to only %2 open files"), PROGRAM_NAME, rl.rlim_cur) << endmsg;
                        }
                }
        } else {
@@ -299,7 +301,11 @@ ARDOUR::init (bool use_windows_vst, bool try_optimization)
        (void) PluginManager::instance();
 
         ProcessThread::init ();
-        BufferManager::init (hardware_concurrency() + 1); 
+       /* the + 4 is a bit of a handwave. i don't actually know
+          how many more per-thread buffer sets we need above
+          the h/w concurrency, but its definitely > 1 more.
+       */
+        BufferManager::init (hardware_concurrency() + 4); 
 
         PannerManager::instance().discover_panners();
 
@@ -468,3 +474,18 @@ 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;
 }
+
+vector<SyncSource>
+ARDOUR::get_available_sync_options ()
+{
+       vector<SyncSource> ret;
+
+       ret.push_back (JACK);
+       ret.push_back (MTC);
+       ret.push_back (MIDIClock);
+#ifdef HAVE_LTC
+       ret.push_back (LTC);
+#endif
+
+       return ret;
+}