mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-08 15:54:57 +01:00
first vaguely working version using PresentationInfo
remote control ID and "order keys" have been removed.
This commit is contained in:
parent
bae9474e9f
commit
e0ff70cf86
65 changed files with 1193 additions and 1076 deletions
|
|
@ -46,10 +46,10 @@ PBD::Signal0<void> ControlProtocol::VerticalZoomOutAll;
|
|||
PBD::Signal0<void> ControlProtocol::VerticalZoomInSelected;
|
||||
PBD::Signal0<void> ControlProtocol::VerticalZoomOutSelected;
|
||||
PBD::Signal1<void,RouteNotificationListPtr> ControlProtocol::TrackSelectionChanged;
|
||||
PBD::Signal1<void,uint32_t> ControlProtocol::AddRouteToSelection;
|
||||
PBD::Signal1<void,uint32_t> ControlProtocol::SetRouteSelection;
|
||||
PBD::Signal1<void,uint32_t> ControlProtocol::ToggleRouteSelection;
|
||||
PBD::Signal1<void,uint32_t> ControlProtocol::RemoveRouteFromSelection;
|
||||
PBD::Signal1<void,uint64_t> ControlProtocol::AddRouteToSelection;
|
||||
PBD::Signal1<void,uint64_t> ControlProtocol::SetRouteSelection;
|
||||
PBD::Signal1<void,uint64_t> ControlProtocol::ToggleRouteSelection;
|
||||
PBD::Signal1<void,uint64_t> ControlProtocol::RemoveRouteFromSelection;
|
||||
PBD::Signal0<void> ControlProtocol::ClearRouteSelection;
|
||||
PBD::Signal0<void> ControlProtocol::StepTracksDown;
|
||||
PBD::Signal0<void> ControlProtocol::StepTracksUp;
|
||||
|
|
@ -77,82 +77,18 @@ ControlProtocol::set_active (bool yn)
|
|||
void
|
||||
ControlProtocol::next_track (uint32_t initial_id)
|
||||
{
|
||||
uint32_t limit = session->nroutes();
|
||||
boost::shared_ptr<Route> cr = route_table[0];
|
||||
uint32_t id;
|
||||
|
||||
if (cr) {
|
||||
id = cr->remote_control_id ();
|
||||
} else {
|
||||
id = 0;
|
||||
}
|
||||
|
||||
if (id == limit) {
|
||||
id = 0;
|
||||
} else {
|
||||
id++;
|
||||
}
|
||||
|
||||
while (id <= limit) {
|
||||
if ((cr = session->route_by_remote_id (id)) != 0) {
|
||||
break;
|
||||
}
|
||||
id++;
|
||||
}
|
||||
|
||||
if (id >= limit) {
|
||||
id = 0;
|
||||
while (id != initial_id) {
|
||||
if ((cr = session->route_by_remote_id (id)) != 0) {
|
||||
break;
|
||||
}
|
||||
id++;
|
||||
}
|
||||
}
|
||||
|
||||
route_table[0] = cr;
|
||||
// STRIPABLE route_table[0] = _session->get_nth_stripable (++initial_id, RemoteControlID::Route);
|
||||
}
|
||||
|
||||
void
|
||||
ControlProtocol::prev_track (uint32_t initial_id)
|
||||
{
|
||||
uint32_t limit = session->nroutes();
|
||||
boost::shared_ptr<Route> cr = route_table[0];
|
||||
int32_t id;
|
||||
|
||||
if (cr) {
|
||||
id = cr->remote_control_id ();
|
||||
} else {
|
||||
id = 0;
|
||||
if (!initial_id) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (id == 0) {
|
||||
id = limit;
|
||||
} else {
|
||||
id--;
|
||||
}
|
||||
|
||||
while (id >= 0) {
|
||||
if ((cr = session->route_by_remote_id (id)) != 0) {
|
||||
break;
|
||||
}
|
||||
id--;
|
||||
}
|
||||
|
||||
if (id < 0) {
|
||||
uint32_t i = limit;
|
||||
while (i > initial_id) {
|
||||
if ((cr = session->route_by_remote_id (i)) != 0) {
|
||||
break;
|
||||
}
|
||||
i--;
|
||||
}
|
||||
}
|
||||
|
||||
route_table[0] = cr;
|
||||
// STRIPABLE route_table[0] = _session->get_nth_stripable (--initial_id, RemoteControlID::Route);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ControlProtocol::set_route_table_size (uint32_t size)
|
||||
{
|
||||
|
|
@ -176,6 +112,7 @@ ControlProtocol::set_route_table (uint32_t table_index, boost::shared_ptr<ARDOUR
|
|||
bool
|
||||
ControlProtocol::set_route_table (uint32_t table_index, uint32_t remote_control_id)
|
||||
{
|
||||
#if 0 // STRIPABLE
|
||||
boost::shared_ptr<Route> r = session->route_by_remote_id (remote_control_id);
|
||||
|
||||
if (!r) {
|
||||
|
|
@ -183,7 +120,7 @@ ControlProtocol::set_route_table (uint32_t table_index, uint32_t remote_control_
|
|||
}
|
||||
|
||||
set_route_table (table_index, r);
|
||||
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue