1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-21 16:37:12 +01:00

More Envelope::GetValueRelative; add point for join only as needed

This commit is contained in:
Paul Licameli
2017-05-09 15:54:49 -04:00
parent 250a2ea12a
commit 6c2c2733f9
3 changed files with 14 additions and 5 deletions

View File

@@ -1626,9 +1626,8 @@ void WaveClip::InsertSilence( double t, double len, double *pEnvelopeValue )
// Preserve limit value at the end
auto oldLen = pEnvelope->GetTrackLen();
auto oldT = pEnvelope->GetOffset() + oldLen;
auto newLen = oldLen + len;
pEnvelope->InsertOrReplace( oldT, pEnvelope->GetValue( oldT ) );
pEnvelope->Cap( sampleTime );
// Ramp across the silence to the given value
pEnvelope->SetTrackLen( newLen );