From 3a61ded5834b686b6afd95d0a7c8abc3cd271e6b Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Tue, 8 Mar 2016 21:29:34 +0100 Subject: [PATCH] [DEV] update of external of elog and ethread --- audio/algo/river/Lms.cpp | 4 ++-- audio/algo/river/Lms.h | 4 ++-- audio/algo/river/Nlms.cpp | 4 ++-- audio/algo/river/Nlms.h | 4 ++-- audio/algo/river/Suppressor.cpp | 12 ++++++------ audio/algo/river/Suppressor.h | 8 ++++---- audio/algo/river/debug.cpp | 2 +- audio/algo/river/debug.h | 4 ++-- test/main.cpp | 22 +++++++++++----------- 9 files changed, 32 insertions(+), 32 deletions(-) diff --git a/audio/algo/river/Lms.cpp b/audio/algo/river/Lms.cpp index cac0667..2f71de5 100644 --- a/audio/algo/river/Lms.cpp +++ b/audio/algo/river/Lms.cpp @@ -128,7 +128,7 @@ namespace audio { return out; } - void setFilterTime(std11::chrono::microseconds _time) { + void setFilterTime(std::chrono::microseconds _time) { setFilterSize((m_sampleRate*_time.count())/1000000LL); } @@ -193,7 +193,7 @@ void audio::algo::river::Lms::process(void* _output, const void* _input, const v } -void audio::algo::river::Lms::setFilterTime(std11::chrono::microseconds _time) { +void audio::algo::river::Lms::setFilterTime(std::chrono::microseconds _time) { if (m_private == nullptr) { AA_RIVER_ERROR("Algo is not initialized..."); } diff --git a/audio/algo/river/Lms.h b/audio/algo/river/Lms.h index 6e1d56d..e583387 100644 --- a/audio/algo/river/Lms.h +++ b/audio/algo/river/Lms.h @@ -109,13 +109,13 @@ namespace audio { */ virtual void process(void* _output, const void* _input, const void* _inputFeedback, size_t _nbChunk); protected: - std11::shared_ptr m_private; // private data. + std::shared_ptr m_private; // private data. public: // parameter area: /** * @brief Set filter size with specifing the filter temporal size and his samplerate * @param[in] _time Time of the filter size */ - virtual void setFilterTime(std11::chrono::microseconds _time); + virtual void setFilterTime(std::chrono::microseconds _time); /** * @brief Set filter size in number of sample * @param[in] _nbSample Sample size of the filter diff --git a/audio/algo/river/Nlms.cpp b/audio/algo/river/Nlms.cpp index bde5180..472cc70 100644 --- a/audio/algo/river/Nlms.cpp +++ b/audio/algo/river/Nlms.cpp @@ -153,7 +153,7 @@ namespace audio { return out; } - void setFilterTime(std11::chrono::microseconds _time) { + void setFilterTime(std::chrono::microseconds _time) { setFilterSize((m_sampleRate*_time.count())/1000000LL); } @@ -218,7 +218,7 @@ void audio::algo::river::Nlms::process(void* _output, const void* _input, const } -void audio::algo::river::Nlms::setFilterTime(std11::chrono::microseconds _time) { +void audio::algo::river::Nlms::setFilterTime(std::chrono::microseconds _time) { if (m_private == nullptr) { AA_RIVER_ERROR("Algo is not initialized..."); } diff --git a/audio/algo/river/Nlms.h b/audio/algo/river/Nlms.h index 24ec947..f0e6544 100644 --- a/audio/algo/river/Nlms.h +++ b/audio/algo/river/Nlms.h @@ -109,13 +109,13 @@ namespace audio { */ virtual void process(void* _output, const void* _input, const void* _inputFeedback, size_t _nbChunk); protected: - std11::shared_ptr m_private; // private data. + std::shared_ptr m_private; // private data. public: // parameter area: /** * @brief Set filter size with specifing the filter temporal size and his samplerate * @param[in] _time Time of the filter size */ - virtual void setFilterTime(std11::chrono::microseconds _time); + virtual void setFilterTime(std::chrono::microseconds _time); /** * @brief Set filter size in number of sample * @param[in] _nbSample Sample size of the filter diff --git a/audio/algo/river/Suppressor.cpp b/audio/algo/river/Suppressor.cpp index 15e9b1f..b4e9a2b 100644 --- a/audio/algo/river/Suppressor.cpp +++ b/audio/algo/river/Suppressor.cpp @@ -88,14 +88,14 @@ namespace audio { * @brief Set the algo attaque time. * @param[in] _time Time of the attaque gain. */ - virtual void setAttaqueTime(std11::chrono::microseconds _time) { + virtual void setAttaqueTime(std::chrono::microseconds _time) { m_attaqueStep = 1.0 / float(int64_t(m_sampleRate) * 1000000LL / _time.count()); } /** * @brief Set the algo release time. * @param[in] _time Time of the release gain. */ - virtual void setReleaseTime(std11::chrono::microseconds _time) { + virtual void setReleaseTime(std::chrono::microseconds _time) { m_releaseStep = 1.0 / float(int64_t(m_sampleRate) * 1000000LL / _time.count()); } /** @@ -116,7 +116,7 @@ namespace audio { * @brief Set the delay befor releasing time. * @param[in] _time Time of the dalay release. */ - virtual void setReleaseDelay(std11::chrono::microseconds _time) { + virtual void setReleaseDelay(std::chrono::microseconds _time) { m_nbSampleDelay = int64_t(m_sampleRate) * 1000000LL / _time.count(); } }; @@ -165,14 +165,14 @@ void audio::algo::river::Supressor::process(void* _output, const void* _input, c } -void audio::algo::river::Supressor::setAttaqueTime(std11::chrono::microseconds _time) { +void audio::algo::river::Supressor::setAttaqueTime(std::chrono::microseconds _time) { if (m_private == nullptr) { AA_RIVER_ERROR("Algo is not initialized..."); } m_private->setAttaqueTime(_time); } -void audio::algo::river::Supressor::setReleaseTime(std11::chrono::microseconds _time) { +void audio::algo::river::Supressor::setReleaseTime(std::chrono::microseconds _time) { if (m_private == nullptr) { AA_RIVER_ERROR("Algo is not initialized..."); } @@ -193,7 +193,7 @@ void audio::algo::river::Supressor::setThreshold(float _gain) { m_private->setThreshold(_gain); } -void audio::algo::river::Supressor::setReleaseDelay(std11::chrono::microseconds _time) { +void audio::algo::river::Supressor::setReleaseDelay(std::chrono::microseconds _time) { if (m_private == nullptr) { AA_RIVER_ERROR("Algo is not initialized..."); } diff --git a/audio/algo/river/Suppressor.h b/audio/algo/river/Suppressor.h index 34c6496..835d2df 100644 --- a/audio/algo/river/Suppressor.h +++ b/audio/algo/river/Suppressor.h @@ -60,18 +60,18 @@ namespace audio { */ virtual void process(void* _output, const void* _input, const void* _inputFeedback, size_t _nbChunk); protected: - std11::shared_ptr m_private; // private data. + std::shared_ptr m_private; // private data. public: // parameter area: /** * @brief Set the algo attaque time. * @param[in] _time Time of the attaque gain. */ - virtual void setAttaqueTime(std11::chrono::microseconds _time); + virtual void setAttaqueTime(std::chrono::microseconds _time); /** * @brief Set the algo release time. * @param[in] _time Time of the release gain. */ - virtual void setReleaseTime(std11::chrono::microseconds _time); + virtual void setReleaseTime(std::chrono::microseconds _time); /** * @brief Set the minimum Gain. * @param[in] _gain dB gain to apply for minimum. @@ -86,7 +86,7 @@ namespace audio { * @brief Set the delay befor releasing time. * @param[in] _time Time of the dalay release. */ - virtual void setReleaseDelay(std11::chrono::microseconds _time); + virtual void setReleaseDelay(std::chrono::microseconds _time); }; } } diff --git a/audio/algo/river/debug.cpp b/audio/algo/river/debug.cpp index de8207d..1eb4713 100644 --- a/audio/algo/river/debug.cpp +++ b/audio/algo/river/debug.cpp @@ -8,7 +8,7 @@ int32_t audio::algo::river::getLogId() { - static int32_t g_val = etk::log::registerInstance("audio-algo-river"); + static int32_t g_val = elog::registerInstance("audio-algo-river"); return g_val; } diff --git a/audio/algo/river/debug.h b/audio/algo/river/debug.h index 2324a8e..f5f2f43 100644 --- a/audio/algo/river/debug.h +++ b/audio/algo/river/debug.h @@ -5,7 +5,7 @@ */ #pragma once -#include +#include namespace audio { namespace algo { @@ -15,7 +15,7 @@ namespace audio { } } -#define AA_RIVER_BASE(info,data) TK_LOG_BASE(audio::algo::river::getLogId(),info,data) +#define AA_RIVER_BASE(info,data) ELOG_BASE(audio::algo::river::getLogId(),info,data) #define AA_RIVER_CRITICAL(data) AA_RIVER_BASE(1, data) #define AA_RIVER_ERROR(data) AA_RIVER_BASE(2, data) diff --git a/test/main.cpp b/test/main.cpp index 66ea402..405eeb2 100644 --- a/test/main.cpp +++ b/test/main.cpp @@ -19,11 +19,11 @@ class Performance { private: - std11::chrono::steady_clock::time_point m_timeStart; - std11::chrono::steady_clock::time_point m_timeStop; - std11::chrono::nanoseconds m_totalTimeProcessing; - std11::chrono::nanoseconds m_minProcessing; - std11::chrono::nanoseconds m_maxProcessing; + 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; int32_t m_totalIteration; public: Performance() : @@ -34,11 +34,11 @@ class Performance { } void tic() { - m_timeStart = std11::chrono::steady_clock::now(); + m_timeStart = std::chrono::steady_clock::now(); } void toc() { - m_timeStop = std11::chrono::steady_clock::now(); - std11::chrono::nanoseconds time = m_timeStop - m_timeStart; + m_timeStop = std::chrono::steady_clock::now(); + std::chrono::nanoseconds time = m_timeStop - m_timeStart; m_minProcessing = std::min(m_minProcessing, time); m_maxProcessing = std::max(m_maxProcessing, time); m_totalTimeProcessing += time; @@ -46,13 +46,13 @@ class Performance { } - std11::chrono::nanoseconds getTotalTimeProcessing() { + std::chrono::nanoseconds getTotalTimeProcessing() { return m_totalTimeProcessing; } - std11::chrono::nanoseconds getMinProcessing() { + std::chrono::nanoseconds getMinProcessing() { return m_minProcessing; } - std11::chrono::nanoseconds getMaxProcessing() { + std::chrono::nanoseconds getMaxProcessing() { return m_maxProcessing; } int32_t getTotalIteration() {