diff options
author | Damien Zammit <damien@zamaudio.com> | 2018-09-28 23:34:29 +1000 |
---|---|---|
committer | Damien Zammit <damien@zamaudio.com> | 2018-09-28 23:34:29 +1000 |
commit | 23faf45fcf184813712d2dac3aa955b4da20d4af (patch) | |
tree | 17caf8775a861dc36bdcf78219587ef3a1e5432b /libs/ardour/session.cc | |
parent | 6f96fe19849fcdc62fef4213460ba0b80cbc1f29 (diff) |
PT import: Refactor away from Editor into Sessionptimport-save
Diffstat (limited to 'libs/ardour/session.cc')
-rw-r--r-- | libs/ardour/session.cc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 9bdf758a17..f0f8681570 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -6457,6 +6457,26 @@ Session::route_removed_from_route_group (RouteGroup* rg, boost::weak_ptr<Route> } } +boost::shared_ptr<AudioTrack> +Session::get_nth_audio_track (int nth) const +{ + boost::shared_ptr<RouteList> rl = routes.reader (); + boost::shared_ptr<AudioTrack> ret = NULL; + --nth; + + for (RouteList::const_iterator r = rl->begin(); r != rl->end(); ++r) { + boost::shared_ptr<AudioTrack> at = boost::dynamic_pointer_cast<AudioTrack> (*r); + if (at) { + if (nth > 0) { + --nth; + } else { + ret = at; + } + } + } + return ret; +} + boost::shared_ptr<RouteList> Session::get_tracks () const { |