THIS DOES NOT WORK YET. Selection information is not available in libardour at this time
boost::shared_ptr<Route> route_by_name (std::string);
boost::shared_ptr<Route> route_by_id (PBD::ID);
boost::shared_ptr<Route> route_by_remote_id (uint32_t id);
+ boost::shared_ptr<Route> route_by_selected_count (uint32_t cnt);
boost::shared_ptr<Track> track_by_diskstream_id (PBD::ID);
void routes_using_input_from (const std::string& str, RouteList& rl);
}
+boost::shared_ptr<Route>
+Session::route_by_selected_count (uint32_t id)
+{
+ boost::shared_ptr<RouteList> r = routes.reader ();
+
+ for (RouteList::iterator i = r->begin(); i != r->end(); ++i) {
+ /* NOT IMPLEMENTED */
+ }
+
+ return boost::shared_ptr<Route> ((Route*) 0);
+}
+
+
void
Session::reassign_track_numbers ()
{
case ControllableDescriptor::RemoteControlID:
r = route_by_remote_id (desc.rid());
break;
+
+ case ControllableDescriptor::SelectionCount:
+ r = route_by_selected_count (desc.selection_id());
+ break;
}
if (!r) {
if (rest[0][0] == 'B') {
_banked = true;
_rid = atoi (rest[0].substr (1));
+ } else if (rest[0][0] == 'S') {
+ _top_level_type = SelectionCount;
+ _banked = true;
+ _selection_id = atoi (rest[0].substr (1));
} else if (isdigit (rest[0][0])) {
_banked = false;
_rid = atoi (rest[0]);
}
uint32_t
-ControllableDescriptor::rid() const
+ControllableDescriptor::rid () const
{
if (banked()) {
return _rid + _bank_offset;
return _rid;
}
+uint32_t
+ControllableDescriptor::selection_id () const
+{
+ if (banked()) {
+ return _selection_id + _bank_offset;
+ }
+
+ return _selection_id;
+}
+
uint32_t
ControllableDescriptor::target (uint32_t n) const
{
public:
enum TopLevelType {
RemoteControlID,
- NamedRoute
+ NamedRoute,
+ SelectionCount,
};
enum SubType {
SubType subtype() const { return _subtype; }
uint32_t rid() const;
+ uint32_t selection_id() const;
uint32_t target (uint32_t n) const;
bool banked() const { return _banked; }
TopLevelType _top_level_type;
SubType _subtype;
std::string _top_level_name;
- uint32_t _rid;
+ union {
+ uint32_t _rid;
+ uint32_t _selection_id;
+ };
std::vector<uint32_t> _target;
uint32_t _banked;
uint32_t _bank_offset;