mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-11 00:56:33 +01:00
Change ARDOUR::init return type to bool type for success/failure
This commit is contained in:
parent
4c4376d5dd
commit
d51eba1162
3 changed files with 15 additions and 7 deletions
|
|
@ -291,7 +291,7 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir)
|
||||||
/* lets get this party started */
|
/* lets get this party started */
|
||||||
|
|
||||||
try {
|
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 ();
|
throw failed_constructor ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,15 @@ namespace ARDOUR {
|
||||||
extern PBD::Signal1<void,std::string> BootMessage;
|
extern PBD::Signal1<void,std::string> BootMessage;
|
||||||
extern PBD::Signal0<void> GUIIdle;
|
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 ();
|
void init_post_engine ();
|
||||||
int cleanup ();
|
int cleanup ();
|
||||||
bool no_auto_connect ();
|
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)
|
ARDOUR::init (bool use_windows_vst, bool try_optimization, const char* localedir)
|
||||||
{
|
{
|
||||||
if (!Glib::thread_supported()) {
|
if (!Glib::thread_supported()) {
|
||||||
|
|
@ -269,7 +269,7 @@ ARDOUR::init (bool use_windows_vst, bool try_optimization, const char* localedir
|
||||||
Config = new RCConfiguration;
|
Config = new RCConfiguration;
|
||||||
|
|
||||||
if (Config->load_state ()) {
|
if (Config->load_state ()) {
|
||||||
return -1;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Config->set_use_windows_vst (use_windows_vst);
|
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
|
#ifdef WINDOWS_VST_SUPPORT
|
||||||
if (Config->get_use_windows_vst() && fst_init (0)) {
|
if (Config->get_use_windows_vst() && fst_init (0)) {
|
||||||
return -1;
|
return false;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef LXVST_SUPPORT
|
#ifdef LXVST_SUPPORT
|
||||||
if (Config->get_use_lxvst() && vstfx_init (0)) {
|
if (Config->get_use_lxvst() && vstfx_init (0)) {
|
||||||
return -1;
|
return false;
|
||||||
}
|
}
|
||||||
#endif
|
#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(EnvelopeAutomation);
|
||||||
EventTypeMap::instance().new_parameter(MidiCCAutomation);
|
EventTypeMap::instance().new_parameter(MidiCCAutomation);
|
||||||
|
|
||||||
return 0;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue