use explicit timepos_t() for region start property in property lists (libardour edition)

This commit is contained in:
Paul Davis 2020-12-18 13:02:35 -07:00
parent b451a50b95
commit e38e828152
4 changed files with 9 additions and 8 deletions

View File

@ -401,7 +401,7 @@ AudioTrack::freeze_me (InterThreadInfo& itt)
PropertyList plist;
plist.add (Properties::start, 0);
plist.add (Properties::start, timepos_t (0));
plist.add (Properties::length, srcs[0]->length());
plist.add (Properties::name, region_name);
plist.add (Properties::whole_file, true);

View File

@ -312,8 +312,8 @@ Session::import_pt_rest (PTFFormat& ptf)
struct ptflookup rp;
PropertyList plist;
plist.add (ARDOUR::Properties::start, a->sampleoffset);
plist.add (ARDOUR::Properties::position, 0);
plist.add (ARDOUR::Properties::start, timepos_t (a->sampleoffset));
plist.add (ARDOUR::Properties::position, timepos_t (0));
plist.add (ARDOUR::Properties::length, a->length);
plist.add (ARDOUR::Properties::name, a->name);
plist.add (ARDOUR::Properties::layer, 0);

View File

@ -6107,6 +6107,8 @@ Session::write_one_track (Track& track, samplepos_t start, samplepos_t end,
if (!itt.cancel) {
PropertyList plist;
time_t now;
struct tm* xnow;
time (&now);
@ -6119,17 +6121,16 @@ Session::write_one_track (Track& track, samplepos_t start, samplepos_t end,
if (afs) {
afs->update_header (position, *xnow, now);
afs->flush_header ();
plist.add (Properties::start, timepos_t (0));
} else if ((ms = boost::dynamic_pointer_cast<MidiSource>(*src))) {
Source::Lock lock(ms->mutex());
ms->mark_streaming_write_completed(lock);
}
plist.add (Properties::start, timepos_t (Beats()));
}
}
/* construct a whole-file region to represent the bounced material */
PropertyList plist;
plist.add (Properties::start, 0);
plist.add (Properties::whole_file, true);
plist.add (Properties::length, len); //ToDo: in nutempo, if the Range is snapped to bbt, this should be in bbt (?)
plist.add (Properties::name, region_name_from_path (srcs.front()->name(), true));

View File

@ -59,7 +59,7 @@ AudioRegionTest::setUp ()
s->write (staircase, signal_length);
PropertyList plist;
plist.add (Properties::start, 0);
plist.add (Properties::start, timepos_t (0));
plist.add (Properties::length, 100);
for (int i = 0; i < 16; ++i) {
_r[i] = RegionFactory::create (_source, plist);