From 7f27d69d79eeb724895dcff087b5b47607b3b89d Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 7 Oct 2009 01:55:32 +0000 Subject: [PATCH] Make the mackie surface work again by initialising control surfaces after MIDI, so that the mcu port exists when the control surface is created. In addition to this patch it is necessary to tweak the wscript to build with ALSA_MIDI. git-svn-id: svn://localhost/ardour2/branches/3.0@5747 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/ardev_common.sh.in | 2 +- gtk2_ardour/ardour_ui.cc | 2 ++ libs/ardour/ardour/ardour.h | 1 + libs/ardour/globals.cc | 12 ++++++++---- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/gtk2_ardour/ardev_common.sh.in b/gtk2_ardour/ardev_common.sh.in index 09ddb34a24..afa842e4f5 100644 --- a/gtk2_ardour/ardev_common.sh.in +++ b/gtk2_ardour/ardev_common.sh.in @@ -5,7 +5,7 @@ TOP=`dirname "$0"`/.. libs=$TOP/@LIBS@ export ARDOUR_PATH=$TOP/gtk2_ardour/icons:$TOP/gtk2_ardour/pixmaps:$TOP/gtk2_ardour:$TOP/build/default/gtk2_ardour:. -export ARDOUR_SURFACES_PATH=$libs/surfaces/osc:$libs/surfaces/generic_midi:$libs/surfaces/tranzport:$libs/surfaces/powermate +export ARDOUR_SURFACES_PATH=$libs/surfaces/osc:$libs/surfaces/generic_midi:$libs/surfaces/tranzport:$libs/surfaces/powermate:$libs/surfaces/mackie export ARDOUR_DATA_PATH=$TOP/gtk2_ardour:build/default/gtk2_ardour:. if test -d $HOME/gtk/inst ; then diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index 5faa64b536..ea89b062c8 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -336,6 +336,8 @@ ARDOUR_UI::post_engine () MIDI::Manager::instance()->set_api_data (engine->jack()); setup_midi (); + ARDOUR::init_post_engine (); + ActionManager::init (); _tooltips.enable(); diff --git a/libs/ardour/ardour/ardour.h b/libs/ardour/ardour/ardour.h index 892df2eb50..4ea020403c 100644 --- a/libs/ardour/ardour/ardour.h +++ b/libs/ardour/ardour/ardour.h @@ -46,6 +46,7 @@ namespace ARDOUR { extern sigc::signal BootMessage; int init (bool with_vst, bool try_optimization); + void init_post_engine (); int cleanup (); bool no_auto_connect (); diff --git a/libs/ardour/globals.cc b/libs/ardour/globals.cc index 90f05ce325..ca93345471 100644 --- a/libs/ardour/globals.cc +++ b/libs/ardour/globals.cc @@ -348,6 +348,14 @@ ARDOUR::init (bool use_vst, bool try_optimization) /* singleton - first object is "it" */ new PluginManager (); + BoundsChanged = Change (StartChanged|PositionChanged|LengthChanged); + + return 0; +} + +void +ARDOUR::init_post_engine () +{ /* singleton - first object is "it" */ new ControlProtocolManager (); ControlProtocolManager::instance().discover_control_protocols (); @@ -356,10 +364,6 @@ ARDOUR::init (bool use_vst, bool try_optimization) if ((node = Config->control_protocol_state()) != 0) { ControlProtocolManager::instance().set_state (*node); } - - BoundsChanged = Change (StartChanged|PositionChanged|LengthChanged); - - return 0; } int