MCPcopy Create free account
hub / github.com/audacity/audacity / UpdateEnvelopeTrackLen

Method UpdateEnvelopeTrackLen

libraries/lib-wave-track/WaveClip.cpp:807–813  ·  view source on GitHub ↗

! @excsafety{No-fail} */

Source from the content-addressed store, hash-verified

805
806/*! @excsafety{No-fail} */
807void WaveClip::UpdateEnvelopeTrackLen()
808{
809 // The envelope time points account for stretching.
810 const auto len = GetNumSamples().as_double() * GetStretchRatio() / mRate;
811 if (len != mEnvelope->GetTrackLen())
812 mEnvelope->SetTrackLen(len, 1.0 / GetRate());
813}
814
815/*! @excsafety{Strong} */
816std::shared_ptr<SampleBlock>

Callers 1

ImportMethod · 0.80

Calls 3

GetNumSamplesFunction · 0.85
SetTrackLenMethod · 0.80
GetRateFunction · 0.70

Tested by

no test coverage detected