These basics add a colour index to each clip and track, and allow for a choice of four colours to be set from the track menu drop down. The additional wave colours (red, green and black) are not currently configurable, and the colour index is not currently saved.
... Simplify. Don't assume e->mOffset is zero. Check consistency afterward.
Do not leave responsibility for simplification of discontinuities to higher
level code.
Allow real discontinuities at the end of the insertion; no more readjustment of
times of points.
Changed the criterion for deciding when two clips are immediately next to each other, and made it into a function: WaveClip::SharesBoundaryWithNextClip.
... Formerly this was done correctly only for cut and delete from WaveTrack,
paste into WaveTrack, and sync-lock adjustment of WaveTrack (either lengthening
or shortening).
Now also properly done for TimeTrack cut and paste, and also for:
Split cut
Split delete
Trim
... in WaveClip and WaveTrack, to save as much recording as we can,
assuming the strong guarantees that Sequence will give.
Also comment that some other WaveTrack methods can give strong guarantee,
incidentally to making HandleClear give strong.
... Eliminate CreateFromCopy, add new one-step constructor instead.
It was wasteful to create a copy only to re-create the Sequence at once.
Sequence::Copy is a factory returning a unique_ptr.
Some error checks are removed, but there will be exceptions instead later.
... and that they have equal width on the linear scale
... also simplify the logic involving zero padding factor
This is more preparation for constant-q.
... whenever they really describe the size of a buffer that fits in memory, or
of a block file (which is never now more than a megabyte and so could be fit in
memory all at once), or a part thereof.
... with run-time assertions.
I examined each place and reasoned that the narrowing was safe, and commented
why so.
Again, there are places where the sampleCount variable will later be changed
to have a different type, and they are not changed here.
... A non-narrowing conversion out to long long is a necessity, but the
conversions to float and double are simply conveniences.
Conversion from floating is explicit, to avoid unintended consequences with
arithmetic operators, when later sampleCount ceases to be an alias for an
integral type.
Some conversions are not made explicit, where I expect to change the type of
the variable later to have mere size_t width.