diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2006-05-18 16:44:07 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2006-05-18 16:44:07 +0000 |
commit | 00a106197a69ec1f5edcbc546b8971cba5730e2c (patch) | |
tree | b2bf7738d4565bcf75a22f2643fd13367d0a75f2 /libs/ardour/globals.cc | |
parent | 69aef2cd91ff6cc5f0f633eb49ff71be920b7a4b (diff) |
moved OSC into libardour
git-svn-id: svn://localhost/trunk/ardour2@510 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/globals.cc')
-rw-r--r-- | libs/ardour/globals.cc | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/libs/ardour/globals.cc b/libs/ardour/globals.cc index a6f9d6b2e5..eb46943a43 100644 --- a/libs/ardour/globals.cc +++ b/libs/ardour/globals.cc @@ -47,6 +47,7 @@ #include <ardour/utils.h> #include <ardour/session.h> #include <ardour/control_protocol_manager.h> +#include <ardour/osc.h> #include <ardour/mix.h> @@ -58,6 +59,7 @@ ARDOUR::Configuration* ARDOUR::Config = 0; ARDOUR::AudioLibrary* ARDOUR::Library = 0; +ARDOUR::OSC* ARDOUR::osc = 0; using namespace ARDOUR; using namespace std; @@ -72,6 +74,22 @@ Change ARDOUR::PositionChanged = ARDOUR::new_change (); Change ARDOUR::NameChanged = ARDOUR::new_change (); Change ARDOUR::BoundsChanged = Change (0); // see init(), below +static int +setup_osc () +{ + /* no real cost to creating this object, and it avoids + conditionals anywhere that uses it + */ + + osc = new OSC (Config->get_osc_port()); + + if (Config->get_use_osc ()) { + return osc->start (); + } else { + return 0; + } +} + static int setup_midi () { @@ -180,6 +198,10 @@ ARDOUR::init (AudioEngine& engine, bool use_vst, bool try_optimization, void (*s return -1; } + if (setup_osc ()) { + return -1; + } + #ifdef VST_SUPPORT if (Config->get_use_vst() && fst_init (sighandler)) { return -1; |