Change ARDOUR::init return type to bool type for success/failure
This commit is contained in:
parent
4c4376d5dd
commit
d51eba1162
|
@ -291,7 +291,7 @@ 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)) {
|
||||
if (!ARDOUR::init (ARDOUR_COMMAND_LINE::use_vst, ARDOUR_COMMAND_LINE::try_hw_optimization, localedir)) {
|
||||
throw failed_constructor ();
|
||||
}
|
||||
|
||||
|
|
|
@ -50,7 +50,15 @@ namespace ARDOUR {
|
|||
extern PBD::Signal1<void,std::string> BootMessage;
|
||||
extern PBD::Signal0<void> GUIIdle;
|
||||
|
||||
int init (bool with_vst, bool try_optimization, const char* localedir);
|
||||
/**
|
||||
* @param with_vst true to enable VST Support
|
||||
* @param try_optimization true to enable hardware optimized routines
|
||||
* for mixing, finding peak values etc.
|
||||
* @param localedir Directory to look for localisation files
|
||||
*
|
||||
* @return true if Ardour library was successfully initialized
|
||||
*/
|
||||
bool init (bool with_vst, bool try_optimization, const char* localedir);
|
||||
void init_post_engine ();
|
||||
int cleanup ();
|
||||
bool no_auto_connect ();
|
||||
|
|
|
@ -215,7 +215,7 @@ lotsa_files_please ()
|
|||
}
|
||||
}
|
||||
|
||||
int
|
||||
bool
|
||||
ARDOUR::init (bool use_windows_vst, bool try_optimization, const char* localedir)
|
||||
{
|
||||
if (!Glib::thread_supported()) {
|
||||
|
@ -269,7 +269,7 @@ ARDOUR::init (bool use_windows_vst, bool try_optimization, const char* localedir
|
|||
Config = new RCConfiguration;
|
||||
|
||||
if (Config->load_state ()) {
|
||||
return -1;
|
||||
return false;
|
||||
}
|
||||
|
||||
Config->set_use_windows_vst (use_windows_vst);
|
||||
|
@ -282,13 +282,13 @@ ARDOUR::init (bool use_windows_vst, bool try_optimization, const char* localedir
|
|||
|
||||
#ifdef WINDOWS_VST_SUPPORT
|
||||
if (Config->get_use_windows_vst() && fst_init (0)) {
|
||||
return -1;
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef LXVST_SUPPORT
|
||||
if (Config->get_use_lxvst() && vstfx_init (0)) {
|
||||
return -1;
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -331,7 +331,7 @@ ARDOUR::init (bool use_windows_vst, bool try_optimization, const char* localedir
|
|||
EventTypeMap::instance().new_parameter(EnvelopeAutomation);
|
||||
EventTypeMap::instance().new_parameter(MidiCCAutomation);
|
||||
|
||||
return 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in New Issue
Block a user