diff --git a/audio/drain/Algo.cpp b/audio/drain/Algo.cpp index 0e06762..26e8a38 100644 --- a/audio/drain/Algo.cpp +++ b/audio/drain/Algo.cpp @@ -21,8 +21,8 @@ audio::drain::Algo::Algo() : void audio::drain::Algo::init() { // set notification callback : - m_input.setCallback(std11::bind(&audio::drain::Algo::configurationChangeLocal, this)); - m_output.setCallback(std11::bind(&audio::drain::Algo::configurationChangeLocal, this)); + m_input.setCallback(std::bind(&audio::drain::Algo::configurationChangeLocal, this)); + m_output.setCallback(std::bind(&audio::drain::Algo::configurationChangeLocal, this)); // first configure ==> update the internal parameters configurationChange(); } diff --git a/audio/drain/Algo.h b/audio/drain/Algo.h index c54fde2..09b166e 100644 --- a/audio/drain/Algo.h +++ b/audio/drain/Algo.h @@ -21,8 +21,8 @@ namespace audio { namespace drain{ - typedef std11::function algoStatusFunction; - class Algo : public std11::enable_shared_from_this { + typedef std::function algoStatusFunction; + class Algo : public std::enable_shared_from_this { private: std::string m_name; public: diff --git a/audio/drain/ChannelReorder.cpp b/audio/drain/ChannelReorder.cpp index 8e6e509..d9b6499 100644 --- a/audio/drain/ChannelReorder.cpp +++ b/audio/drain/ChannelReorder.cpp @@ -23,8 +23,8 @@ void audio::drain::ChannelReorder::init() { m_type = "ChannelReorder"; } -std11::shared_ptr audio::drain::ChannelReorder::create() { - std11::shared_ptr tmp(new audio::drain::ChannelReorder()); +std::shared_ptr audio::drain::ChannelReorder::create() { + std::shared_ptr tmp(new audio::drain::ChannelReorder()); tmp->init(); return tmp; } diff --git a/audio/drain/ChannelReorder.h b/audio/drain/ChannelReorder.h index ea91216..71e7031 100644 --- a/audio/drain/ChannelReorder.h +++ b/audio/drain/ChannelReorder.h @@ -17,7 +17,7 @@ namespace audio { ChannelReorder(); void init(); public: - static std11::shared_ptr create(); + static std::shared_ptr create(); /** * @brief Destructor */ diff --git a/audio/drain/CircularBuffer.cpp b/audio/drain/CircularBuffer.cpp index 3b5fc25..6c75c98 100644 --- a/audio/drain/CircularBuffer.cpp +++ b/audio/drain/CircularBuffer.cpp @@ -75,7 +75,7 @@ void audio::drain::CircularBuffer::setCapacity(size_t _capacity, size_t _chunkSi m_write = &m_data[0]; } -void audio::drain::CircularBuffer::setCapacity(std11::chrono::milliseconds _capacity, size_t _chunkSize, uint32_t _frequency) { +void audio::drain::CircularBuffer::setCapacity(std::chrono::milliseconds _capacity, size_t _chunkSize, uint32_t _frequency) { uint32_t nbSampleNeeded = _frequency*_capacity.count()/1000; DRAIN_DEBUG("buffer setCapacity(" << _capacity.count() << "ms ," << _chunkSize << ")"); setCapacity(nbSampleNeeded, _chunkSize, _frequency); @@ -212,7 +212,7 @@ size_t audio::drain::CircularBuffer::read(void* _data, size_t _nbChunk, const au DRAIN_VERBOSE("crop nb sample : m_size=" << m_size << " _nbChunk=" << _nbChunk); _nbChunk = m_size; } - m_timeRead += std11::chrono::microseconds(_nbChunk*1000000/m_frequency); + m_timeRead += std::chrono::microseconds(_nbChunk*1000000/m_frequency); if (usedSizeBeforeEnd >= _nbChunk) { // all Data will be copy memcpy(_data, m_read, _nbChunk * m_sizeChunk); diff --git a/audio/drain/CircularBuffer.h b/audio/drain/CircularBuffer.h index b6a3f35..6933918 100644 --- a/audio/drain/CircularBuffer.h +++ b/audio/drain/CircularBuffer.h @@ -75,9 +75,9 @@ namespace audio { * @param[in] _chunkSize Size of one chunk. * @param[in] _frequency Frequency of the buffer */ - void setCapacity(std11::chrono::milliseconds _capacity, size_t _chunkSize, uint32_t _frequency); - void setCapacity(std11::chrono::microseconds _capacity, size_t _chunkSize, uint32_t _frequency) { - setCapacity(std11::chrono::milliseconds(_capacity.count()/1000), _chunkSize, _frequency); + void setCapacity(std::chrono::milliseconds _capacity, size_t _chunkSize, uint32_t _frequency); + void setCapacity(std::chrono::microseconds _capacity, size_t _chunkSize, uint32_t _frequency) { + setCapacity(std::chrono::milliseconds(_capacity.count()/1000), _chunkSize, _frequency); } /** * @brief get free size of the buffer. diff --git a/audio/drain/EndPointCallback.cpp b/audio/drain/EndPointCallback.cpp index b8a09e2..edf8a52 100644 --- a/audio/drain/EndPointCallback.cpp +++ b/audio/drain/EndPointCallback.cpp @@ -27,14 +27,14 @@ void audio::drain::EndPointCallback::init(recordFunction _callback) { m_type = "EndPointCallback"; } -std11::shared_ptr audio::drain::EndPointCallback::create(playbackFunction _callback) { - std11::shared_ptr tmp(new audio::drain::EndPointCallback()); +std::shared_ptr audio::drain::EndPointCallback::create(playbackFunction _callback) { + std::shared_ptr tmp(new audio::drain::EndPointCallback()); tmp->init(_callback); return tmp; } -std11::shared_ptr audio::drain::EndPointCallback::create(recordFunction _callback) { - std11::shared_ptr tmp(new audio::drain::EndPointCallback()); +std::shared_ptr audio::drain::EndPointCallback::create(recordFunction _callback) { + std::shared_ptr tmp(new audio::drain::EndPointCallback()); tmp->init(_callback); return tmp; } diff --git a/audio/drain/EndPointCallback.h b/audio/drain/EndPointCallback.h index bd9e7c8..4c7dda8 100644 --- a/audio/drain/EndPointCallback.h +++ b/audio/drain/EndPointCallback.h @@ -10,13 +10,13 @@ namespace audio { namespace drain { - typedef std11::function& _map)> playbackFunction; - typedef std11::function create(playbackFunction _callback); - static std11::shared_ptr create(recordFunction _callback); + static std::shared_ptr create(playbackFunction _callback); + static std::shared_ptr create(recordFunction _callback); /** * @brief Destructor */ diff --git a/audio/drain/EndPointRead.cpp b/audio/drain/EndPointRead.cpp index 7cbffee..9dc6041 100644 --- a/audio/drain/EndPointRead.cpp +++ b/audio/drain/EndPointRead.cpp @@ -20,8 +20,8 @@ void audio::drain::EndPointRead::init() { m_type = "EndPointRead"; } -std11::shared_ptr audio::drain::EndPointRead::create() { - std11::shared_ptr tmp(new audio::drain::EndPointRead()); +std::shared_ptr audio::drain::EndPointRead::create() { + std::shared_ptr tmp(new audio::drain::EndPointRead()); tmp->init(); return tmp; } @@ -45,7 +45,7 @@ void audio::drain::EndPointRead::setBufferSize(size_t _nbChunk) { DRAIN_TODO("..."); } -void audio::drain::EndPointRead::setBufferSize(const std11::chrono::microseconds& _time) { +void audio::drain::EndPointRead::setBufferSize(const std::chrono::microseconds& _time) { DRAIN_TODO("..."); } @@ -54,9 +54,9 @@ size_t audio::drain::EndPointRead::getBufferSize() { return 0; } -std11::chrono::microseconds audio::drain::EndPointRead::getBufferSizeMicrosecond() { +std::chrono::microseconds audio::drain::EndPointRead::getBufferSizeMicrosecond() { DRAIN_TODO("..."); - return std11::chrono::microseconds(0); + return std::chrono::microseconds(0); } size_t audio::drain::EndPointRead::getBufferFillSize() { @@ -64,8 +64,8 @@ size_t audio::drain::EndPointRead::getBufferFillSize() { return 0; } -std11::chrono::microseconds audio::drain::EndPointRead::getBufferFillSizeMicrosecond() { +std::chrono::microseconds audio::drain::EndPointRead::getBufferFillSizeMicrosecond() { DRAIN_TODO("..."); - return std11::chrono::microseconds(0); + return std::chrono::microseconds(0); } diff --git a/audio/drain/EndPointRead.h b/audio/drain/EndPointRead.h index e7eae40..a4de818 100644 --- a/audio/drain/EndPointRead.h +++ b/audio/drain/EndPointRead.h @@ -17,7 +17,7 @@ namespace audio { EndPointRead(); void init(); public: - static std11::shared_ptr create(); + static std::shared_ptr create(); /** * @brief Destructor */ @@ -37,7 +37,7 @@ namespace audio { * @brief Set buffer size size of the buffer with the stored time in µs * @param[in] _time Time in microsecond of the buffer */ - virtual void setBufferSize(const std11::chrono::microseconds& _time); + virtual void setBufferSize(const std::chrono::microseconds& _time); /** * @brief get buffer size in chunk number * @return Number of chunk that can be written in the buffer @@ -47,7 +47,7 @@ namespace audio { * @brief Set buffer size size of the buffer with the stored time in µs * @return Time in microsecond that can be written in the buffer */ - virtual std11::chrono::microseconds getBufferSizeMicrosecond(); + virtual std::chrono::microseconds getBufferSizeMicrosecond(); /** * @brief Get buffer size filled in chunk number * @return Number of chunk in the buffer (that might be read/write) @@ -57,7 +57,7 @@ namespace audio { * @brief Set buffer size size of the buffer with the stored time in µs * @return Time in microsecond of the buffer (that might be read/write) */ - virtual std11::chrono::microseconds getBufferFillSizeMicrosecond(); + virtual std::chrono::microseconds getBufferFillSizeMicrosecond(); }; } } diff --git a/audio/drain/EndPointWrite.cpp b/audio/drain/EndPointWrite.cpp index 6a480f8..62834f8 100644 --- a/audio/drain/EndPointWrite.cpp +++ b/audio/drain/EndPointWrite.cpp @@ -27,8 +27,8 @@ void audio::drain::EndPointWrite::init() { } } -std11::shared_ptr audio::drain::EndPointWrite::create() { - std11::shared_ptr tmp(new audio::drain::EndPointWrite()); +std::shared_ptr audio::drain::EndPointWrite::create() { + std::shared_ptr tmp(new audio::drain::EndPointWrite()); tmp->init(); return tmp; } @@ -38,7 +38,7 @@ void audio::drain::EndPointWrite::configurationChange() { // update the buffer size ... if ( audio::getFormatBytes(m_output.getFormat())*m_output.getMap().size() != 0 && m_output.getFrequency() != 0) { - if (std11::chrono::microseconds(0) != m_bufferSizeMicroseconds) { + if (std::chrono::microseconds(0) != m_bufferSizeMicroseconds) { m_buffer.setCapacity(m_bufferSizeMicroseconds, audio::getFormatBytes(m_output.getFormat())*m_output.getMap().size(), m_output.getFrequency()); @@ -71,7 +71,7 @@ bool audio::drain::EndPointWrite::process(audio::Time& _time, // set output pointer: _outputNbChunk = m_outputData.size()/(m_formatSize*m_output.getMap().size()); _output = &m_outputData[0]; - std11::unique_lock lock(m_mutex); + std::unique_lock lock(m_mutex); // check if data in the tmpBuffer if (m_buffer.getSize() == 0) { DRAIN_WARNING("No data in the user buffer (write null data ... " << _outputNbChunk << " chunks)"); @@ -100,7 +100,7 @@ bool audio::drain::EndPointWrite::process(audio::Time& _time, } void audio::drain::EndPointWrite::write(const void* _value, size_t _nbChunk) { - std11::unique_lock lock(m_mutex); + std::unique_lock lock(m_mutex); DRAIN_VERBOSE("[ASYNC] Write data : " << _nbChunk << " chunks" << " ==> " << m_output); int32_t nbOverflow = m_buffer.write(_value, _nbChunk); if (nbOverflow > 0) { @@ -109,7 +109,7 @@ void audio::drain::EndPointWrite::write(const void* _value, size_t _nbChunk) { } void audio::drain::EndPointWrite::setBufferSize(size_t _nbChunk) { - m_bufferSizeMicroseconds = std11::chrono::microseconds(0); + m_bufferSizeMicroseconds = std::chrono::microseconds(0); m_bufferSizeChunk = _nbChunk; if ( audio::getFormatBytes(m_output.getFormat())*m_output.getMap().size() != 0 && m_output.getFrequency() != 0) { @@ -119,7 +119,7 @@ void audio::drain::EndPointWrite::setBufferSize(size_t _nbChunk) { } } -void audio::drain::EndPointWrite::setBufferSize(const std11::chrono::microseconds& _time) { +void audio::drain::EndPointWrite::setBufferSize(const std::chrono::microseconds& _time) { m_bufferSizeMicroseconds = _time; m_bufferSizeChunk = 0; m_buffer.setCapacity(_time, @@ -134,17 +134,17 @@ size_t audio::drain::EndPointWrite::getBufferSize() { return (int64_t(m_output.getFrequency())*m_bufferSizeMicroseconds.count())/1000000LL; } -std11::chrono::microseconds audio::drain::EndPointWrite::getBufferSizeMicrosecond() { - if (m_bufferSizeMicroseconds != std11::chrono::microseconds(0) ) { +std::chrono::microseconds audio::drain::EndPointWrite::getBufferSizeMicrosecond() { + if (m_bufferSizeMicroseconds != std::chrono::microseconds(0) ) { return m_bufferSizeMicroseconds; } - return std11::chrono::microseconds(m_bufferSizeChunk*1000000LL/int64_t(m_output.getFrequency())); + return std::chrono::microseconds(m_bufferSizeChunk*1000000LL/int64_t(m_output.getFrequency())); } size_t audio::drain::EndPointWrite::getBufferFillSize() { return m_buffer.getSize()/(audio::getFormatBytes(m_output.getFormat())*m_output.getMap().size()); } -std11::chrono::microseconds audio::drain::EndPointWrite::getBufferFillSizeMicrosecond() { - return std11::chrono::microseconds(getBufferFillSize()*1000000LL/int64_t(m_output.getFrequency())); +std::chrono::microseconds audio::drain::EndPointWrite::getBufferFillSizeMicrosecond() { + return std::chrono::microseconds(getBufferFillSize()*1000000LL/int64_t(m_output.getFrequency())); } diff --git a/audio/drain/EndPointWrite.h b/audio/drain/EndPointWrite.h index 50885f6..ec97a84 100644 --- a/audio/drain/EndPointWrite.h +++ b/audio/drain/EndPointWrite.h @@ -12,7 +12,7 @@ namespace audio { namespace drain{ - typedef std11::function create(); + static std::shared_ptr create(); /** * @brief Destructor */ @@ -45,7 +45,7 @@ namespace audio { m_function = _function; } protected: - std11::chrono::microseconds m_bufferSizeMicroseconds; // 0 if m_bufferSizeChunk != 0 + std::chrono::microseconds m_bufferSizeMicroseconds; // 0 if m_bufferSizeChunk != 0 size_t m_bufferSizeChunk; // 0 if m_bufferSizeMicroseconds != 0 public: /** @@ -57,7 +57,7 @@ namespace audio { * @brief Set buffer size size of the buffer with the stored time in µs * @param[in] _time Time in microsecond of the buffer */ - virtual void setBufferSize(const std11::chrono::microseconds& _time); + virtual void setBufferSize(const std::chrono::microseconds& _time); /** * @brief get buffer size in chunk number * @return Number of chunk that can be written in the buffer @@ -67,7 +67,7 @@ namespace audio { * @brief Set buffer size size of the buffer with the stored time in µs * @return Time in microsecond that can be written in the buffer */ - virtual std11::chrono::microseconds getBufferSizeMicrosecond(); + virtual std::chrono::microseconds getBufferSizeMicrosecond(); /** * @brief Get buffer size filled in chunk number * @return Number of chunk in the buffer (that might be read/write) @@ -77,7 +77,7 @@ namespace audio { * @brief Set buffer size size of the buffer with the stored time in µs * @return Time in microsecond of the buffer (that might be read/write) */ - virtual std11::chrono::microseconds getBufferFillSizeMicrosecond(); + virtual std::chrono::microseconds getBufferFillSizeMicrosecond(); }; } } diff --git a/audio/drain/Equalizer.cpp b/audio/drain/Equalizer.cpp index 9355b59..2f97538 100644 --- a/audio/drain/Equalizer.cpp +++ b/audio/drain/Equalizer.cpp @@ -23,8 +23,8 @@ void audio::drain::Equalizer::init() { configureBiQuad(); } -std11::shared_ptr audio::drain::Equalizer::create() { - std11::shared_ptr tmp(new audio::drain::Equalizer()); +std::shared_ptr audio::drain::Equalizer::create() { + std::shared_ptr tmp(new audio::drain::Equalizer()); tmp->init(); return tmp; } @@ -72,7 +72,7 @@ std::string audio::drain::Equalizer::getParameterProperty(const std::string& _pa return "error"; } -void audio::drain::Equalizer::addBiquad(int32_t _idBiquad, const std11::shared_ptr& _object) { +void audio::drain::Equalizer::addBiquad(int32_t _idBiquad, const std::shared_ptr& _object) { // get type: std::string typeString = _object->getStringValue("type", "none"); if (typeString == "direct-value") { @@ -110,11 +110,11 @@ void audio::drain::Equalizer::configureBiQuad() { return; } // check for a global config: - const std11::shared_ptr global = m_config->getArray("global"); + const std::shared_ptr global = m_config->getArray("global"); if (global != nullptr) { // only global configuration get all elements: for (size_t kkk=0; kkksize(); ++kkk) { - const std11::shared_ptr tmpObject = global->getObject(kkk); + const std::shared_ptr tmpObject = global->getObject(kkk); if (tmpObject == nullptr) { DRAIN_ERROR("Parse the configuration error : not a correct parameter:" << kkk); continue; @@ -126,14 +126,14 @@ void audio::drain::Equalizer::configureBiQuad() { } for (size_t iii=0; iii channelConfig = m_config->getArray(channelName); + const std::shared_ptr channelConfig = m_config->getArray(channelName); if (channelConfig == nullptr) { // no config ... not a problem ... continue; } // only global configuration get all elements: for (size_t kkk=0; kkksize(); ++kkk) { - const std11::shared_ptr tmpObject = channelConfig->getObject(kkk); + const std::shared_ptr tmpObject = channelConfig->getObject(kkk); if (tmpObject == nullptr) { DRAIN_ERROR("Parse the configuration error : not a correct parameter:" << kkk); continue; diff --git a/audio/drain/Equalizer.h b/audio/drain/Equalizer.h index 94e9f22..1a1d587 100644 --- a/audio/drain/Equalizer.h +++ b/audio/drain/Equalizer.h @@ -20,7 +20,7 @@ namespace audio { Equalizer(); void init(); public: - static std11::shared_ptr create(); + static std::shared_ptr create(); /** * @brief Destructor */ @@ -34,13 +34,13 @@ namespace audio { void*& _output, size_t& _outputNbChunk); protected: - std11::shared_ptr m_config; // configuration of the equalizer. + std::shared_ptr m_config; // configuration of the equalizer. public: virtual bool setParameter(const std::string& _parameter, const std::string& _value); virtual std::string getParameter(const std::string& _parameter) const; virtual std::string getParameterProperty(const std::string& _parameter) const; protected: - void addBiquad(int32_t _idBiquad, const std11::shared_ptr& _object); + void addBiquad(int32_t _idBiquad, const std::shared_ptr& _object); audio::algo::drain::Equalizer m_algo; /** * @brief Configure biquad with the user spec. diff --git a/audio/drain/FormatUpdate.cpp b/audio/drain/FormatUpdate.cpp index 673d2d1..b27ce76 100644 --- a/audio/drain/FormatUpdate.cpp +++ b/audio/drain/FormatUpdate.cpp @@ -136,8 +136,8 @@ void audio::drain::FormatUpdate::init() { m_type = "FormatUpdate"; } -std11::shared_ptr audio::drain::FormatUpdate::create() { - std11::shared_ptr tmp(new audio::drain::FormatUpdate()); +std::shared_ptr audio::drain::FormatUpdate::create() { + std::shared_ptr tmp(new audio::drain::FormatUpdate()); tmp->init(); return tmp; } diff --git a/audio/drain/FormatUpdate.h b/audio/drain/FormatUpdate.h index 956e505..4808054 100644 --- a/audio/drain/FormatUpdate.h +++ b/audio/drain/FormatUpdate.h @@ -17,7 +17,7 @@ namespace audio { FormatUpdate(); void init(); public: - static std11::shared_ptr create(); + static std::shared_ptr create(); /** * @brief Destructor */ diff --git a/audio/drain/IOFormatInterface.cpp b/audio/drain/IOFormatInterface.cpp index de5fd7e..ffad731 100644 --- a/audio/drain/IOFormatInterface.cpp +++ b/audio/drain/IOFormatInterface.cpp @@ -113,7 +113,7 @@ void audio::drain::IOFormatInterface::configurationChange() { m_ioChangeFunctor(); } } -void audio::drain::IOFormatInterface::setCallback(const std11::function& _functor) { +void audio::drain::IOFormatInterface::setCallback(const std::function& _functor) { m_ioChangeFunctor = _functor; } diff --git a/audio/drain/IOFormatInterface.h b/audio/drain/IOFormatInterface.h index 5abcbad..e8afce9 100644 --- a/audio/drain/IOFormatInterface.h +++ b/audio/drain/IOFormatInterface.h @@ -74,14 +74,14 @@ namespace audio { */ int32_t getChunkSize() const; protected: - std11::function m_ioChangeFunctor; //!< function pointer on the upper class + std::function m_ioChangeFunctor; //!< function pointer on the upper class void configurationChange(); public: /** * @brief Set the callback function to be notify when the arameter change. * @param[in] _functor Function to call. */ - void setCallback(const std11::function& _functor); + void setCallback(const std::function& _functor); }; std::ostream& operator <<(std::ostream& _os, const audio::drain::IOFormatInterface& _obj); } diff --git a/audio/drain/Process.cpp b/audio/drain/Process.cpp index a539c7d..65f59d5 100644 --- a/audio/drain/Process.cpp +++ b/audio/drain/Process.cpp @@ -104,15 +104,15 @@ bool audio::drain::Process::process(audio::Time& _time, return true; } -void audio::drain::Process::pushBack(const std11::shared_ptr& _algo) { +void audio::drain::Process::pushBack(const std::shared_ptr& _algo) { removeAlgoDynamic(); - _algo->setStatusFunction(std11::bind(&audio::drain::Process::generateStatus, this, std11::placeholders::_1, std11::placeholders::_2)); + _algo->setStatusFunction(std::bind(&audio::drain::Process::generateStatus, this, std::placeholders::_1, std::placeholders::_2)); m_listAlgo.push_back(_algo); } -void audio::drain::Process::pushFront(const std11::shared_ptr& _algo) { +void audio::drain::Process::pushFront(const std::shared_ptr& _algo) { removeAlgoDynamic(); - _algo->setStatusFunction(std11::bind(&audio::drain::Process::generateStatus, this, std11::placeholders::_1, std11::placeholders::_2)); + _algo->setStatusFunction(std::bind(&audio::drain::Process::generateStatus, this, std::placeholders::_1, std::placeholders::_2)); m_listAlgo.insert(m_listAlgo.begin(), _algo); } @@ -337,23 +337,23 @@ void audio::drain::Process::updateAlgo(size_t _position) { if ( out.getFormat() != audio::format_int16 /* && out.getFormat() != format_float */) { // need add a format Updater - std11::shared_ptr algo = audio::drain::FormatUpdate::create(); + std::shared_ptr algo = audio::drain::FormatUpdate::create(); algo->setTemporary(); algo->setInputFormat(out); out.setFormat(audio::format_int16); algo->setOutputFormat(out); - algo->setStatusFunction(std11::bind(&audio::drain::Process::generateStatus, this, std11::placeholders::_1, std11::placeholders::_2)); + algo->setStatusFunction(std::bind(&audio::drain::Process::generateStatus, this, std::placeholders::_1, std::placeholders::_2)); m_listAlgo.insert(m_listAlgo.begin()+_position, algo); DRAIN_VERBOSE("convert " << out.getFormat() << " -> " << in.getFormat()); _position++; } // need add a resampler - std11::shared_ptr algo = audio::drain::Resampler::create(); + std::shared_ptr algo = audio::drain::Resampler::create(); algo->setTemporary(); algo->setInputFormat(out); out.setFrequency(in.getFrequency()); algo->setOutputFormat(out); - algo->setStatusFunction(std11::bind(&audio::drain::Process::generateStatus, this, std11::placeholders::_1, std11::placeholders::_2)); + algo->setStatusFunction(std::bind(&audio::drain::Process::generateStatus, this, std::placeholders::_1, std::placeholders::_2)); m_listAlgo.insert(m_listAlgo.begin()+_position, algo); DRAIN_VERBOSE("convert " << out.getFrequency() << " -> " << in.getFrequency()); out.setFrequency(in.getFrequency()); @@ -361,24 +361,24 @@ void audio::drain::Process::updateAlgo(size_t _position) { } if (out.getMap() != in.getMap()) { // need add a channel Reorder - std11::shared_ptr algo = audio::drain::ChannelReorder::create(); + std::shared_ptr algo = audio::drain::ChannelReorder::create(); algo->setTemporary(); algo->setInputFormat(out); out.setMap(in.getMap()); algo->setOutputFormat(out); - algo->setStatusFunction(std11::bind(&audio::drain::Process::generateStatus, this, std11::placeholders::_1, std11::placeholders::_2)); + algo->setStatusFunction(std::bind(&audio::drain::Process::generateStatus, this, std::placeholders::_1, std::placeholders::_2)); m_listAlgo.insert(m_listAlgo.begin()+_position, algo); DRAIN_VERBOSE("convert " << out.getMap() << " -> " << in.getMap()); _position++; } if (out.getFormat() != in.getFormat()) { // need add a format Updater - std11::shared_ptr algo = audio::drain::FormatUpdate::create(); + std::shared_ptr algo = audio::drain::FormatUpdate::create(); algo->setTemporary(); algo->setInputFormat(out); out.setFormat(in.getFormat()); algo->setOutputFormat(out); - algo->setStatusFunction(std11::bind(&audio::drain::Process::generateStatus, this, std11::placeholders::_1, std11::placeholders::_2)); + algo->setStatusFunction(std::bind(&audio::drain::Process::generateStatus, this, std::placeholders::_1, std::placeholders::_2)); m_listAlgo.insert(m_listAlgo.begin()+_position, algo); DRAIN_VERBOSE("convert " << out.getFormat() << " -> " << in.getFormat()); _position++; diff --git a/audio/drain/Process.h b/audio/drain/Process.h index 6e51f0e..d280414 100644 --- a/audio/drain/Process.h +++ b/audio/drain/Process.h @@ -17,7 +17,7 @@ namespace audio { namespace drain{ - typedef std11::function statusFunction; + typedef std::function statusFunction; class Process { protected: std::vector m_data; //!< temporary overlap output buffer (change size of the output data) @@ -94,10 +94,10 @@ namespace audio { m_outputConfig = _interface; } protected: - std::vector > m_listAlgo; + std::vector > m_listAlgo; public: - void pushBack(const std11::shared_ptr& _algo); - void pushFront(const std11::shared_ptr& _algo); + void pushBack(const std::shared_ptr& _algo); + void pushFront(const std::shared_ptr& _algo); void clear() { m_isConfigured = false; m_listAlgo.clear(); @@ -105,44 +105,44 @@ namespace audio { size_t size() { return m_listAlgo.size(); } - std::vector >::iterator begin() { + std::vector >::iterator begin() { return m_listAlgo.begin(); } - std::vector >::iterator end() { + std::vector >::iterator end() { return m_listAlgo.end(); } - std11::shared_ptr operator[](int32_t _id) { + std::shared_ptr operator[](int32_t _id) { return m_listAlgo[_id]; } - template std11::shared_ptr get(const std::string& _name) { + template std::shared_ptr get(const std::string& _name) { for (size_t iii=0; iiigetName() == _name) { - return std11::dynamic_pointer_cast(m_listAlgo[iii]); + return std::dynamic_pointer_cast(m_listAlgo[iii]); } } - return std11::shared_ptr(); + return std::shared_ptr(); } - template std11::shared_ptr get(const std::string& _name) const { + template std::shared_ptr get(const std::string& _name) const { for (size_t iii=0; iiigetName() == _name) { - return std11::dynamic_pointer_cast(m_listAlgo[iii]); + return std::dynamic_pointer_cast(m_listAlgo[iii]); } } - return std11::shared_ptr(); + return std::shared_ptr(); } - template std11::shared_ptr get(int32_t _id) { - return std11::dynamic_pointer_cast(m_listAlgo[_id]); + template std::shared_ptr get(int32_t _id) { + return std::dynamic_pointer_cast(m_listAlgo[_id]); } template void removeIfFirst() { if (m_listAlgo.size() > 0) { - std11::shared_ptr algoEP = get(0); + std::shared_ptr algoEP = get(0); if (algoEP != nullptr) { m_listAlgo.erase(m_listAlgo.begin()); } @@ -150,7 +150,7 @@ namespace audio { } template void removeIfLast() { if (m_listAlgo.size() > 0) { - std11::shared_ptr algoEP = get(m_listAlgo.size()-1); + std::shared_ptr algoEP = get(m_listAlgo.size()-1); if (algoEP != nullptr) { m_listAlgo.erase(m_listAlgo.begin()+m_listAlgo.size()-1); } @@ -158,7 +158,7 @@ namespace audio { } template bool hasType() { for (size_t iii=0; iii tmp = std11::dynamic_pointer_cast(m_listAlgo[iii]); + std::shared_ptr tmp = std::dynamic_pointer_cast(m_listAlgo[iii]); if (tmp != nullptr) { return true; } diff --git a/audio/drain/Resampler.cpp b/audio/drain/Resampler.cpp index 8ce1248..6e81333 100644 --- a/audio/drain/Resampler.cpp +++ b/audio/drain/Resampler.cpp @@ -27,8 +27,8 @@ void audio::drain::Resampler::init() { m_residualTimeInResampler = audio::Duration(0); } -std11::shared_ptr audio::drain::Resampler::create() { - std11::shared_ptr tmp(new audio::drain::Resampler()); +std::shared_ptr audio::drain::Resampler::create() { + std::shared_ptr tmp(new audio::drain::Resampler()); tmp->init(); return tmp; } diff --git a/audio/drain/Resampler.h b/audio/drain/Resampler.h index c666d0d..34f164e 100644 --- a/audio/drain/Resampler.h +++ b/audio/drain/Resampler.h @@ -29,7 +29,7 @@ namespace audio { Resampler(); void init(); public: - static std11::shared_ptr create(); + static std::shared_ptr create(); /** * @brief Destructor */ diff --git a/audio/drain/Volume.cpp b/audio/drain/Volume.cpp index 02abb14..bfd9474 100644 --- a/audio/drain/Volume.cpp +++ b/audio/drain/Volume.cpp @@ -25,8 +25,8 @@ void audio::drain::Volume::init() { m_supportedFormat.push_back(audio::format_int16_on_int32); } -std11::shared_ptr audio::drain::Volume::create() { - std11::shared_ptr tmp(new audio::drain::Volume()); +std::shared_ptr audio::drain::Volume::create() { + std::shared_ptr tmp(new audio::drain::Volume()); tmp->init(); return tmp; } @@ -344,7 +344,7 @@ bool audio::drain::Volume::process(audio::Time& _time, return true; } -void audio::drain::Volume::addVolumeStage(const std11::shared_ptr& _volume) { +void audio::drain::Volume::addVolumeStage(const std::shared_ptr& _volume) { if (_volume == nullptr) { return; } diff --git a/audio/drain/Volume.h b/audio/drain/Volume.h index 6f96357..aae1455 100644 --- a/audio/drain/Volume.h +++ b/audio/drain/Volume.h @@ -54,7 +54,7 @@ namespace audio { // TODO: Manage set volume class Volume : public audio::drain::Algo { private: - std::vector > m_volumeList; + std::vector > m_volumeList; // for float input : float m_volumeAppli; // for integer input : @@ -69,7 +69,7 @@ namespace audio { Volume(); void init(); public: - static std11::shared_ptr create(); + static std::shared_ptr create(); /** * @brief Destructor */ @@ -86,7 +86,7 @@ namespace audio { virtual std::vector getFormatSupportedInput(); virtual std::vector getFormatSupportedOutput(); public: - virtual void addVolumeStage(const std11::shared_ptr& _volume); + virtual void addVolumeStage(const std::shared_ptr& _volume); virtual bool setParameter(const std::string& _parameter, const std::string& _value); virtual std::string getParameter(const std::string& _parameter) const; virtual std::string getParameterProperty(const std::string& _parameter) const; diff --git a/audio/drain/debug.cpp b/audio/drain/debug.cpp index 6131128..07c9754 100644 --- a/audio/drain/debug.cpp +++ b/audio/drain/debug.cpp @@ -8,6 +8,6 @@ int32_t audio::drain::getLogId() { - static int32_t g_val = etk::log::registerInstance("audio-drain"); + static int32_t g_val = elog::registerInstance("audio-drain"); return g_val; } diff --git a/audio/drain/debug.h b/audio/drain/debug.h index 690ecb2..3cdf73b 100644 --- a/audio/drain/debug.h +++ b/audio/drain/debug.h @@ -7,14 +7,14 @@ #ifndef __AUDIO_DRAIN_DEBUG_H__ #define __AUDIO_DRAIN_DEBUG_H__ -#include +#include namespace audio { namespace drain { int32_t getLogId(); } } -#define DRAIN_BASE(info,data) TK_LOG_BASE(audio::drain::getLogId(),info,data) +#define DRAIN_BASE(info,data) ELOG_BASE(audio::drain::getLogId(),info,data) #define DRAIN_CRITICAL(data) DRAIN_BASE(1, data) #define DRAIN_ERROR(data) DRAIN_BASE(2, data) diff --git a/tools/drainBiQuadProfiling/appl/Windows.cpp b/tools/drainBiQuadProfiling/appl/Windows.cpp index b20d87c..bf87067 100644 --- a/tools/drainBiQuadProfiling/appl/Windows.cpp +++ b/tools/drainBiQuadProfiling/appl/Windows.cpp @@ -91,7 +91,7 @@ void appl::Windows::init() { subBind(ewol::widget::Button, "display16", signalPressed, shared_from_this(), &appl::Windows::onCallbackStart16); subBind(ewol::widget::Button, "displayFloat", signalPressed, shared_from_this(), &appl::Windows::onCallbackStartFloat); - m_displayer = std11::dynamic_pointer_cast(getSubObjectNamed("displayer")); + m_displayer = std::dynamic_pointer_cast(getSubObjectNamed("displayer")); onCallbackStart(); } diff --git a/tools/drainBiQuadProfiling/appl/debug.cpp b/tools/drainBiQuadProfiling/appl/debug.cpp index 4eeb27c..fe697d2 100644 --- a/tools/drainBiQuadProfiling/appl/debug.cpp +++ b/tools/drainBiQuadProfiling/appl/debug.cpp @@ -10,6 +10,6 @@ #include int32_t appl::getLogId() { - static int32_t g_val = etk::log::registerInstance("drain-equalizer"); + static int32_t g_val = elog::registerInstance("drain-equalizer"); return g_val; } diff --git a/tools/drainBiQuadProfiling/appl/debug.h b/tools/drainBiQuadProfiling/appl/debug.h index b4cd5bb..35c7a7c 100644 --- a/tools/drainBiQuadProfiling/appl/debug.h +++ b/tools/drainBiQuadProfiling/appl/debug.h @@ -7,12 +7,12 @@ */ #pragma once -#include +#include namespace appl { int32_t getLogId(); }; -#define APPL_BASE(info,data) TK_LOG_BASE(appl::getLogId(),info,data) +#define APPL_BASE(info,data) ELOG_BASE(appl::getLogId(),info,data) #define APPL_CRITICAL(data) APPL_BASE(1, data) #define APPL_ERROR(data) APPL_BASE(2, data) diff --git a/tools/drainEqualizerProfiling/appl/Windows.cpp b/tools/drainEqualizerProfiling/appl/Windows.cpp index af68366..8b4e226 100644 --- a/tools/drainEqualizerProfiling/appl/Windows.cpp +++ b/tools/drainEqualizerProfiling/appl/Windows.cpp @@ -78,7 +78,7 @@ void appl::Windows::init() { subBind(ewol::widget::Button, "display16", signalPressed, shared_from_this(), &appl::Windows::onCallbackStart16); subBind(ewol::widget::Button, "displayFloat", signalPressed, shared_from_this(), &appl::Windows::onCallbackStartFloat); - m_displayer = std11::dynamic_pointer_cast(getSubObjectNamed("displayer")); + m_displayer = std::dynamic_pointer_cast(getSubObjectNamed("displayer")); onCallbackStart(); } @@ -126,12 +126,12 @@ void appl::Windows::onCallbackGain(const float& _value, int32_t _id) { onCallbackStart(); } -std11::shared_ptr appl::Windows::createEqualizer(enum audio::format _format) { +std::shared_ptr appl::Windows::createEqualizer(enum audio::format _format) { std::vector map; map.push_back(audio::channel_frontCenter); audio::drain::IOFormatInterface format(map, _format, m_sampleRate); // create equalizer - std11::shared_ptr out = audio::drain::Equalizer::create(); + std::shared_ptr out = audio::drain::Equalizer::create(); // configure input out->setInputFormat(format); // configure output @@ -176,7 +176,7 @@ std11::shared_ptr appl::Windows::createEqualizer(enum a void appl::Windows::onCallbackStart() { APPL_INFO("start "); - std11::shared_ptr eq = appl::Windows::createEqualizer(); + std::shared_ptr eq = appl::Windows::createEqualizer(); std::vector > theory = eq->calculateTheory(); m_displayer->clear(); m_displayer->setValue(theory); @@ -185,7 +185,7 @@ void appl::Windows::onCallbackStart() { void appl::Windows::onCallbackStart16() { APPL_INFO("start "); - std11::shared_ptr eq = appl::Windows::createEqualizer(audio::format_int16); + std::shared_ptr eq = appl::Windows::createEqualizer(audio::format_int16); std::vector > pratic; size_t len = 512; std::vector data; @@ -226,7 +226,7 @@ void appl::Windows::onCallbackStart16() { void appl::Windows::onCallbackStartFloat() { APPL_INFO("start "); - std11::shared_ptr eq = appl::Windows::createEqualizer(audio::format_float); + std::shared_ptr eq = appl::Windows::createEqualizer(audio::format_float); std::vector > pratic; size_t len = 512; std::vector data; diff --git a/tools/drainEqualizerProfiling/appl/Windows.h b/tools/drainEqualizerProfiling/appl/Windows.h index e817d1e..c96c44e 100644 --- a/tools/drainEqualizerProfiling/appl/Windows.h +++ b/tools/drainEqualizerProfiling/appl/Windows.h @@ -64,7 +64,7 @@ namespace appl { std::vector m_listSampleRate; std::vector m_listGain; - std11::shared_ptr createEqualizer(enum audio::format _format = audio::format_float); + std::shared_ptr createEqualizer(enum audio::format _format = audio::format_float); }; } diff --git a/tools/drainEqualizerProfiling/appl/debug.cpp b/tools/drainEqualizerProfiling/appl/debug.cpp index 4eeb27c..fe697d2 100644 --- a/tools/drainEqualizerProfiling/appl/debug.cpp +++ b/tools/drainEqualizerProfiling/appl/debug.cpp @@ -10,6 +10,6 @@ #include int32_t appl::getLogId() { - static int32_t g_val = etk::log::registerInstance("drain-equalizer"); + static int32_t g_val = elog::registerInstance("drain-equalizer"); return g_val; } diff --git a/tools/drainEqualizerProfiling/appl/debug.h b/tools/drainEqualizerProfiling/appl/debug.h index b4cd5bb..35c7a7c 100644 --- a/tools/drainEqualizerProfiling/appl/debug.h +++ b/tools/drainEqualizerProfiling/appl/debug.h @@ -7,12 +7,12 @@ */ #pragma once -#include +#include namespace appl { int32_t getLogId(); }; -#define APPL_BASE(info,data) TK_LOG_BASE(appl::getLogId(),info,data) +#define APPL_BASE(info,data) ELOG_BASE(appl::getLogId(),info,data) #define APPL_CRITICAL(data) APPL_BASE(1, data) #define APPL_ERROR(data) APPL_BASE(2, data)