mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-25 15:53:52 +02:00
Envelope bug
This commit is contained in:
committed by
Paul Licameli
parent
cb48ca2b91
commit
dcceaca13c
@@ -125,6 +125,7 @@ class Envelope final : public XMLTagHandler {
|
||||
|
||||
// Handling Cut/Copy/Paste events
|
||||
void CollapseRegion(double t0, double t1);
|
||||
// Takes absolute times, NOT offset-relative:
|
||||
void CopyFrom(const Envelope * e, double t0, double t1);
|
||||
void Paste(double t0, const Envelope *e);
|
||||
void InsertSpace(double t0, double tlen);
|
||||
|
||||
@@ -1397,7 +1397,9 @@ bool WaveClip::CreateFromCopy(double t0, double t1, const WaveClip* other)
|
||||
}
|
||||
|
||||
mEnvelope = std::make_unique<Envelope>();
|
||||
mEnvelope->CopyFrom(other->mEnvelope.get(), (double)s0/mRate, (double)s1/mRate);
|
||||
mEnvelope->CopyFrom(other->mEnvelope.get(),
|
||||
mOffset + (double)s0/mRate,
|
||||
mOffset + (double)s1/mRate);
|
||||
|
||||
MarkChanged();
|
||||
|
||||
@@ -1546,6 +1548,7 @@ bool WaveClip::ClearAndAddCutLine(double t0, double t1)
|
||||
if (clip_t1 > GetEndTime())
|
||||
clip_t1 = GetEndTime();
|
||||
|
||||
newClip->SetOffset(this->mOffset);
|
||||
if (!newClip->CreateFromCopy(clip_t0, clip_t1, this))
|
||||
return false;
|
||||
newClip->SetOffset(clip_t0-mOffset);
|
||||
|
||||
Reference in New Issue
Block a user