From 2cea9feefc003013b87e4aedf92a794cada68e68 Mon Sep 17 00:00:00 2001 From: xenakios Date: Mon, 5 Nov 2018 14:28:07 +0200 Subject: [PATCH] Set resampler rates when switching back from non stretched mode --- Source/PS_Source/StretchSource.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Source/PS_Source/StretchSource.cpp b/Source/PS_Source/StretchSource.cpp index d38118c..6e85205 100644 --- a/Source/PS_Source/StretchSource.cpp +++ b/Source/PS_Source/StretchSource.cpp @@ -229,6 +229,8 @@ void StretchAudioSource::setPreviewDry(bool b) if (m_cs.tryEnter()) { m_resampler->Reset(); + if (m_preview_dry == true && b == false && m_inputfile->info.nsamples>0) + m_resampler->SetRates(m_inputfile->info.samplerate, m_outsr); m_preview_dry = b; ++m_param_change_count; m_cs.exit();