[DEV] update new ETK
This commit is contained in:
parent
58e843f8aa
commit
b56fd19a20
@ -81,7 +81,7 @@ void audio::algo::chunkware::Limiter::init(int8_t _nbChannel) {
|
|||||||
|
|
||||||
void audio::algo::chunkware::FastEnvelope::setCoef() {
|
void audio::algo::chunkware::FastEnvelope::setCoef() {
|
||||||
// rises to 99% of in value over duration of time constant
|
// rises to 99% of in value over duration of time constant
|
||||||
m_coefficient = std::pow(0.01, (1000.0 / (m_timeMs * m_sampleRate)));
|
m_coefficient = etk::pow(0.01, (1000.0 / (m_timeMs * m_sampleRate)));
|
||||||
}
|
}
|
||||||
|
|
||||||
etk::Vector<enum audio::format> audio::algo::chunkware::Limiter::getSupportedFormat() {
|
etk::Vector<enum audio::format> audio::algo::chunkware::Limiter::getSupportedFormat() {
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
#include <audio/format.hpp>
|
#include <audio/format.hpp>
|
||||||
#include <audio/algo/chunkware/AttRelEnvelope.hpp>
|
#include <audio/algo/chunkware/AttRelEnvelope.hpp>
|
||||||
#include <audio/algo/chunkware/Gain.hpp>
|
#include <audio/algo/chunkware/Gain.hpp>
|
||||||
#include <chrono>
|
#include <echrono/Steady.hpp>
|
||||||
#include <etk/Vector.hpp>
|
#include <etk/Vector.hpp>
|
||||||
|
|
||||||
namespace audio {
|
namespace audio {
|
||||||
@ -97,7 +97,7 @@ namespace audio {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
std::chrono::microseconds m_attackTime; //!< attaque time in ms.
|
echrono::microseconds m_attackTime; //!< attaque time in ms.
|
||||||
public:
|
public:
|
||||||
virtual void setAttack(double _ms);
|
virtual void setAttack(double _ms);
|
||||||
virtual double getAttack() const {
|
virtual double getAttack() const {
|
||||||
@ -105,7 +105,7 @@ namespace audio {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
std::chrono::microseconds m_releaseTime; //!< attaque time in ms.
|
echrono::microseconds m_releaseTime; //!< attaque time in ms.
|
||||||
public:
|
public:
|
||||||
virtual void setRelease(double _ms);
|
virtual void setRelease(double _ms);
|
||||||
virtual double getRelease() const {
|
virtual double getRelease() const {
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
#include <audio/algo/chunkware/Limiter.hpp>
|
#include <audio/algo/chunkware/Limiter.hpp>
|
||||||
#include <audio/algo/chunkware/Gate.hpp>
|
#include <audio/algo/chunkware/Gate.hpp>
|
||||||
#include <etk/os/FSNode.hpp>
|
#include <etk/os/FSNode.hpp>
|
||||||
#include <chrono>
|
#include <echrono/Steady.hpp>
|
||||||
#include <ethread/Thread.hpp>
|
#include <ethread/Thread.hpp>
|
||||||
|
|
||||||
|
|
||||||
@ -39,11 +39,11 @@ static etk::Vector<int16_t> convert(const etk::Vector<double>& _data) {
|
|||||||
|
|
||||||
class Performance {
|
class Performance {
|
||||||
private:
|
private:
|
||||||
std::chrono::steady_clock::time_point m_timeStart;
|
echrono::Steady m_timeStart;
|
||||||
std::chrono::steady_clock::time_point m_timeStop;
|
echrono::Steady m_timeStop;
|
||||||
std::chrono::nanoseconds m_totalTimeProcessing;
|
echrono::nanoseconds m_totalTimeProcessing;
|
||||||
std::chrono::nanoseconds m_minProcessing;
|
echrono::nanoseconds m_minProcessing;
|
||||||
std::chrono::nanoseconds m_maxProcessing;
|
echrono::nanoseconds m_maxProcessing;
|
||||||
int32_t m_totalIteration;
|
int32_t m_totalIteration;
|
||||||
public:
|
public:
|
||||||
Performance() :
|
Performance() :
|
||||||
@ -54,11 +54,11 @@ class Performance {
|
|||||||
|
|
||||||
}
|
}
|
||||||
void tic() {
|
void tic() {
|
||||||
m_timeStart = std::chrono::steady_clock::now();
|
m_timeStart = echrono::Steady::now();
|
||||||
}
|
}
|
||||||
void toc() {
|
void toc() {
|
||||||
m_timeStop = std::chrono::steady_clock::now();
|
m_timeStop = echrono::Steady::now();
|
||||||
std::chrono::nanoseconds time = m_timeStop - m_timeStart;
|
echrono::nanoseconds time = m_timeStop - m_timeStart;
|
||||||
m_minProcessing = etk::min(m_minProcessing, time);
|
m_minProcessing = etk::min(m_minProcessing, time);
|
||||||
m_maxProcessing = etk::max(m_maxProcessing, time);
|
m_maxProcessing = etk::max(m_maxProcessing, time);
|
||||||
m_totalTimeProcessing += time;
|
m_totalTimeProcessing += time;
|
||||||
@ -66,13 +66,13 @@ class Performance {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::chrono::nanoseconds getTotalTimeProcessing() {
|
echrono::nanoseconds getTotalTimeProcessing() {
|
||||||
return m_totalTimeProcessing;
|
return m_totalTimeProcessing;
|
||||||
}
|
}
|
||||||
std::chrono::nanoseconds getMinProcessing() {
|
echrono::nanoseconds getMinProcessing() {
|
||||||
return m_minProcessing;
|
return m_minProcessing;
|
||||||
}
|
}
|
||||||
std::chrono::nanoseconds getMaxProcessing() {
|
echrono::nanoseconds getMaxProcessing() {
|
||||||
return m_maxProcessing;
|
return m_maxProcessing;
|
||||||
}
|
}
|
||||||
int32_t getTotalIteration() {
|
int32_t getTotalIteration() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user