mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-16 03:36:32 +01:00
reversible domain swaps for Locations
This commit is contained in:
parent
bb8858be81
commit
0e40f030ad
1 changed files with 14 additions and 5 deletions
|
|
@ -1919,19 +1919,28 @@ Locations::clear_cue_markers (samplepos_t start, samplepos_t end)
|
||||||
void
|
void
|
||||||
Locations::start_domain_bounce (Temporal::DomainBounceInfo& cmd)
|
Locations::start_domain_bounce (Temporal::DomainBounceInfo& cmd)
|
||||||
{
|
{
|
||||||
Glib::Threads::RWLock::WriterLock lm (_lock);
|
_session.add_command (new MementoCommand<Locations> (*this, &get_state(), nullptr));
|
||||||
|
{
|
||||||
|
Glib::Threads::RWLock::ReaderLock lm (_lock);
|
||||||
|
|
||||||
for (auto & l : locations) {
|
for (auto & l : locations) {
|
||||||
l->start_domain_bounce (cmd);
|
l->start_domain_bounce (cmd);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Locations::finish_domain_bounce (Temporal::DomainBounceInfo& cmd)
|
Locations::finish_domain_bounce (Temporal::DomainBounceInfo& cmd)
|
||||||
{
|
{
|
||||||
for (auto & l : locations) {
|
{
|
||||||
l->finish_domain_bounce (cmd);
|
/* We modify locations, but we do not change the list */
|
||||||
|
Glib::Threads::RWLock::ReaderLock lm (_lock);
|
||||||
|
|
||||||
|
for (auto & l : locations) {
|
||||||
|
l->finish_domain_bounce (cmd);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
_session.add_command (new MementoCommand<Locations> (*this, nullptr, &get_state()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue