[DEV] update of external of elog and ethread
This commit is contained in:
parent
61d1afff4c
commit
ee1e9f8be6
@ -185,7 +185,7 @@ void audio::algo::drain::Equalizer::init(float _sampleRate, int8_t _nbChannel, e
|
||||
break;
|
||||
case audio::format_double:
|
||||
{
|
||||
m_private = std11::make_shared<EqualizerPrivateType<audio::double_t> >();
|
||||
m_private = std::make_shared<EqualizerPrivateType<audio::double_t> >();
|
||||
if (m_private == nullptr) {
|
||||
AA_DRAIN_ERROR("can not allocate private data...");
|
||||
return;
|
||||
@ -195,7 +195,7 @@ void audio::algo::drain::Equalizer::init(float _sampleRate, int8_t _nbChannel, e
|
||||
break;
|
||||
case audio::format_float:
|
||||
{
|
||||
m_private = std11::make_shared<EqualizerPrivateType<audio::float_t> >();
|
||||
m_private = std::make_shared<EqualizerPrivateType<audio::float_t> >();
|
||||
if (m_private == nullptr) {
|
||||
AA_DRAIN_ERROR("can not allocate private data...");
|
||||
return;
|
||||
@ -205,7 +205,7 @@ void audio::algo::drain::Equalizer::init(float _sampleRate, int8_t _nbChannel, e
|
||||
break;
|
||||
case audio::format_int8:
|
||||
{
|
||||
m_private = std11::make_shared<EqualizerPrivateType<audio::int8_8_t> >();
|
||||
m_private = std::make_shared<EqualizerPrivateType<audio::int8_8_t> >();
|
||||
if (m_private == nullptr) {
|
||||
AA_DRAIN_ERROR("can not allocate private data...");
|
||||
return;
|
||||
@ -215,7 +215,7 @@ void audio::algo::drain::Equalizer::init(float _sampleRate, int8_t _nbChannel, e
|
||||
break;
|
||||
case audio::format_int8_on_int16:
|
||||
{
|
||||
m_private = std11::make_shared<EqualizerPrivateType<audio::int8_16_t> >();
|
||||
m_private = std::make_shared<EqualizerPrivateType<audio::int8_16_t> >();
|
||||
if (m_private == nullptr) {
|
||||
AA_DRAIN_ERROR("can not allocate private data...");
|
||||
return;
|
||||
@ -225,7 +225,7 @@ void audio::algo::drain::Equalizer::init(float _sampleRate, int8_t _nbChannel, e
|
||||
break;
|
||||
case audio::format_int16:
|
||||
{
|
||||
m_private = std11::make_shared<EqualizerPrivateType<audio::int16_16_t> >();
|
||||
m_private = std::make_shared<EqualizerPrivateType<audio::int16_16_t> >();
|
||||
if (m_private == nullptr) {
|
||||
AA_DRAIN_ERROR("can not allocate private data...");
|
||||
return;
|
||||
@ -235,7 +235,7 @@ void audio::algo::drain::Equalizer::init(float _sampleRate, int8_t _nbChannel, e
|
||||
break;
|
||||
case audio::format_int16_on_int32:
|
||||
{
|
||||
m_private = std11::make_shared<EqualizerPrivateType<audio::int16_32_t> >();
|
||||
m_private = std::make_shared<EqualizerPrivateType<audio::int16_32_t> >();
|
||||
if (m_private == nullptr) {
|
||||
AA_DRAIN_ERROR("can not allocate private data...");
|
||||
return;
|
||||
@ -245,7 +245,7 @@ void audio::algo::drain::Equalizer::init(float _sampleRate, int8_t _nbChannel, e
|
||||
break;
|
||||
case audio::format_int24_on_int32:
|
||||
{
|
||||
m_private = std11::make_shared<EqualizerPrivateType<audio::int24_32_t> >();
|
||||
m_private = std::make_shared<EqualizerPrivateType<audio::int24_32_t> >();
|
||||
if (m_private == nullptr) {
|
||||
AA_DRAIN_ERROR("can not allocate private data...");
|
||||
return;
|
||||
@ -255,7 +255,7 @@ void audio::algo::drain::Equalizer::init(float _sampleRate, int8_t _nbChannel, e
|
||||
break;
|
||||
case audio::format_int32:
|
||||
{
|
||||
m_private = std11::make_shared<EqualizerPrivateType<audio::int32_32_t> >();
|
||||
m_private = std::make_shared<EqualizerPrivateType<audio::int32_32_t> >();
|
||||
if (m_private == nullptr) {
|
||||
AA_DRAIN_ERROR("can not allocate private data...");
|
||||
return;
|
||||
@ -265,7 +265,7 @@ void audio::algo::drain::Equalizer::init(float _sampleRate, int8_t _nbChannel, e
|
||||
break;
|
||||
case audio::format_int32_on_int64:
|
||||
{
|
||||
m_private = std11::make_shared<EqualizerPrivateType<audio::int32_64_t> >();
|
||||
m_private = std::make_shared<EqualizerPrivateType<audio::int32_64_t> >();
|
||||
if (m_private == nullptr) {
|
||||
AA_DRAIN_ERROR("can not allocate private data...");
|
||||
return;
|
||||
@ -275,7 +275,7 @@ void audio::algo::drain::Equalizer::init(float _sampleRate, int8_t _nbChannel, e
|
||||
break;
|
||||
case audio::format_int64:
|
||||
{
|
||||
m_private = std11::make_shared<EqualizerPrivateType<audio::int32_64_t> >();
|
||||
m_private = std::make_shared<EqualizerPrivateType<audio::int32_64_t> >();
|
||||
if (m_private == nullptr) {
|
||||
AA_DRAIN_ERROR("can not allocate private data...");
|
||||
return;
|
||||
|
@ -74,7 +74,7 @@ namespace audio {
|
||||
// for debug & tools only
|
||||
std::vector<std::pair<float,float> > calculateTheory();
|
||||
protected:
|
||||
std11::shared_ptr<EqualizerPrivate> m_private; //!< private data (abstract the type of the data flow).
|
||||
std::shared_ptr<EqualizerPrivate> m_private; //!< private data (abstract the type of the data flow).
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
|
||||
int32_t audio::algo::drain::getLogId() {
|
||||
static int32_t g_val = etk::log::registerInstance("audio-algo-drain");
|
||||
static int32_t g_val = elog::registerInstance("audio-algo-drain");
|
||||
return g_val;
|
||||
}
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <etk/log.h>
|
||||
#include <elog/log.h>
|
||||
|
||||
namespace audio {
|
||||
namespace algo {
|
||||
@ -15,7 +15,7 @@ namespace audio {
|
||||
}
|
||||
}
|
||||
|
||||
#define AA_DRAIN_BASE(info,data) TK_LOG_BASE(audio::algo::drain::getLogId(),info,data)
|
||||
#define AA_DRAIN_BASE(info,data) ELOG_BASE(audio::algo::drain::getLogId(),info,data)
|
||||
|
||||
#define AA_DRAIN_PRINT(data) AA_DRAIN_BASE(-1, data)
|
||||
#define AA_DRAIN_CRITICAL(data) AA_DRAIN_BASE(1, data)
|
||||
|
@ -17,11 +17,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() :
|
||||
@ -32,11 +32,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;
|
||||
@ -44,13 +44,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() {
|
||||
|
Loading…
Reference in New Issue
Block a user