1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-17 08:30:06 +02:00

Revert fix for 2288 - Unintended consequences.

This fix was causing extra clips at the ends of tracks.
This commit is contained in:
James Crook 2020-03-22 19:23:23 +00:00
parent 210fc28863
commit a0fd0f506c

View File

@ -459,7 +459,7 @@ sampleCount WaveClip::GetNumSamples() const
bool WaveClip::WithinClip(double t) const
{
auto ts = (sampleCount)floor(t * mRate + 0.5);
return ts > GetStartSample() && ts <= GetEndSample() + mAppendBufferLen;
return ts > GetStartSample() && ts < GetEndSample() + mAppendBufferLen;
}
bool WaveClip::BeforeClip(double t) const
@ -471,7 +471,7 @@ bool WaveClip::BeforeClip(double t) const
bool WaveClip::AfterClip(double t) const
{
auto ts = (sampleCount)floor(t * mRate + 0.5);
return ts > GetEndSample() + mAppendBufferLen;
return ts >= GetEndSample() + mAppendBufferLen;
}
// A sample at time t could be in the clip, but