diff --git a/src/widgets/Meter.cpp b/src/widgets/Meter.cpp index 8188452ec..b839b33ed 100644 --- a/src/widgets/Meter.cpp +++ b/src/widgets/Meter.cpp @@ -43,6 +43,7 @@ #include #include +#include #include #include #include @@ -1129,9 +1130,10 @@ void Meter::RepaintBarsNow() if (mLayoutValid) { wxClientDC dc(this); + wxBufferedDC bufDC(&dc, *mBitmap); for (int i = 0; i < mNumBars; i++) { - DrawMeterBar(dc, &mBar[i]); + DrawMeterBar(bufDC, &mBar[i]); } } } @@ -1213,7 +1215,6 @@ void Meter::DrawMeterBar(wxDC &dc, MeterBar *meterBar) if (meterBar->vert) { // Calculate the peak and rms rectangles - // (+1 and -1 to not overlay the bevel) ht = (int)(meterBar->peak * h + 0.5); r = wxRect(x, y + h - ht, w, ht); ht = (int)(meterBar->rms * h + 0.5); diff --git a/src/widgets/Meter.h b/src/widgets/Meter.h index 33382c60c..28789a7b0 100644 --- a/src/widgets/Meter.h +++ b/src/widgets/Meter.h @@ -25,7 +25,7 @@ #include "Ruler.h" // Event used to notify all meters of preference changes -DECLARE_EVENT_TYPE(EVT_METER_PREFERENCES_CHANGED, -1); +DECLARE_EXPORTED_EVENT_TYPE(AUDACITY_DLL_API, EVT_METER_PREFERENCES_CHANGED, -1); // Increase this when we add support for multichannel meters // (most of the code is already there) @@ -43,7 +43,6 @@ struct MeterBar { bool isclipping; //ANSWER-ME: What's the diff between these bools?! "clipping" vs "isclipping" is not clear. int tailPeakCount; float peakPeakHold; - wxBitmap bitmap; }; class MeterUpdateMsg