Remove redundant RegionGroupRetainer

Track::use_captured_midi_sources is called from use_captured_sources().
which is only called from DiskWriter::transport_stopped_wallclock(),
which is only called from Session::non_realtime_stop().
This commit is contained in:
Robin Gareus 2023-09-22 18:29:11 +02:00
parent 0a12986639
commit a37f4e194d
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
3 changed files with 8 additions and 12 deletions

View File

@ -1189,9 +1189,6 @@ DiskWriter::transport_stopped_wallclock (struct tm& when, time_t twhen, bool abo
uint32_t n = 0;
bool mark_write_completed = false;
/* finishing a capture will potentially create a lot of regions; we want them all assigned to the same region-group */
Region::RegionGroupRetainer rgr;
finish_capture (c);
/* butler is already stopped, but there may be work to do

View File

@ -1396,13 +1396,15 @@ Session::non_realtime_stop (bool abort, int on_entry, bool& finished, bool will_
_state_of_the_state = StateOfTheState (_state_of_the_state | InCleanup);
}
/* finishing a capture will potentially create a lot of regions; we want them all assigned to the same region-group */
Region::RegionGroupRetainer rgr;
{
/* finishing a capture will potentially create a lot of regions; we want them all assigned to the same region-group */
Region::RegionGroupRetainer rgr;
for (auto const& i : *rl) {
std::shared_ptr<Track> tr = std::dynamic_pointer_cast<Track> (i);
if (tr) {
tr->transport_stopped_wallclock (*now, xnow, abort);
for (auto const& i : *rl) {
std::shared_ptr<Track> tr = std::dynamic_pointer_cast<Track> (i);
if (tr) {
tr->transport_stopped_wallclock (*now, xnow, abort);
}
}
}

View File

@ -962,9 +962,6 @@ Track::use_captured_midi_sources (SourceList& srcs, CaptureInfos const & capture
return;
}
/* all regions created from a recording pass should share the same group-id */
Region::RegionGroupRetainer rgr;
RecordMode rmode = _session.config.get_record_mode ();
samplecnt_t total_capture = 0;