[DEV] continue removing STL

This commit is contained in:
Edouard DUPIN 2017-09-14 00:59:21 +02:00
parent e64756081b
commit 0a7a5e98ce
2 changed files with 5 additions and 5 deletions

View File

@ -63,8 +63,8 @@ namespace audio {
_qualityFactor = 0.01;
}
double norm;
double V = std::pow(10.0, std::abs(_gain) / 20.0);
double K = std::tan(M_PI * _frequencyCut / _sampleRate);
double V = std::pow(10.0, etk::abs(_gain) / 20.0);
double K = etk::tan(M_PI * _frequencyCut / _sampleRate);
switch (_type) {
case biQuadType_none:
m_a[0] = 1.0;
@ -264,7 +264,7 @@ namespace audio {
w = std::exp(std::log(1.0 / 0.001) * iii / (len - 1.0)) * 0.001 * M_PI;
}
double freq = iii / (len - 1.0) * _sampleRate / 2.0;
double phi = std::pow(std::sin(w/2.0), 2.0);
double phi = std::pow(etk::sin(w/2.0), 2.0);
double y = std::log( std::pow((m_a[0]+m_a[1]+m_a[2]).getDouble(), 2.0)
- 4.0*((m_a[0]*m_a[1]).getDouble() + 4.0*(m_a[0]*m_a[2]).getDouble() + (m_a[1]*m_a[2]).getDouble())*phi
+ 16.0*(m_a[0]*m_a[2]).getDouble()*phi*phi)

View File

@ -87,7 +87,7 @@ float performanceEqualizerType(audio::format _type) {
size_t sizeOut = output.size();
algo.process(&output[0], &input[0], input.size());
perfo.toc();
std::this_thread::sleep_for(std::chrono::milliseconds(1));
ethread::sleepMilliSeconds((1));
}
TEST_INFO(" blockSize=" << input.size() << " sample");
TEST_INFO(" min < avg < max =" << perfo.getMinProcessing().count() << "ns < "
@ -203,7 +203,7 @@ int main(int _argc, const char** _argv) {
algo.process(&output[outputPosition], availlableSize, &inputData[iii*blockSize], blockSize, audio::format_int16);
if (perf == true) {
perfo.toc();
std::this_thread::sleep_for(std::chrono::milliseconds(1));
ethread::sleepMilliSeconds((1));
}
outputPosition += availlableSize*nbChan;
}