mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-25 15:53:52 +02:00
Change evaluation of envelope near discontinuities...
... So that even if the time is "slightly" (less than 1/2 sample interval) left of the discontinuity, the right-hand limit is always used. Thus this compensates for some roundoff errors when pasting one clip with an envelope into another. This overcomes the objections that were in a comment in Envelope::Paste to making control points with exactly equal times. And therefore Paste can be rewritten to do so, but that has not happened yet. Envelope points at exactly equal time coordinates can already be made by dragging points in the envelope editor.
This commit is contained in:
@@ -259,8 +259,12 @@ class AUDACITY_DLL_API WaveTrack final : public PlayableTrack {
|
||||
fillFormat fill = fillZero, bool mayThrow = true) const;
|
||||
void Set(samplePtr buffer, sampleFormat format,
|
||||
sampleCount start, size_t len);
|
||||
|
||||
// Fetch envelope values corresponding to uniformly separated sample times
|
||||
// starting at the given time.
|
||||
void GetEnvelopeValues(double *buffer, size_t bufferLen,
|
||||
double t0) const;
|
||||
|
||||
std::pair<float, float> GetMinMax(
|
||||
double t0, double t1, bool mayThrow = true) const;
|
||||
float GetRMS(double t0, double t1, bool mayThrow = true) const;
|
||||
|
||||
Reference in New Issue
Block a user