From dfc867db8737a8b76a514c0edededcd1ba7cc1d8 Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Thu, 7 Sep 2017 23:38:26 +0200 Subject: [PATCH] [DEV] remove STL --- audio/orchestra/Api.hpp | 4 ++-- audio/orchestra/api/Alsa.cpp | 20 +++++++++---------- .../orchestra/api/AndroidNativeInterface.cpp | 10 +++++----- audio/orchestra/api/Core.cpp | 6 +++--- audio/orchestra/api/Ds.cpp | 4 ++-- audio/orchestra/api/Jack.cpp | 8 ++++---- audio/orchestra/api/Pulse.cpp | 6 +++--- audio/orchestra/base.hpp | 4 ++-- 8 files changed, 31 insertions(+), 31 deletions(-) diff --git a/audio/orchestra/Api.hpp b/audio/orchestra/Api.hpp index be5b96e..ae0c94a 100644 --- a/audio/orchestra/Api.hpp +++ b/audio/orchestra/Api.hpp @@ -32,7 +32,7 @@ namespace audio { * @param _nbChunk The number of chunk of input or output chunk in the buffer (same size). * @param _status List of error that occured in the laps of time. */ - typedef std::functionthreadRunning = true; ATA_INFO("create thread ..."); - m_private->thread = new std::thread(&audio::orchestra::api::Alsa::alsaCallbackEvent, this); + m_private->thread = new ethread::Thread(&audio::orchestra::api::Alsa::alsaCallbackEvent, this); if (m_private->thread == nullptr) { m_private->threadRunning = false; ATA_ERROR("creating callback thread!"); @@ -875,7 +875,7 @@ enum audio::orchestra::error audio::orchestra::api::Alsa::startStream() { ATA_ERROR("the stream is already running!"); return audio::orchestra::error_warning; } - std::unique_lock lck(m_mutex); + std::unique_lock lck(m_mutex); int32_t result = 0; snd_pcm_state_t state; if (m_private->handle == nullptr) { @@ -909,7 +909,7 @@ enum audio::orchestra::error audio::orchestra::api::Alsa::stopStream() { return audio::orchestra::error_warning; } m_state = audio::orchestra::state::stopped; - std::unique_lock lck(m_mutex); + std::unique_lock lck(m_mutex); int32_t result = 0; if (m_mode == audio::orchestra::mode_output) { result = snd_pcm_drain(m_private->handle); @@ -936,7 +936,7 @@ enum audio::orchestra::error audio::orchestra::api::Alsa::abortStream() { return audio::orchestra::error_warning; } m_state = audio::orchestra::state::stopped; - std::unique_lock lck(m_mutex); + std::unique_lock lck(m_mutex); int32_t result = 0; result = snd_pcm_drop(m_private->handle); if (result < 0) { @@ -979,7 +979,7 @@ static int32_t wait_for_poll(snd_pcm_t* _handle, struct pollfd* _ufds, unsigned void audio::orchestra::api::Alsa::callbackEvent() { // Lock while the system is not started ... if (m_state == audio::orchestra::state::stopped) { - std::unique_lock lck(m_mutex); + std::unique_lock lck(m_mutex); while (!m_private->runnable) { m_private->runnable_cv.wait(lck); } @@ -1121,7 +1121,7 @@ void audio::orchestra::api::Alsa::callbackEventOneCycleRead() { // !!! goto unlock; } - std::unique_lock lck(m_mutex); + std::unique_lock lck(m_mutex); // Setup parameters. if (m_doConvertBuffer[1]) { buffer = m_deviceBuffer; @@ -1258,7 +1258,7 @@ void audio::orchestra::api::Alsa::callbackEventOneCycleWrite() { abortStream(); return; } - std::unique_lock lck(m_mutex); + std::unique_lock lck(m_mutex); // Setup parameters and do buffer conversion if necessary. if (m_doConvertBuffer[0]) { buffer = m_deviceBuffer; @@ -1365,7 +1365,7 @@ void audio::orchestra::api::Alsa::callbackEventOneCycleMMAPWrite() { return; } { - std::unique_lock lck(m_mutex); + std::unique_lock lck(m_mutex); // Setup parameters and do buffer conversion if necessary. if (m_doConvertBuffer[0]) { buffer = m_deviceBuffer; @@ -1474,7 +1474,7 @@ void audio::orchestra::api::Alsa::callbackEventOneCycleMMAPRead() { goto unlock; } { - std::unique_lock lck(m_mutex); + std::unique_lock lck(m_mutex); // Setup parameters. if (m_doConvertBuffer[1]) { buffer = m_deviceBuffer; diff --git a/audio/orchestra/api/AndroidNativeInterface.cpp b/audio/orchestra/api/AndroidNativeInterface.cpp index 65e7e17..7cc02e0 100644 --- a/audio/orchestra/api/AndroidNativeInterface.cpp +++ b/audio/orchestra/api/AndroidNativeInterface.cpp @@ -6,7 +6,7 @@ #include #include -#include +#include #include