Remove the spectral module selection and move parameters. Initial attempt to implement the module enabled parameters. Might need to redesign this a bit...

This commit is contained in:
xenakios
2018-03-06 13:44:36 +02:00
parent 4f148a322d
commit 7fe4ea982e
5 changed files with 49 additions and 8 deletions

View File

@ -159,6 +159,35 @@ void StretchAudioSource::setMainVolume(double decibels)
}
}
void StretchAudioSource::setSpectralModulesEnabled(const std::array<AudioParameterBool*, 9>& params)
{
jassert(params.size() == m_specproc_order.size());
bool changed = false;
for (int i = 0; i < m_specproc_order.size(); ++i)
{
if (*params[i] != m_specproc_order[i].m_enabled)
{
changed = true;
break;
}
}
if (changed == false)
return;
if (m_cs.tryEnter())
{
for (int i = 0; i < m_specproc_order.size(); ++i)
{
m_specproc_order[i].m_enabled = *params[i];
}
for (int i = 0; i < m_stretchers.size(); ++i)
{
m_stretchers[i]->m_spectrum_processes = m_specproc_order;
}
++m_param_change_count;
m_cs.exit();
}
}
void StretchAudioSource::setLoopXFadeLength(double lenseconds)
{
if (lenseconds == m_loopxfadelen)