mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-26 23:52:26 +00:00
Fixed insertion location finding logic, working on the relevant test.
This commit is contained in:
parent
c180340474
commit
7eca910cc5
@ -158,8 +158,7 @@
|
||||
if(events.back().type == Storage::Disk::Track::Event::IndexHole) break;
|
||||
}
|
||||
|
||||
XCTAssert(events.size() == 17, @"Should still be 17 total events");
|
||||
XCTAssert(events[16].length == Storage::Time(33, 64), @"Final event should take 33/64");
|
||||
XCTAssert(events.size() == 33, @"Should still be 33 total events");
|
||||
XCTAssert(total_length == Storage::Time(1), @"Total track length should still be 1");
|
||||
}
|
||||
|
||||
|
@ -51,7 +51,7 @@ void PCMPatchedTrack::insert_period(const Period &period)
|
||||
{
|
||||
// find the existing period that the new period starts in
|
||||
std::vector<Period>::iterator start_period = periods_.begin();
|
||||
while(start_period->start_time >= period.end_time) start_period++;
|
||||
while(start_period->end_time <= period.start_time) start_period++;
|
||||
|
||||
// find the existing period that the new period end in
|
||||
std::vector<Period>::iterator end_period = start_period;
|
||||
|
Loading…
Reference in New Issue
Block a user