[DEV] update new ETK

This commit is contained in:
Edouard DUPIN 2017-09-26 15:57:44 +02:00
parent 58e843f8aa
commit b56fd19a20
3 changed files with 16 additions and 16 deletions

View File

@ -81,7 +81,7 @@ void audio::algo::chunkware::Limiter::init(int8_t _nbChannel) {
void audio::algo::chunkware::FastEnvelope::setCoef() {
// 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() {

View File

@ -28,7 +28,7 @@
#include <audio/format.hpp>
#include <audio/algo/chunkware/AttRelEnvelope.hpp>
#include <audio/algo/chunkware/Gain.hpp>
#include <chrono>
#include <echrono/Steady.hpp>
#include <etk/Vector.hpp>
namespace audio {
@ -97,7 +97,7 @@ namespace audio {
}
protected:
std::chrono::microseconds m_attackTime; //!< attaque time in ms.
echrono::microseconds m_attackTime; //!< attaque time in ms.
public:
virtual void setAttack(double _ms);
virtual double getAttack() const {
@ -105,7 +105,7 @@ namespace audio {
}
protected:
std::chrono::microseconds m_releaseTime; //!< attaque time in ms.
echrono::microseconds m_releaseTime; //!< attaque time in ms.
public:
virtual void setRelease(double _ms);
virtual double getRelease() const {

View File

@ -10,7 +10,7 @@
#include <audio/algo/chunkware/Limiter.hpp>
#include <audio/algo/chunkware/Gate.hpp>
#include <etk/os/FSNode.hpp>
#include <chrono>
#include <echrono/Steady.hpp>
#include <ethread/Thread.hpp>
@ -39,11 +39,11 @@ static etk::Vector<int16_t> convert(const etk::Vector<double>& _data) {
class Performance {
private:
std::chrono::steady_clock::time_point m_timeStart;
std::chrono::steady_clock::time_point m_timeStop;
std::chrono::nanoseconds m_totalTimeProcessing;
std::chrono::nanoseconds m_minProcessing;
std::chrono::nanoseconds m_maxProcessing;
echrono::Steady m_timeStart;
echrono::Steady m_timeStop;
echrono::nanoseconds m_totalTimeProcessing;
echrono::nanoseconds m_minProcessing;
echrono::nanoseconds m_maxProcessing;
int32_t m_totalIteration;
public:
Performance() :
@ -54,11 +54,11 @@ class Performance {
}
void tic() {
m_timeStart = std::chrono::steady_clock::now();
m_timeStart = echrono::Steady::now();
}
void toc() {
m_timeStop = std::chrono::steady_clock::now();
std::chrono::nanoseconds time = m_timeStop - m_timeStart;
m_timeStop = echrono::Steady::now();
echrono::nanoseconds time = m_timeStop - m_timeStart;
m_minProcessing = etk::min(m_minProcessing, time);
m_maxProcessing = etk::max(m_maxProcessing, time);
m_totalTimeProcessing += time;
@ -66,13 +66,13 @@ class Performance {
}
std::chrono::nanoseconds getTotalTimeProcessing() {
echrono::nanoseconds getTotalTimeProcessing() {
return m_totalTimeProcessing;
}
std::chrono::nanoseconds getMinProcessing() {
echrono::nanoseconds getMinProcessing() {
return m_minProcessing;
}
std::chrono::nanoseconds getMaxProcessing() {
echrono::nanoseconds getMaxProcessing() {
return m_maxProcessing;
}
int32_t getTotalIteration() {