13
0

use new record safe control in surface support

This commit is contained in:
Paul Davis 2016-05-27 16:11:55 -04:00
parent 2ac7108ccb
commit f03f2e5c3f
7 changed files with 16 additions and 11 deletions

View File

@ -22,6 +22,7 @@
#include "ardour/gain_control.h"
#include "ardour/session.h"
#include "ardour/record_enable_control.h"
#include "ardour/route.h"
#include "ardour/audio_track.h"
#include "ardour/meter.h"

View File

@ -47,6 +47,7 @@
#include "ardour/monitor_processor.h"
#include "ardour/profile.h"
#include "ardour/rc_configuration.h"
#include "ardour/record_enable_control.h"
#include "ardour/stripable.h"
#include "ardour/session.h"
#include "ardour/session_configuration.h"

View File

@ -22,6 +22,7 @@
#include "ardour/pannable.h"
#include "ardour/plugin_insert.h"
#include "ardour/rc_configuration.h"
#include "ardour/record_enable_control.h"
#include "ardour/session.h"
#include "ardour/track.h"
#include "ardour/types.h"

View File

@ -52,6 +52,7 @@
#include "ardour/panner.h"
#include "ardour/panner_shell.h"
#include "ardour/profile.h"
#include "ardour/record_enable_control.h"
#include "ardour/route.h"
#include "ardour/route_group.h"
#include "ardour/session.h"

View File

@ -44,6 +44,7 @@
#include "ardour/panner_shell.h"
#include "ardour/phase_control.h"
#include "ardour/rc_configuration.h"
#include "ardour/record_enable_control.h"
#include "ardour/route.h"
#include "ardour/session.h"
#include "ardour/send.h"

View File

@ -43,6 +43,7 @@
#include "ardour/panner.h"
#include "ardour/plugin.h"
#include "ardour/plugin_insert.h"
#include "ardour/record_enable_control.h"
#include "ardour/send.h"
#include "osc.h"
@ -470,7 +471,7 @@ OSC::register_callbacks()
REGISTER_CALLBACK (serv, "/ardour/pushbutton/scroll_up_1_page", "f", scroll_up_1_page);
REGISTER_CALLBACK (serv, "/ardour/pushbutton/scroll_dn_1_page", "f", scroll_dn_1_page);
/* These commands require the route index in addition to the arg; TouchOSC (et al) can't use these */
/* These commands require the route index in addition to the arg; TouchOSC (et al) can't use these */
REGISTER_CALLBACK (serv, "/ardour/routes/mute", "ii", route_mute);
REGISTER_CALLBACK (serv, "/ardour/routes/solo", "ii", route_solo);
REGISTER_CALLBACK (serv, "/ardour/routes/recenable", "ii", route_recenable);
@ -971,11 +972,10 @@ OSC::routes_list (lo_message msg)
/* XXX Can only use group ID at this point */
lo_message_add_int32 (reply, r->presentation_info().group_order());
if (boost::dynamic_pointer_cast<AudioTrack>(r)
|| boost::dynamic_pointer_cast<MidiTrack>(r)) {
boost::shared_ptr<AutomationControl> rc = r->rec_enable_control();
boost::shared_ptr<Track> t = boost::dynamic_pointer_cast<Track>(r);
lo_message_add_int32 (reply, (int32_t) t->rec_enable_control()->get_value());
if (rc) {
lo_message_add_int32 (reply, (int32_t) rc->get_value());
}
//Automatically listen to routes listed

View File

@ -20,6 +20,7 @@
#include "boost/lambda/lambda.hpp"
#include "ardour/route.h"
#include "ardour/record_enable_control.h"
#include "ardour/audio_track.h"
#include "ardour/midi_track.h"
@ -40,12 +41,11 @@ OSCRouteObserver::OSCRouteObserver (boost::shared_ptr<Route> r, lo_address a)
_route->PropertyChanged.connect (name_changed_connection, MISSING_INVALIDATOR, boost::bind (&OSCRouteObserver::name_changed, this, boost::lambda::_1), OSC::instance());
if (boost::dynamic_pointer_cast<AudioTrack>(_route) || boost::dynamic_pointer_cast<MidiTrack>(_route)) {
boost::shared_ptr<Track> track = boost::dynamic_pointer_cast<Track>(r);
boost::shared_ptr<Controllable> rec_controllable = boost::dynamic_pointer_cast<Controllable>(track->rec_enable_control());
rec_controllable->Changed.connect (rec_changed_connection, MISSING_INVALIDATOR, bind (&OSCRouteObserver::send_change_message, this, X_("/route/rec"), track->rec_enable_control()), OSC::instance());
boost::shared_ptr<AutomationControl> rc = _route->rec_enable_control();
if (rc) {
// XXX BIND ALERT: boost::shared_ptr to record enable control
// bound to functor.
rc->Changed.connect (rec_changed_connection, MISSING_INVALIDATOR, bind (&OSCRouteObserver::send_change_message, this, X_("/route/rec"), rc), OSC::instance());
}
boost::shared_ptr<Controllable> mute_controllable = boost::dynamic_pointer_cast<Controllable>(_route->mute_control());