1 #pragma once 2 3 #include "engine/engineobject.h" 4 5 class ControlPotmeter; 6 class ControlProxy; 7 8 class EngineVuMeter : public EngineObject { 9 Q_OBJECT 10 public: 11 EngineVuMeter(const QString& group); 12 virtual ~EngineVuMeter(); 13 14 virtual void process(CSAMPLE* pInOut, const int iBufferSize); 15 16 void reset(); 17 18 private: 19 void doSmooth(CSAMPLE ¤tVolume, CSAMPLE newVolume); 20 21 ControlPotmeter* m_ctrlVuMeter; 22 ControlPotmeter* m_ctrlVuMeterL; 23 ControlPotmeter* m_ctrlVuMeterR; 24 CSAMPLE m_fRMSvolumeL; 25 CSAMPLE m_fRMSvolumeSumL; 26 CSAMPLE m_fRMSvolumeR; 27 CSAMPLE m_fRMSvolumeSumR; 28 int m_iSamplesCalculated; 29 30 ControlPotmeter* m_ctrlPeakIndicator; 31 ControlPotmeter* m_ctrlPeakIndicatorL; 32 ControlPotmeter* m_ctrlPeakIndicatorR; 33 int m_peakDurationL; 34 int m_peakDurationR; 35 36 ControlProxy* m_pSampleRate; 37 }; 38