[DEV] remove dependency of unistd.h

This commit is contained in:
Edouard DUPIN 2016-10-13 21:29:18 +02:00
parent 429a1cd062
commit 34eb6d5cf0
9 changed files with 12 additions and 12 deletions

View File

@ -9,7 +9,7 @@
#if defined(ORCHESTRA_BUILD_ALSA)
#include <alsa/asoundlib.h>
#include <unistd.h>
#include <audio/orchestra/Interface.hpp>
#include <audio/orchestra/debug.hpp>
#include <etk/stdTools.hpp>
@ -1167,7 +1167,7 @@ void audio::orchestra::api::Alsa::callbackEventOneCycleRead() {
}
} else {
ATA_ERROR("audio read error, " << snd_strerror(result) << ".");
usleep(10000);
std::this_thread::sleep_for(std::chrono::milliseconds(10));
}
// TODO : Notify application ... audio::orchestra::error_warning;
goto noInput;
@ -1521,7 +1521,7 @@ void audio::orchestra::api::Alsa::callbackEventOneCycleMMAPRead() {
}
} else {
ATA_ERROR("audio read error, " << snd_strerror(result) << ".");
usleep(10000);
std::this_thread::sleep_for(std::chrono::milliseconds(10));
}
// TODO : Notify application ... audio::orchestra::error_warning;
goto noInput;

View File

@ -8,7 +8,7 @@
#ifdef ORCHESTRA_BUILD_JAVA
//#include <ewol/context/Context.h>
#include <unistd.h>
#include <audio/orchestra/Interface.hpp>
#include <audio/orchestra/debug.hpp>
#include <audio/orchestra/api/AndroidNativeInterface.hpp>

View File

@ -635,7 +635,7 @@ bool audio::orchestra::api::Core::open(uint32_t _device,
if (microCounter > 5000000) {
break;
}
usleep(5000);
std::this_thread::sleep_for(std::chrono::milliseconds(5));
}
// Remove the property listener.
AudioObjectRemovePropertyListener(id, &tmp, &rateListener, (void *) &reportedRate);

View File

@ -10,7 +10,7 @@
#import <Foundation/Foundation.h>
#import <AudioToolbox/AudioToolbox.h>
#include <unistd.h>
#include <audio/orchestra/Interface.hpp>
#include <audio/orchestra/debug.hpp>
#include <climits>

View File

@ -7,7 +7,7 @@
// must run before :
#if defined(ORCHESTRA_BUILD_JACK)
#include <unistd.h>
#include <climits>
#include <iostream>
#include <audio/orchestra/Interface.hpp>
@ -52,7 +52,7 @@ ememory::SharedPtr<audio::orchestra::Api> audio::orchestra::api::Jack::create()
// stream cannot be opened.
#include <jack/jack.h>
#include <unistd.h>
#include <cstdio>

View File

@ -8,7 +8,7 @@
#if defined(ORCHESTRA_BUILD_PULSE)
#include <unistd.h>
#include <climits>
#include <audio/orchestra/Interface.hpp>
#include <audio/orchestra/debug.hpp>

View File

@ -6,7 +6,7 @@
#include <etk/etk.hpp>
#include <test-debug/debug.hpp>
#include <unistd.h>
#include <audio/orchestra/Interface.hpp>
int main(int _argc, const char **_argv) {

View File

@ -6,7 +6,7 @@
#include <etk/etk.hpp>
#include <test-debug/debug.hpp>
#include <unistd.h>
#include <audio/orchestra/Interface.hpp>
int main(int _argc, const char **_argv) {

View File

@ -6,7 +6,7 @@
#include <etk/etk.hpp>
#include <test-debug/debug.hpp>
#include <unistd.h>
#include <audio/orchestra/Interface.hpp>
int main(int _argc, const char **_argv) {