Added dedicated timer for perf meter component
This commit is contained in:
parent
60293c6a84
commit
fa2564f908
@ -411,7 +411,7 @@ void PaulstretchpluginAudioProcessorEditor::timerCallback(int id)
|
||||
if (processor.m_offline_render_state >= 0 && processor.m_offline_render_state <= 100)
|
||||
infotext += String(processor.m_offline_render_state)+"%";
|
||||
m_info_label.setText(infotext, dontSendNotification);
|
||||
m_perfmeter.repaint();
|
||||
|
||||
}
|
||||
if (id == 2)
|
||||
{
|
||||
@ -1277,6 +1277,7 @@ PerfMeterComponent::PerfMeterComponent(PaulstretchpluginAudioProcessor * p)
|
||||
m_gradient.addColour(0.0, Colours::red);
|
||||
m_gradient.addColour(0.25, Colours::yellow);
|
||||
m_gradient.addColour(1.0, Colours::green);
|
||||
startTimer(30);
|
||||
}
|
||||
|
||||
void PerfMeterComponent::paint(Graphics & g)
|
||||
@ -1318,6 +1319,11 @@ void PerfMeterComponent::mouseDown(const MouseEvent & ev)
|
||||
}
|
||||
}
|
||||
|
||||
void PerfMeterComponent::timerCallback()
|
||||
{
|
||||
repaint();
|
||||
}
|
||||
|
||||
void zoom_scrollbar::mouseDown(const MouseEvent &e)
|
||||
{
|
||||
m_drag_start_x = e.x;
|
||||
|
@ -104,12 +104,13 @@ private:
|
||||
Colour m_labeldefcolor;
|
||||
};
|
||||
|
||||
class PerfMeterComponent : public Component
|
||||
class PerfMeterComponent : public Component, public Timer
|
||||
{
|
||||
public:
|
||||
PerfMeterComponent(PaulstretchpluginAudioProcessor* p);
|
||||
void paint(Graphics& g) override;
|
||||
void mouseDown(const MouseEvent& ev) override;
|
||||
void timerCallback() override;
|
||||
PaulstretchpluginAudioProcessor* m_proc = nullptr;
|
||||
private:
|
||||
ColourGradient m_gradient;
|
||||
|
Loading…
Reference in New Issue
Block a user