[DEV] remove dependency of unistd.h

This commit is contained in:
Edouard DUPIN 2016-10-13 21:29:18 +02:00
parent 9cf23b59e9
commit 12bb701758

View File

@ -9,8 +9,9 @@
#include <audio/algo/speex/Resampler.hpp>
#include <etk/os/FSNode.hpp>
#include <chrono>
#include <thread>
#include <unistd.h>
class Performance {
private:
@ -82,7 +83,7 @@ float performanceResamplerStepFloat(float _sampleRateIn, float _sampleRateOut, i
size_t sizeOut = output.size();
algo.process(&output[0], sizeOut, &input[0], input.size());
perfo.toc();
usleep(1000);
std::this_thread::sleep_for(std::chrono::milliseconds(1));
}
TEST_INFO(" blockSize=" << input.size() << " sample");
TEST_INFO(" min < avg < max =" << perfo.getMinProcessing().count() << "ns < "
@ -122,7 +123,7 @@ float performanceResamplerStepI16(float _sampleRateIn, float _sampleRateOut, int
size_t sizeOut = output.size();
algo.process(&output[0], sizeOut, &input[0], input.size());
perfo.toc();
usleep(1000);
std::this_thread::sleep_for(std::chrono::milliseconds(1));
}
TEST_INFO(" blockSize=" << input.size() << " sample");
TEST_INFO(" min < avg < max =" << perfo.getMinProcessing().count() << "ns < "
@ -259,7 +260,7 @@ int main(int _argc, const char** _argv) {
algo.process(&output[outputPosition], availlableSize, &inputData[iii*blockSize], blockSize);
if (perf == true) {
perfo.toc();
usleep(1000);
std::this_thread::sleep_for(std::chrono::milliseconds(1));
}
outputPosition += availlableSize*nbChan;
}