1
0
mirror of https://github.com/TomHarte/CLK.git synced 2026-04-21 17:16:44 +00:00

Periods need a custom copy constructor too, if they're going to avoid sharing an event_source.

This commit is contained in:
Thomas Harte
2016-12-30 17:39:52 -05:00
parent e5cc77f22d
commit 5d63556870
2 changed files with 7 additions and 0 deletions
+6
View File
@@ -224,6 +224,12 @@ Storage::Time PCMPatchedTrack::seek_to(const Time &time_since_index_hole)
return current_time_;
}
PCMPatchedTrack::Period::Period(const Period &original) :
start_time(original.start_time), end_time(original.end_time), segment_start_time(original.segment_start_time)
{
if(original.event_source) event_source.reset(new PCMSegmentEventSource(*original.event_source));
}
void PCMPatchedTrack::Period::push_start_to_time(const Storage::Time &new_start_time)
{
segment_start_time += new_start_time - start_time;