Move initialization of libardour from ARDOUR_UI class into main()

This commit is contained in:
Tim Mayberry
2013-08-09 21:47:16 +10:00
parent 9d340af10d
commit de4b24b162
2 changed files with 8 additions and 14 deletions

View File

@@ -290,21 +290,10 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir)
/* lets get this party started */
try {
if (!ARDOUR::init (ARDOUR_COMMAND_LINE::use_vst, ARDOUR_COMMAND_LINE::try_hw_optimization, localedir)) {
throw failed_constructor ();
}
setup_gtk_ardour_enums ();
setup_profile ();
setup_gtk_ardour_enums ();
setup_profile ();
SessionEvent::create_per_thread_pool ("GUI", 512);
} catch (failed_constructor& err) {
error << string_compose (_("could not initialize %1."), PROGRAM_NAME) << endmsg;
// pass it on up
throw;
}
SessionEvent::create_per_thread_pool ("GUI", 512);
/* we like keyboards */

View File

@@ -515,6 +515,11 @@ int main (int argc, char *argv[])
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 (::signal (SIGPIPE, sigpipe_handler)) {
cerr << _("Cannot xinstall SIGPIPE error handler") << endl;
}