mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-06 23:29:24 +02:00
Revert fix for 2288 - Unintended consequences.
This fix was causing extra clips at the ends of tracks.
This commit is contained in:
parent
210fc28863
commit
a0fd0f506c
@ -459,7 +459,7 @@ sampleCount WaveClip::GetNumSamples() const
|
|||||||
bool WaveClip::WithinClip(double t) const
|
bool WaveClip::WithinClip(double t) const
|
||||||
{
|
{
|
||||||
auto ts = (sampleCount)floor(t * mRate + 0.5);
|
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
|
bool WaveClip::BeforeClip(double t) const
|
||||||
@ -471,7 +471,7 @@ bool WaveClip::BeforeClip(double t) const
|
|||||||
bool WaveClip::AfterClip(double t) const
|
bool WaveClip::AfterClip(double t) const
|
||||||
{
|
{
|
||||||
auto ts = (sampleCount)floor(t * mRate + 0.5);
|
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
|
// A sample at time t could be in the clip, but
|
||||||
|
Loading…
x
Reference in New Issue
Block a user