11 #include "../JuceLibraryCode/JuceHeader.h" 34 void paint(juce::Graphics&)
override;
39 virtual void comboBoxChanged(juce::ComboBox *)
override {
notifyToUpdate(); }
40 virtual void sliderValueChanged(juce::Slider *)
override {
notifyToUpdate(); }
45 std::mutex updatingGraph;
46 std::condition_variable updateComplete;
55 std::unique_ptr<std::thread> graphThread;
56 std::atomic<
bool> stopGraphThread =
false;
61 std::condition_variable mustUpdate;
64 static constexpr float GRAPH_TOTAL_TIME_S = 6.0f;
65 static constexpr float GRAPH_TIME_STEP_S = 1.0f / 500.0f;
66 static constexpr float GRAPH_AVG_SAMPLING_STEP = 10;
68 static constexpr float GRAPH_MAX_IR_VALUE = 10.0f;
float getParam(const juce::AudioProcessorValueTreeState ¶ms, const juce::String &blockId) const
Internal method used to get (and check) a parameter's value.
~UIGraphBlock()
Destroys a UIGraphBlock object.
void notifyToUpdate()
Signals thread to update graph.
void resized() override
Manages the layout of UIGraphBlock when the block is resized.
UIGraphBlock(AudioProcessor &processor)
Constructs a UIGraphBlock object.
void updateGraph(int updatePeriodMs)
Updates IR graph.