[DEBUG] build is back
This commit is contained in:
parent
b74ff1455f
commit
e6fbd23054
@ -129,7 +129,7 @@ namespace audio {
|
||||
}
|
||||
|
||||
void setFilterTime(echrono::microseconds _time) {
|
||||
setFilterSize((m_sampleRate*_time.count())/1000000LL);
|
||||
setFilterSize((m_sampleRate*_time.get())/1000000000LL);
|
||||
}
|
||||
|
||||
void setFilterSize(size_t _nbSample) {
|
||||
|
@ -140,7 +140,7 @@ namespace audio {
|
||||
}
|
||||
|
||||
void setFilterTime(echrono::microseconds _time) {
|
||||
setFilterSize((m_sampleRate*_time.count())/1000000LL);
|
||||
setFilterSize((m_sampleRate*_time.get())/1000000000LL);
|
||||
}
|
||||
|
||||
void setFilterSize(size_t _nbSample) {
|
||||
|
@ -89,14 +89,14 @@ namespace audio {
|
||||
* @param[in] _time Time of the attaque gain.
|
||||
*/
|
||||
virtual void setAttaqueTime(echrono::microseconds _time) {
|
||||
m_attaqueStep = 1.0 / float(int64_t(m_sampleRate) * 1000000LL / _time.count());
|
||||
m_attaqueStep = 1.0 / float(int64_t(m_sampleRate) * 1000000000LL / _time.get());
|
||||
}
|
||||
/**
|
||||
* @brief Set the algo release time.
|
||||
* @param[in] _time Time of the release gain.
|
||||
*/
|
||||
virtual void setReleaseTime(echrono::microseconds _time) {
|
||||
m_releaseStep = 1.0 / float(int64_t(m_sampleRate) * 1000000LL / _time.count());
|
||||
m_releaseStep = 1.0 / float(int64_t(m_sampleRate) * 1000000000LL / _time.get());
|
||||
}
|
||||
/**
|
||||
* @brief Set the minimum Gain.
|
||||
@ -117,7 +117,7 @@ namespace audio {
|
||||
* @param[in] _time Time of the dalay release.
|
||||
*/
|
||||
virtual void setReleaseDelay(echrono::microseconds _time) {
|
||||
m_nbSampleDelay = int64_t(m_sampleRate) * 1000000LL / _time.count();
|
||||
m_nbSampleDelay = int64_t(m_sampleRate) * 1000000000LL / _time.get();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -19,14 +19,14 @@ class Performance {
|
||||
private:
|
||||
echrono::Steady m_timeStart;
|
||||
echrono::Steady m_timeStop;
|
||||
echrono::nanoseconds m_totalTimeProcessing;
|
||||
echrono::nanoseconds m_minProcessing;
|
||||
echrono::nanoseconds m_maxProcessing;
|
||||
echrono::Duration m_totalTimeProcessing;
|
||||
echrono::Duration m_minProcessing;
|
||||
echrono::Duration m_maxProcessing;
|
||||
int32_t m_totalIteration;
|
||||
public:
|
||||
Performance() :
|
||||
m_totalTimeProcessing(0),
|
||||
m_minProcessing(99999999999999LL),
|
||||
m_minProcessing(int64_t(99999999999999LL)),
|
||||
m_maxProcessing(0),
|
||||
m_totalIteration(0) {
|
||||
|
||||
@ -36,7 +36,7 @@ class Performance {
|
||||
}
|
||||
void toc() {
|
||||
m_timeStop = echrono::Steady::now();
|
||||
echrono::nanoseconds time = m_timeStop - m_timeStart;
|
||||
echrono::Duration time = m_timeStop - m_timeStart;
|
||||
m_minProcessing = etk::min(m_minProcessing, time);
|
||||
m_maxProcessing = etk::max(m_maxProcessing, time);
|
||||
m_totalTimeProcessing += time;
|
||||
@ -44,13 +44,13 @@ class Performance {
|
||||
|
||||
}
|
||||
|
||||
echrono::nanoseconds getTotalTimeProcessing() {
|
||||
echrono::Duration getTotalTimeProcessing() {
|
||||
return m_totalTimeProcessing;
|
||||
}
|
||||
echrono::nanoseconds getMinProcessing() {
|
||||
echrono::Duration getMinProcessing() {
|
||||
return m_minProcessing;
|
||||
}
|
||||
echrono::nanoseconds getMaxProcessing() {
|
||||
echrono::Duration getMaxProcessing() {
|
||||
return m_maxProcessing;
|
||||
}
|
||||
int32_t getTotalIteration() {
|
||||
@ -180,13 +180,13 @@ int main(int _argc, const char** _argv) {
|
||||
if (perf == true) {
|
||||
TEST_PRINT("Performance Result: ");
|
||||
TEST_INFO(" blockSize=" << blockSize << " sample");
|
||||
TEST_INFO(" min < avg < max =" << perfo.getMinProcessing().count() << "ns < "
|
||||
<< perfo.getTotalTimeProcessing().count()/perfo.getTotalIteration() << "ns < "
|
||||
<< perfo.getMaxProcessing().count() << "ns ");
|
||||
float avg = (float(((perfo.getTotalTimeProcessing().count()/perfo.getTotalIteration())*sampleRate)/double(blockSize))/1000000000.0)*100.0;
|
||||
TEST_INFO(" min < avg < max= " << (float((perfo.getMinProcessing().count()*sampleRate)/double(blockSize))/1000000000.0)*100.0 << "% < "
|
||||
TEST_INFO(" min < avg < max =" << perfo.getMinProcessing() << " < "
|
||||
<< perfo.getTotalTimeProcessing().get()/perfo.getTotalIteration() << "ns < "
|
||||
<< perfo.getMaxProcessing());
|
||||
float avg = (float(((perfo.getTotalTimeProcessing().get()/perfo.getTotalIteration())*sampleRate)/double(blockSize))/1000000000.0)*100.0;
|
||||
TEST_INFO(" min < avg < max= " << (float((perfo.getMinProcessing().get()*sampleRate)/double(blockSize))/1000000000.0)*100.0 << "% < "
|
||||
<< avg << "% < "
|
||||
<< (float((perfo.getMaxProcessing().count()*sampleRate)/double(blockSize))/1000000000.0)*100.0 << "%");
|
||||
<< (float((perfo.getMaxProcessing().get()*sampleRate)/double(blockSize))/1000000000.0)*100.0 << "%");
|
||||
TEST_PRINT("float : " << sampleRate << " : " << avg << "%");
|
||||
}
|
||||
etk::FSNodeWriteAllDataType<int16_t>("output.raw", output);
|
||||
|
Loading…
Reference in New Issue
Block a user