#12266·audacity

Refactor clips stretching

Author: ianalarinaCreated Sep 22, 2026Updated Oct 1, 2026
LabelsTaskrefactoring

Description

Quoting @saintmatthieu

the way we derive and maintain a clip's stretch ratio (which is the ultimate goal), the history of it (mClipTempo doesn't make sense to me, actually, I should have challenged this change back then. It used to be mProjectTempo , it became mClipTempo) I suspect that there's a better modelling that would make things simpler and less error-prone.

We need to refactor / simplify the clip stretching calculation, currently differences between Audacity 3 and Audacity 4 are resulting in data corruption during import.

Hot fixed in 4.0.1: #12213

Relevant: #7715