This commit is contained in:
xenakios 2018-03-02 19:33:47 +02:00
parent 595b5992f6
commit 0b52559ab1
2 changed files with 20 additions and 2 deletions

View File

@ -133,6 +133,21 @@ PaulstretchpluginAudioProcessorEditor::PaulstretchpluginAudioProcessorEditor(Pau
}; };
m_spec_order_ed.ModuleOrderOrEnabledChangedCallback = [this]() m_spec_order_ed.ModuleOrderOrEnabledChangedCallback = [this]()
{ {
/*
const auto& specord = processor.getStretchSource()->getSpectrumProcessOrder();
for (int i = 0; i < specord.size(); ++i)
{
int grtofind = specord[i].m_index;
for (int j = 0; j < m_parcomps.size(); ++j)
{
int gid = m_parcomps[j]->m_group_id;
if (gid == grtofind)
{
m_parcomps[j]->setEnabled(specord[i].m_enabled);
}
}
}
*/
processor.setDirty(); processor.setDirty();
}; };
m_wave_container->addAndMakeVisible(&m_wavecomponent); m_wave_container->addAndMakeVisible(&m_wavecomponent);
@ -282,8 +297,10 @@ void PaulstretchpluginAudioProcessorEditor::timerCallback(int id)
{ {
if (id == 1) if (id == 1)
{ {
for (auto& e : m_parcomps) for (int i = 0; i < m_parcomps.size(); ++i)
e->updateComponent(); {
m_parcomps[i]->updateComponent();
}
if (processor.isRecordingEnabled()) if (processor.isRecordingEnabled())
{ {
m_wavecomponent.setRecordingPosition(processor.getRecordingPositionPercent()); m_wavecomponent.setRecordingPosition(processor.getRecordingPositionPercent());

View File

@ -193,6 +193,7 @@ public:
void mouseUp(const MouseEvent& ev) override; void mouseUp(const MouseEvent& ev) override;
std::function<void(int)> ModuleSelectedCallback; std::function<void(int)> ModuleSelectedCallback;
std::function<void(void)> ModuleOrderOrEnabledChangedCallback; std::function<void(void)> ModuleOrderOrEnabledChangedCallback;
const std::vector <SpectrumProcess>& getOrder() const { return m_order; }
private: private:
StretchAudioSource * m_src = nullptr; StretchAudioSource * m_src = nullptr;
bool m_did_drag = false; bool m_did_drag = false;