Set resampler rates when switching back from non stretched mode

This commit is contained in:
xenakios 2018-11-05 14:28:07 +02:00
parent bdcb268508
commit 2cea9feefc

View File

@ -229,6 +229,8 @@ void StretchAudioSource::setPreviewDry(bool b)
if (m_cs.tryEnter()) if (m_cs.tryEnter())
{ {
m_resampler->Reset(); 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_preview_dry = b;
++m_param_change_count; ++m_param_change_count;
m_cs.exit(); m_cs.exit();