Added duplicate method for breakpoint envelope. NOTE : the copy is not fully implemented yet. Get free filter envelope duplicate for use with offline rendering.

This commit is contained in:
xenakios 2018-06-05 21:40:03 +03:00
parent c010a4d48f
commit 1b4c75df0a
2 changed files with 11 additions and 0 deletions

View File

@ -467,6 +467,8 @@ String PaulstretchpluginAudioProcessor::offlineRender(File outputfile)
File outputfiletouse = outputfile.getNonexistentSibling();
int numoutchans = *getIntParameter(cpi_num_outchans);
auto ss = std::make_shared<StretchAudioSource>(numoutchans,m_afm,m_sm_enab_pars);
shared_envelope free_env = m_free_filter_envelope->duplicate();
ss->setFreeFilterEnvelope(free_env);
int blocksize = 2048;
ss->setAudioFile(m_current_file);

View File

@ -208,6 +208,15 @@ public:
m_value_grid={0.0,0.25,0.5,0.75,1.0};
m_randbuf.resize(1024);
}
std::unique_ptr<breakpoint_envelope> duplicate()
{
auto result = std::make_unique<breakpoint_envelope>();
result->m_nodes = m_nodes;
result->m_randbuf = m_randbuf;
result->m_transform_wrap_x = m_transform_wrap_x;
result->m_transform_x_shift = m_transform_x_shift;
return result;
}
void SetName(String Name) { m_name=Name; }