13
0

Location API to remove xrun markers

This commit is contained in:
Paul Davis 2021-03-16 16:49:38 -06:00
parent 5640f820d3
commit 951257909f
2 changed files with 24 additions and 0 deletions

View File

@ -202,6 +202,7 @@ public:
void remove (Location *);
void clear ();
void clear_markers ();
void clear_xrun_markers ();
void clear_ranges ();
XMLNode& get_state (void);

View File

@ -952,6 +952,29 @@ Locations::clear_markers ()
changed (); /* EMIT SIGNAL */
}
void
Locations::clear_xrun_markers ()
{
{
Glib::Threads::Mutex::Lock lm (lock);
LocationList::iterator tmp;
for (LocationList::iterator i = locations.begin(); i != locations.end(); ) {
tmp = i;
++tmp;
if ((*i)->is_xrun()) {
delete *i;
locations.erase (i);
}
i = tmp;
}
}
changed (); /* EMIT SIGNAL */
}
void
Locations::clear_ranges ()
{