MCPcopy Create free account
hub / github.com/audacity/audacity / CompressionMeterPanel

Class CompressionMeterPanel

src/effects/CompressionMeterPanel.h:25–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23class wxPaintDC;
24
25class CompressionMeterPanel final : public wxPanelWrapper
26{
27public:
28 CompressionMeterPanel(
29 wxWindow* parent, int id, CompressorInstance& instance, float dbRange,
30 std::function<void()> onClipped);
31
32 void SetDbRange(float dbRange);
33 void Reset();
34 void ResetClipped();
35
36protected:
37 DECLARE_EVENT_TABLE();
38
39private:
40 void PaintMeter(
41 wxPaintDC& dc, const wxColor& color, const wxRect& rect,
42 const MeterValueProvider& provider);
43
44 void OnPaint(wxPaintEvent& evt);
45 void OnTimer(wxTimerEvent& evt);
46
47 bool AcceptsFocus() const override;
48 // So that wxPanel is not included in Tab traversal - see wxWidgets bug 15581
49 bool AcceptsFocusFromKeyboard() const override;
50
51 const std::shared_ptr<DynamicRangeProcessorMeterValuesQueue>
52 mMeterValuesQueue;
53 const Observer::Subscription mPlaybackStartStopSubscription;
54 const Observer::Subscription mPlaybackPausedSubscription;
55 const std::function<void()> mOnClipped;
56 std::unique_ptr<MeterValueProvider> mCompressionMeter;
57 std::unique_ptr<MeterValueProvider> mOutputMeter;
58 float mDbBottomEdgeValue;
59
60 wxTimer mTimer;
61 bool mStopWhenZero = false;
62 bool mClipped = false;
63};

Callers 1

PopulateOrExchangeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected