1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-26 23:52:26 +00:00

Eliminated special case that doesn't seek properly and isn't needed. Added TODO.

This commit is contained in:
Thomas Harte 2016-12-25 21:32:14 -05:00
parent 4fca30b81f
commit a6d038cad9

View File

@ -34,15 +34,11 @@ void Controller::setup_track()
Time offset; Time offset;
Time track_time_now = get_time_into_track(); Time track_time_now = get_time_into_track();
if(track_ && track_time_now > Time(0)) if(track_)
{ {
Time time_found = track_->seek_to(track_time_now); Time time_found = track_->seek_to(track_time_now);
offset = track_time_now - time_found; offset = track_time_now - time_found;
} }
else
{
offset = track_time_now;
}
get_next_event(offset); get_next_event(offset);
} }
@ -170,6 +166,8 @@ void Controller::end_writing()
if(!patched_track_) if(!patched_track_)
{ {
// TODO: is the track already actually a patched track?
// see dynamic_pointer_cast
patched_track_.reset(new PCMPatchedTrack(track_)); patched_track_.reset(new PCMPatchedTrack(track_));
} }
patched_track_->add_segment(write_start_time_, write_segment_); patched_track_->add_segment(write_start_time_, write_segment_);