/* some GUI objects need this */
- PBD::ID::init ();
+ if (!ARDOUR::init (ARDOUR_COMMAND_LINE::use_vst, ARDOUR_COMMAND_LINE::try_hw_optimization, localedir)) {
+ error << string_compose (_("could not initialize %1."), PROGRAM_NAME) << endmsg;
+ exit (1);
+ }
+
+ if (curvetest_file) {
+ return curvetest (curvetest_file);
+ }
+#ifndef WIN32
if (::signal (SIGPIPE, sigpipe_handler)) {
cerr << _("Cannot xinstall SIGPIPE error handler") << endl;
}
#include "i18n.h"
+#ifdef SearchPath
+#undef SearchPath
+#endif
+
using namespace PBD;
+ using namespace VideoUtils;
TranscodeFfmpeg::TranscodeFfmpeg (std::string f)
: infile(f)
} else {
error << string_compose (_("Could not get system open files limit (%1)"), strerror (errno)) << endmsg;
}
+#endif
}
- int
+ bool
ARDOUR::init (bool use_windows_vst, bool try_optimization, const char* localedir)
{
- if (!Glib::thread_supported()) {
- Glib::thread_init();
+ if (libardour_initialized) {
+ return true;
}
- // this really should be in PBD::init..if there was one
- Gio::init ();
+ if (!PBD::init()) return false;
#ifdef ENABLE_NLS
(void) bindtextdomain(PACKAGE, localedir);
pthread_cancel_all ()
{
pthread_mutex_lock (&thread_map_lock);
- for (ThreadMap::iterator i = all_threads.begin(); i != all_threads.end(); ++i) {
++
+ for (ThreadMap::iterator i = all_threads.begin(); i != all_threads.end(); ) {
+
+ ThreadMap::iterator nxt = i;
+ ++nxt;
+
if (!pthread_equal ((*i), pthread_self())) {
pthread_cancel ((*i));
}