Support resampled playrate changes for non stretched playback

This commit is contained in:
xenakios
2018-08-20 15:49:51 +03:00
parent d0f912ba1f
commit 8d008e5d2e
6 changed files with 29 additions and 3 deletions

View File

@ -169,7 +169,7 @@ PaulstretchpluginAudioProcessor::PaulstretchpluginAudioProcessor()
addParameter(new AudioParameterBool("loop_enabled0", "Loop", true)); // 60
addParameter(new AudioParameterBool("rewind0", "Rewind", false)); // 61
addParameter(new AudioParameterFloat("dryplayrate0", "Dry playrate", 0.1, 8.0, 1.0)); // 62
auto& pars = getParameters();
for (const auto& p : pars)
m_reset_pars.push_back(p->getValue());
@ -697,6 +697,7 @@ void PaulstretchpluginAudioProcessor::processBlock (AudioSampleBuffer& buffer, M
m_stretch_source->setMainVolume(*getFloatParameter(cpi_main_volume));
m_stretch_source->setRate(*getFloatParameter(cpi_stretchamount));
m_stretch_source->setPreviewDry(*getBoolParameter(cpi_bypass_stretch));
m_stretch_source->setDryPlayrate(*getFloatParameter(cpi_dryplayrate));
setFFTSize(*getFloatParameter(cpi_fftsize));
updateStretchParametersFromPluginParameters(m_ppar);