From 003788c89b36812383236d744e536f01438e4b08 Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Mon, 21 Oct 2019 23:29:18 +0200 Subject: [PATCH] Style --- src/blackmisc/aviation/flightplan.cpp | 2 +- src/blackmisc/aviation/modulator.cpp | 4 ++-- src/blacksound/dsp/SimpleComp.h | 33 ++++++++++++++++----------- 3 files changed, 23 insertions(+), 16 deletions(-) diff --git a/src/blackmisc/aviation/flightplan.cpp b/src/blackmisc/aviation/flightplan.cpp index 7af892aab..d8db43a1b 100644 --- a/src/blackmisc/aviation/flightplan.cpp +++ b/src/blackmisc/aviation/flightplan.cpp @@ -260,7 +260,7 @@ namespace BlackMisc { QString r = route; r.replace(':', ' '); - m_route = asciiOnlyString(r).left(MaxRouteLength).toUpper(); + m_route = asciiOnlyString(r).left(MaxRouteLength).toUpper(); } void CFlightPlan::setRemarks(const QString &remarks) diff --git a/src/blackmisc/aviation/modulator.cpp b/src/blackmisc/aviation/modulator.cpp index 4ee31ab13..8a605b3ea 100644 --- a/src/blackmisc/aviation/modulator.cpp +++ b/src/blackmisc/aviation/modulator.cpp @@ -34,13 +34,13 @@ namespace BlackMisc } template - BlackMisc::PhysicalQuantities::CFrequency CModulator::getFrequencyActive() const + PhysicalQuantities::CFrequency CModulator::getFrequencyActive() const { return m_frequencyActive; } template - BlackMisc::PhysicalQuantities::CFrequency CModulator::getFrequencyStandby() const + PhysicalQuantities::CFrequency CModulator::getFrequencyStandby() const { return m_frequencyStandby; } diff --git a/src/blacksound/dsp/SimpleComp.h b/src/blacksound/dsp/SimpleComp.h index 59a957c3f..99d28de68 100644 --- a/src/blacksound/dsp/SimpleComp.h +++ b/src/blacksound/dsp/SimpleComp.h @@ -27,9 +27,8 @@ * DEALINGS IN THE SOFTWARE. */ - -#ifndef __SIMPLE_COMP_H__ -#define __SIMPLE_COMP_H__ +#ifndef chunkware_simple_SIMPLE_COMP_H +#define chunkware_simple_SIMPLE_COMP_H #include "SimpleHeader.h" // common header #include "SimpleEnvelope.h" // for base class @@ -41,7 +40,10 @@ namespace chunkware_simple class SimpleComp : public AttRelEnvelope { public: + //! Ctor SimpleComp(); + + //! Dtor virtual ~SimpleComp() {} //! @{ set parameters @@ -56,8 +58,8 @@ namespace chunkware_simple double getMakeUpGain(void) const { return makeUpGain_; } //! @} - //! init runtime - //! call before runtime (in resume()) + //! Init runtime + //! \pre Call before runtime (in resume()) virtual void initRuntime(void); //! compressor runtime process @@ -67,14 +69,12 @@ namespace chunkware_simple void process(double &in1, double &in2, double keyLinked); private: - // transfer function double threshdB_; // threshold (dB) double ratio_; // ratio (compression: < 1 ; expansion: > 1) // runtime variables double envdB_; // over-threshold envelope (dB) - double makeUpGain_ = 1.0; }; // end SimpleComp class @@ -85,19 +85,26 @@ namespace chunkware_simple class SimpleCompRms : public SimpleComp { public: + //! Ctor SimpleCompRms(); + + //! Dtor virtual ~SimpleCompRms() override {} - // sample rate + //! Sample rate virtual void setSampleRate(double sampleRate) override; - // RMS window + //! RMS window + //! @{ virtual void setWindow(double ms); virtual double getWindow(void) const { return ave_.getTc(); } + //! @} - // runtime process - virtual void initRuntime(void) override; // call before runtime (in resume()) - void process(double &in1, double &in2); // compressor runtime process + //! Runtime process + //! @{ + virtual void initRuntime(void) override; // call before runtime (in resume()) + void process(double &in1, double &in2); // compressor runtime process + //! @} private: @@ -111,4 +118,4 @@ namespace chunkware_simple // include inlined process function #include "SimpleCompProcess.inl" -#endif // end __SIMPLE_COMP_H__ +#endif // guard