From ecbb09689abb863631ff03ccd20172ad7f290c92 Mon Sep 17 00:00:00 2001 From: Dmitry Makarenko Date: Sun, 30 Mar 2025 10:46:30 +0300 Subject: [PATCH] Fix #8559 Joining is broken for pitched clips when rendering is not required (cherry picked from commit 22417b60bedbf48574998eef04f9bfa9a531bb12) --- libraries/lib-wave-track/WaveClip.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libraries/lib-wave-track/WaveClip.cpp b/libraries/lib-wave-track/WaveClip.cpp index 24acb87fa..13dac82f9 100644 --- a/libraries/lib-wave-track/WaveClip.cpp +++ b/libraries/lib-wave-track/WaveClip.cpp @@ -1116,9 +1116,11 @@ bool WaveClip::Paste(double t0, const WaveClip& o) if (GetSequenceSamplesCount() == 0) { - // Empty clip: we're flexible and adopt the other's stretching. - mRawAudioTempo = other.mRawAudioTempo; + // Empty clip: we're flexible and adopt the other's pitch and stretch. + mPitchAndSpeedPreset = other.mPitchAndSpeedPreset; + mCentShift = other.mCentShift; mClipStretchRatio = other.mClipStretchRatio; + mRawAudioTempo = other.mRawAudioTempo; mProjectTempo = other.mProjectTempo; } else if (!HasEqualPitchAndSpeed(other))