mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-02 17:23:18 +02:00
Make sure that whenever a clip is offset, it is by a whole number of samples at it's sample rate.
This commit is contained in:
parent
343297ecde
commit
48e04173b1
@ -317,7 +317,7 @@ WaveClip::WaveClip(WaveClip& orig, DirManager *projDirManager)
|
||||
// current project's DirManager, because we might be copying
|
||||
// from one project to another
|
||||
|
||||
mOffset = orig.mOffset;
|
||||
mOffset = QUANTIZED_TIME(orig.mOffset, orig.mRate); // Just in case the offset is off
|
||||
mRate = orig.mRate;
|
||||
mSequence = new Sequence(*orig.mSequence, projDirManager);
|
||||
mEnvelope = new Envelope();
|
||||
@ -366,7 +366,7 @@ WaveClip::~WaveClip()
|
||||
|
||||
void WaveClip::SetOffset(double offset)
|
||||
{
|
||||
mOffset = offset;
|
||||
mOffset = QUANTIZED_TIME(offset, mRate); // put on a sample
|
||||
mEnvelope->SetOffset(mOffset);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user