From 0b52559ab121bcb1d23ac196c866a862a610eed0 Mon Sep 17 00:00:00 2001 From: xenakios Date: Fri, 2 Mar 2018 19:33:47 +0200 Subject: [PATCH] Stuff --- Source/PluginEditor.cpp | 21 +++++++++++++++++++-- Source/PluginEditor.h | 1 + 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/Source/PluginEditor.cpp b/Source/PluginEditor.cpp index a4e73da..fe1f74d 100644 --- a/Source/PluginEditor.cpp +++ b/Source/PluginEditor.cpp @@ -133,6 +133,21 @@ PaulstretchpluginAudioProcessorEditor::PaulstretchpluginAudioProcessorEditor(Pau }; 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(); }; m_wave_container->addAndMakeVisible(&m_wavecomponent); @@ -282,8 +297,10 @@ void PaulstretchpluginAudioProcessorEditor::timerCallback(int id) { if (id == 1) { - for (auto& e : m_parcomps) - e->updateComponent(); + for (int i = 0; i < m_parcomps.size(); ++i) + { + m_parcomps[i]->updateComponent(); + } if (processor.isRecordingEnabled()) { m_wavecomponent.setRecordingPosition(processor.getRecordingPositionPercent()); diff --git a/Source/PluginEditor.h b/Source/PluginEditor.h index 695cc3f..521ec94 100644 --- a/Source/PluginEditor.h +++ b/Source/PluginEditor.h @@ -193,6 +193,7 @@ public: void mouseUp(const MouseEvent& ev) override; std::function ModuleSelectedCallback; std::function ModuleOrderOrEnabledChangedCallback; + const std::vector & getOrder() const { return m_order; } private: StretchAudioSource * m_src = nullptr; bool m_did_drag = false;