[DEV] remove dependency of unistd.h
This commit is contained in:
parent
9cf23b59e9
commit
12bb701758
@ -9,8 +9,9 @@
|
|||||||
#include <audio/algo/speex/Resampler.hpp>
|
#include <audio/algo/speex/Resampler.hpp>
|
||||||
#include <etk/os/FSNode.hpp>
|
#include <etk/os/FSNode.hpp>
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
|
#include <thread>
|
||||||
|
|
||||||
|
|
||||||
#include <unistd.h>
|
|
||||||
|
|
||||||
class Performance {
|
class Performance {
|
||||||
private:
|
private:
|
||||||
@ -82,7 +83,7 @@ float performanceResamplerStepFloat(float _sampleRateIn, float _sampleRateOut, i
|
|||||||
size_t sizeOut = output.size();
|
size_t sizeOut = output.size();
|
||||||
algo.process(&output[0], sizeOut, &input[0], input.size());
|
algo.process(&output[0], sizeOut, &input[0], input.size());
|
||||||
perfo.toc();
|
perfo.toc();
|
||||||
usleep(1000);
|
std::this_thread::sleep_for(std::chrono::milliseconds(1));
|
||||||
}
|
}
|
||||||
TEST_INFO(" blockSize=" << input.size() << " sample");
|
TEST_INFO(" blockSize=" << input.size() << " sample");
|
||||||
TEST_INFO(" min < avg < max =" << perfo.getMinProcessing().count() << "ns < "
|
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();
|
size_t sizeOut = output.size();
|
||||||
algo.process(&output[0], sizeOut, &input[0], input.size());
|
algo.process(&output[0], sizeOut, &input[0], input.size());
|
||||||
perfo.toc();
|
perfo.toc();
|
||||||
usleep(1000);
|
std::this_thread::sleep_for(std::chrono::milliseconds(1));
|
||||||
}
|
}
|
||||||
TEST_INFO(" blockSize=" << input.size() << " sample");
|
TEST_INFO(" blockSize=" << input.size() << " sample");
|
||||||
TEST_INFO(" min < avg < max =" << perfo.getMinProcessing().count() << "ns < "
|
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);
|
algo.process(&output[outputPosition], availlableSize, &inputData[iii*blockSize], blockSize);
|
||||||
if (perf == true) {
|
if (perf == true) {
|
||||||
perfo.toc();
|
perfo.toc();
|
||||||
usleep(1000);
|
std::this_thread::sleep_for(std::chrono::milliseconds(1));
|
||||||
}
|
}
|
||||||
outputPosition += availlableSize*nbChan;
|
outputPosition += availlableSize*nbChan;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user