13
0

remove Track::hidden(); replace with Stripable::is_private_route()

This commit is contained in:
Paul Davis 2017-07-25 11:26:14 -04:00
parent 838655bd39
commit 1f53c861b8
7 changed files with 8 additions and 14 deletions

View File

@ -71,6 +71,7 @@ class LIBARDOUR_API Stripable : public SessionObject,
*/
bool is_auditioner() const { return _presentation_info.flags() & PresentationInfo::Auditioner; }
bool is_private_route() const { return is_auditioner(); }
bool is_master() const { return _presentation_info.flags() & PresentationInfo::MasterOut; }
bool is_monitor() const { return _presentation_info.flags() & PresentationInfo::MonitorOut; }

View File

@ -154,7 +154,6 @@ class LIBARDOUR_API Track : public Route, public Recordable
int do_flush (RunContext, bool force = false);
void set_pending_overwrite (bool);
int seek (framepos_t, bool complete_refill = false);
bool hidden () const;
int can_internal_playback_seek (framecnt_t);
int internal_playback_seek (framecnt_t);
void non_realtime_locate (framepos_t);

View File

@ -1832,7 +1832,7 @@ Session::set_auto_loop_location (Location* location)
boost::shared_ptr<RouteList> rl = routes.reader ();
for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) {
boost::shared_ptr<Track> tr = boost::dynamic_pointer_cast<Track> (*i);
if (tr && !tr->hidden()) {
if (tr && !tr->is_private_route()) {
tr->set_loop (location);
}
}

View File

@ -253,7 +253,7 @@ Session::get_track_statistics ()
boost::shared_ptr<Track> tr = boost::dynamic_pointer_cast<Track> (*i);
if (!tr || tr->hidden()) {
if (!tr || tr->is_private_route()) {
continue;
}

View File

@ -408,7 +408,7 @@ Session::post_engine_init ()
boost::shared_ptr<RouteList> rl = routes.reader();
for (RouteList::iterator r = rl->begin(); r != rl->end(); ++r) {
boost::shared_ptr<Track> trk = boost::dynamic_pointer_cast<Track> (*r);
if (trk && !trk->hidden()) {
if (trk && !trk->is_private_route()) {
trk->seek (_transport_frame, true);
}
}

View File

@ -1035,7 +1035,7 @@ Session::set_track_loop (bool yn)
for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) {
boost::shared_ptr<Track> tr = boost::dynamic_pointer_cast<Track> (*i);
if (tr && !tr->hidden()) {
if (tr && !tr->is_private_route()) {
tr->set_loop (yn ? loc : 0);
}
}
@ -1863,7 +1863,7 @@ Session::use_sync_source (Slave* new_slave)
boost::shared_ptr<RouteList> rl = routes.reader();
for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) {
boost::shared_ptr<Track> tr = boost::dynamic_pointer_cast<Track> (*i);
if (tr && !tr->hidden()) {
if (tr && !tr->is_private_route()) {
if (tr->realtime_speed_change()) {
non_rt_required = true;
}

View File

@ -700,12 +700,6 @@ Track::seek (framepos_t p, bool complete_refill)
return _disk_writer->seek (p, complete_refill);
}
bool
Track::hidden () const
{
return _disk_writer->hidden () || _disk_reader->hidden();
}
int
Track::can_internal_playback_seek (framecnt_t p)
{
@ -723,9 +717,9 @@ Track::non_realtime_locate (framepos_t p)
{
Route::non_realtime_locate (p);
if (!hidden()) {
if (!is_private_route()) {
/* don't waste i/o cycles and butler calls
for hidden (secret) tracks
for private tracks (e.g.auditioner)
*/
_disk_reader->non_realtime_locate (p);
_disk_writer->non_realtime_locate (p);