mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-17 10:55:32 +08:00
[AFV} Ref T730, fixed CPPCheck issues and Artistic style applied
This commit is contained in:
@@ -40,6 +40,7 @@ namespace chunkware_simple
|
|||||||
, threshdB_(0.0)
|
, threshdB_(0.0)
|
||||||
, ratio_(1.0)
|
, ratio_(1.0)
|
||||||
, envdB_(DC_OFFSET)
|
, envdB_(DC_OFFSET)
|
||||||
|
, makeUpGain_(1.0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ namespace chunkware_simple
|
|||||||
// runtime variables
|
// runtime variables
|
||||||
double envdB_; // over-threshold envelope (dB)
|
double envdB_; // over-threshold envelope (dB)
|
||||||
|
|
||||||
double makeUpGain_;
|
double makeUpGain_ = 1.0;
|
||||||
|
|
||||||
}; // end SimpleComp class
|
}; // end SimpleComp class
|
||||||
|
|
||||||
@@ -86,7 +86,7 @@ namespace chunkware_simple
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
SimpleCompRms();
|
SimpleCompRms();
|
||||||
virtual ~SimpleCompRms() {}
|
virtual ~SimpleCompRms() override {}
|
||||||
|
|
||||||
// sample rate
|
// sample rate
|
||||||
virtual void setSampleRate(double sampleRate) override;
|
virtual void setSampleRate(double sampleRate) override;
|
||||||
|
|||||||
@@ -27,7 +27,6 @@
|
|||||||
* DEALINGS IN THE SOFTWARE.
|
* DEALINGS IN THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "SimpleEnvelope.h"
|
#include "SimpleEnvelope.h"
|
||||||
|
|
||||||
namespace chunkware_simple
|
namespace chunkware_simple
|
||||||
@@ -41,7 +40,10 @@ namespace chunkware_simple
|
|||||||
assert(ms > 0.0);
|
assert(ms > 0.0);
|
||||||
sampleRate_ = sampleRate;
|
sampleRate_ = sampleRate;
|
||||||
ms_ = ms;
|
ms_ = ms;
|
||||||
setCoef();
|
|
||||||
|
// setCoef();
|
||||||
|
// TODO: KB avoid virtual function call in ctor
|
||||||
|
coef_ = exp(-1000.0 / (ms_ * sampleRate_));
|
||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------------------------------------------
|
//-------------------------------------------------------------
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ namespace chunkware_simple
|
|||||||
//-------------------------------------------------------------
|
//-------------------------------------------------------------
|
||||||
void SimpleLimit::setAttack(double ms)
|
void SimpleLimit::setAttack(double ms)
|
||||||
{
|
{
|
||||||
unsigned int samp = int( 0.001 * ms * att_.getSampleRate() );
|
unsigned int samp = static_cast<unsigned>(0.001 * ms * att_.getSampleRate());
|
||||||
|
|
||||||
assert(samp < BUFFER_SIZE);
|
assert(samp < BUFFER_SIZE);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user