Add RTA clear feature

This commit is contained in:
Robin Gareus 2025-08-20 12:49:57 +02:00 committed by Edgar Aichinger
parent 277c384a5c
commit a85db361eb
2 changed files with 20 additions and 0 deletions

View file

@ -195,6 +195,25 @@ RTAManager::remove (std::shared_ptr<ARDOUR::Route> route)
}
}
void
RTAManager::clear ()
{
std::list<RTA>::iterator i = _rta.begin ();
while (i != _rta.end ()) {
std::shared_ptr<ARDOUR::Route> route = i->route ();
if (route->is_master ()) {
++i;
continue;
}
i = _rta.erase (i);
route->gui_changed ("rta", this); /* EMIT SIGNAL */
}
if (_rta.empty ()) {
SignalReady (); /* EMIT SIGNAL */
}
}
bool
RTAManager::attached (std::shared_ptr<ARDOUR::Route> route) const
{

View file

@ -85,6 +85,7 @@ public:
void attach (std::shared_ptr<ARDOUR::Route>);
void remove (std::shared_ptr<ARDOUR::Route>);
bool attached (std::shared_ptr<ARDOUR::Route>) const;
void clear ();
std::list<RTA> const& rta () const
{