/*
Copyright (C) 2009 Paul Davis
-
+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
using namespace std;
using namespace PBD;
using namespace ARDOUR;
+using namespace ArdourSurface;
OSCRouteObserver::OSCRouteObserver (boost::shared_ptr<Route> r, lo_address a)
: _route (r)
{
addr = lo_address_new (lo_address_get_hostname(a) , lo_address_get_port(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)) {
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<Controllable> mute_controllable = boost::dynamic_pointer_cast<Controllable>(_route->mute_control());
mute_controllable->Changed.connect (mute_changed_connection, MISSING_INVALIDATOR, bind (&OSCRouteObserver::send_change_message, this, X_("/route/mute"), _route->mute_control()), OSC::instance());
if (!what_changed.contains (ARDOUR::Properties::name)) {
return;
}
-
+
if (!_route) {
return;
}
-
+
lo_message msg = lo_message_new ();
lo_message_add_int32 (msg, _route->remote_control_id());