diff --git a/audio/drain/Algo.cpp b/audio/drain/Algo.cpp index ac599dd..dd8b2c2 100644 --- a/audio/drain/Algo.cpp +++ b/audio/drain/Algo.cpp @@ -117,7 +117,7 @@ void audio::drain::Algo::setStatusFunction(algoStatusFunction _newFunction) { } void audio::drain::Algo::generateStatus(const etk::String& _status) { - if (m_statusFunction != nullptr) { + if (m_statusFunction != null) { if (m_name.size() == 0) { m_statusFunction(m_type, _status); } else { diff --git a/audio/drain/ChannelReorder.cpp b/audio/drain/ChannelReorder.cpp index 5d59d2f..144b2bb 100644 --- a/audio/drain/ChannelReorder.cpp +++ b/audio/drain/ChannelReorder.cpp @@ -56,7 +56,7 @@ bool audio::drain::ChannelReorder::process(audio::Time& _time, _output = _input; return true; } - if (_input == nullptr) { + if (_input == null) { _output = &(m_outputData[0]); _outputNbChunk = 0; DRAIN_ERROR("null pointer input ... "); diff --git a/audio/drain/CircularBuffer.cpp b/audio/drain/CircularBuffer.cpp index 9b5e1ca..0913a52 100644 --- a/audio/drain/CircularBuffer.cpp +++ b/audio/drain/CircularBuffer.cpp @@ -9,8 +9,8 @@ audio::drain::CircularBuffer::CircularBuffer(const audio::drain::CircularBuffer& _obj) : m_data(), - m_write(nullptr), - m_read(nullptr), + m_write(null), + m_read(null), m_timeRead(), m_capacity(0), m_sizeChunk(0), @@ -27,8 +27,8 @@ audio::drain::CircularBuffer& audio::drain::CircularBuffer::operator=(const audi audio::drain::CircularBuffer::CircularBuffer() : m_data(), - m_write(nullptr), - m_read(nullptr), + m_write(null), + m_read(null), m_timeRead(), m_capacity(0), m_sizeChunk(0), @@ -38,8 +38,8 @@ audio::drain::CircularBuffer::CircularBuffer() : audio::drain::CircularBuffer::~CircularBuffer() { m_data.clear(); - m_read = nullptr; - m_write = nullptr; + m_read = null; + m_write = null; } void audio::drain::CircularBuffer::setCapacity(size_t _capacity, size_t _chunkSize, uint32_t _frequency) { @@ -58,8 +58,8 @@ void audio::drain::CircularBuffer::setCapacity(size_t _capacity, size_t _chunkSi _chunkSize = 8; } m_data.clear(); - m_write = nullptr; - m_read = nullptr; + m_write = null; + m_read = null; m_frequency = _frequency; m_capacity = _capacity; m_sizeChunk = _chunkSize; diff --git a/audio/drain/EndPointCallback.cpp b/audio/drain/EndPointCallback.cpp index 86376df..ab9b624 100644 --- a/audio/drain/EndPointCallback.cpp +++ b/audio/drain/EndPointCallback.cpp @@ -9,8 +9,8 @@ audio::drain::EndPointCallback::EndPointCallback() : - m_outputFunction(nullptr), - m_inputFunction(nullptr) { + m_outputFunction(null), + m_inputFunction(null) { } @@ -50,7 +50,7 @@ bool audio::drain::EndPointCallback::process(audio::Time& _time, void*& _output, size_t& _outputNbChunk){ audio::drain::AutoLogInOut tmpLog("EndPointCallback"); - if (m_inputFunction != nullptr) { + if (m_inputFunction != null) { // Call user ... DRAIN_VERBOSE("call user set " << _inputNbChunk << "*" << m_input.getMap().size()); m_inputFunction(_input, @@ -61,7 +61,7 @@ bool audio::drain::EndPointCallback::process(audio::Time& _time, m_output.getMap()); return true; } - if (m_outputFunction != nullptr) { + if (m_outputFunction != null) { // update buffer size ... m_outputData.resize(_inputNbChunk*m_output.getMap().size()*m_formatSize); // clean output to prevent errors ... diff --git a/audio/drain/EndPointWrite.cpp b/audio/drain/EndPointWrite.cpp index 2914115..ec0179d 100644 --- a/audio/drain/EndPointWrite.cpp +++ b/audio/drain/EndPointWrite.cpp @@ -8,7 +8,7 @@ audio::drain::EndPointWrite::EndPointWrite() : - m_function(nullptr), + m_function(null), m_bufferSizeMicroseconds(1000000), m_bufferSizeChunk(32), m_bufferUnderFlowSize(0) { @@ -58,7 +58,7 @@ bool audio::drain::EndPointWrite::process(audio::Time& _time, size_t& _outputNbChunk){ audio::drain::AutoLogInOut tmpLog("EndPointWrite"); //DRAIN_INFO(" nb Sample in buffer : " << m_buffer.size()); - if (m_function != nullptr) { + if (m_function != null) { // TODO : Rework this ... if (m_buffer.getSize() <= 20000) { m_function(_time, _inputNbChunk, m_output.getFormat(), m_output.getFrequency(), m_output.getMap()); diff --git a/audio/drain/Equalizer.cpp b/audio/drain/Equalizer.cpp index ba241a4..f84ec77 100644 --- a/audio/drain/Equalizer.cpp +++ b/audio/drain/Equalizer.cpp @@ -45,7 +45,7 @@ bool audio::drain::Equalizer::process(audio::Time& _time, size_t& _outputNbChunk) { _outputNbChunk = _inputNbChunk; _output = _input; - if (_input == nullptr) { + if (_input == null) { return false; } m_algo.process(_output, _input, _inputNbChunk); diff --git a/audio/drain/FormatUpdate.cpp b/audio/drain/FormatUpdate.cpp index 8aca3d9..a424582 100644 --- a/audio/drain/FormatUpdate.cpp +++ b/audio/drain/FormatUpdate.cpp @@ -123,7 +123,7 @@ static void convert__float__to__int32(void* _input, void* _output, size_t _nbSam audio::drain::FormatUpdate::FormatUpdate() : - m_functionConvert(nullptr) { + m_functionConvert(null) { } @@ -251,7 +251,7 @@ bool audio::drain::FormatUpdate::process(audio::Time& _time, _outputNbChunk = _inputNbChunk; return true; } - if (_input == nullptr) { + if (_input == null) { _output = &(m_outputData[0]); _outputNbChunk = 0; DRAIN_ERROR("null pointer input ... "); @@ -260,7 +260,7 @@ bool audio::drain::FormatUpdate::process(audio::Time& _time, _outputNbChunk = _inputNbChunk; m_outputData.resize(_outputNbChunk*m_input.getMap().size()*m_formatSize); _output = &(m_outputData[0]); - if (m_functionConvert == nullptr) { + if (m_functionConvert == null) { DRAIN_ERROR("null function ptr"); return false; } diff --git a/audio/drain/IOFormatInterface.cpp b/audio/drain/IOFormatInterface.cpp index 2871c10..aa001c7 100644 --- a/audio/drain/IOFormatInterface.cpp +++ b/audio/drain/IOFormatInterface.cpp @@ -105,7 +105,7 @@ void audio::drain::IOFormatInterface::setFrequency(float _value) { } void audio::drain::IOFormatInterface::configurationChange() { - if (m_ioChangeFunctor != nullptr) { + if (m_ioChangeFunctor != null) { m_ioChangeFunctor(); } } diff --git a/audio/drain/Process.cpp b/audio/drain/Process.cpp index 936dd30..58147de 100644 --- a/audio/drain/Process.cpp +++ b/audio/drain/Process.cpp @@ -27,7 +27,7 @@ audio::drain::Process::~Process() { bool audio::drain::Process::push(audio::Time& _time, void* _data, size_t _nbChunk) { - void* out = nullptr; + void* out = null; size_t nbChunkOut; DRAIN_VERBOSE(" Process push"); process(_time, _data, _nbChunk, out, nbChunkOut); @@ -40,16 +40,16 @@ bool audio::drain::Process::pull(audio::Time& _time, size_t _chunkSize) { //DRAIN_DEBUG("Execute:"); while(m_data.size() < _nbChunk*_chunkSize) { - void* in = nullptr; + void* in = null; size_t nbChunkIn = _nbChunk - m_data.size()/_chunkSize; - void* out = nullptr; + void* out = null; size_t nbChunkOut; if (nbChunkIn < 128) { nbChunkIn = 128; } // TODO : maybe remove this for input data ... for (int32_t iii=m_listAlgo.size()-1; iii >=0; --iii) { - if (m_listAlgo[iii] != nullptr) { + if (m_listAlgo[iii] != null) { nbChunkIn = m_listAlgo[iii]->needInputData(nbChunkIn); } } @@ -92,7 +92,7 @@ bool audio::drain::Process::process(audio::Time& _time, DRAIN_VERBOSE(" process : " << m_listAlgo.size() << " algos nbChunk=" << _inNbChunk); for (size_t iii=0; iiiprocess(_time, _inData, _inNbChunk, _outData, _outNbChunk); _inData = _outData; _inNbChunk = _outNbChunk; @@ -427,7 +427,7 @@ bool audio::drain::Process::processIn(void* _inData, size_t _inNbChunk, void* _outData, size_t _outNbChunk){ - void* outData = nullptr; + void* outData = null; size_t outSize = 0; bool error = process(_inData, _inNbChunk, outData, outSize); if (outSize != _outNbChunk) { @@ -484,7 +484,7 @@ void audio::drain::Process::generateDot(etk::FSNode& _node, // -- STEP 3 -- // ---------------------- for (size_t iii=0; iii=0; --iii) { //for (size_t iii=0; iii=0; --iii) { for (size_t iii=0; iii ememory::SharedPtr get(const etk::String& _name) { for (size_t iii=0; iiigetName() == _name) { @@ -127,7 +127,7 @@ namespace audio { } template ememory::SharedPtr get(const etk::String& _name) const { for (size_t iii=0; iiigetName() == _name) { @@ -142,7 +142,7 @@ namespace audio { template void removeIfFirst() { if (m_listAlgo.size() > 0) { ememory::SharedPtr algoEP = get(0); - if (algoEP != nullptr) { + if (algoEP != null) { m_listAlgo.erase(m_listAlgo.begin()); } } @@ -150,7 +150,7 @@ namespace audio { template void removeIfLast() { if (m_listAlgo.size() > 0) { ememory::SharedPtr algoEP = get(m_listAlgo.size()-1); - if (algoEP != nullptr) { + if (algoEP != null) { 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 = ememory::dynamicPointerCast(m_listAlgo[iii]); - if (tmp != nullptr) { + if (tmp != null) { return true; } } diff --git a/audio/drain/Resampler.cpp b/audio/drain/Resampler.cpp index 95fa56b..b85c411 100644 --- a/audio/drain/Resampler.cpp +++ b/audio/drain/Resampler.cpp @@ -9,7 +9,7 @@ audio::drain::Resampler::Resampler() : #ifdef HAVE_SPEEX_DSP_RESAMPLE - m_speexResampler(nullptr), + m_speexResampler(null), #endif m_positionRead(0), m_positionWrite(0) { @@ -31,9 +31,9 @@ ememory::SharedPtr audio::drain::Resampler::create() { audio::drain::Resampler::~Resampler() { #ifdef HAVE_SPEEX_DSP_RESAMPLE - if (m_speexResampler != nullptr) { + if (m_speexResampler != null) { speex_resampler_destroy(m_speexResampler); - m_speexResampler = nullptr; + m_speexResampler = null; } #endif } @@ -64,9 +64,9 @@ void audio::drain::Resampler::configurationChange() { return; } #ifdef HAVE_SPEEX_DSP_RESAMPLE - if (m_speexResampler != nullptr) { + if (m_speexResampler != null) { speex_resampler_destroy(m_speexResampler); - m_speexResampler = nullptr; + m_speexResampler = null; } int err = 0; DRAIN_WARNING("Create resampler for : " << m_input << " to " << m_output); @@ -95,7 +95,7 @@ bool audio::drain::Resampler::process(audio::Time& _time, _outputNbChunk = _inputNbChunk; return true; } - if (_input == nullptr) { + if (_input == null) { _output = &(m_outputData[0]); _outputNbChunk = 0; DRAIN_ERROR("null pointer input ... "); @@ -118,7 +118,7 @@ bool audio::drain::Resampler::process(audio::Time& _time, m_outputData.resize(_outputNbChunk*m_output.getMap().size()*m_formatSize*16); _output = &(m_outputData[0]); - if (m_speexResampler == nullptr) { + if (m_speexResampler == null) { DRAIN_ERROR(" No speex resampler"); return false; } diff --git a/audio/drain/Volume.cpp b/audio/drain/Volume.cpp index e02a571..400d7ac 100644 --- a/audio/drain/Volume.cpp +++ b/audio/drain/Volume.cpp @@ -12,7 +12,7 @@ extern "C" { audio::drain::Volume::Volume() : m_volumeAppli(1.0f), - m_functionConvert(nullptr) { + m_functionConvert(null) { } @@ -162,7 +162,7 @@ void audio::drain::Volume::volumeChange() { float volumedB = 0.0f; bool mute = false; for (size_t iii=0; iiigetMute() == true) { @@ -338,7 +338,7 @@ bool audio::drain::Volume::process(audio::Time& _time, _outputNbChunk = _inputNbChunk; return true; } - if (_input == nullptr) { + if (_input == null) { _output = &(m_outputData[0]); _outputNbChunk = 0; DRAIN_ERROR("null pointer input ... "); @@ -347,7 +347,7 @@ bool audio::drain::Volume::process(audio::Time& _time, _outputNbChunk = _inputNbChunk; m_outputData.resize(_outputNbChunk*m_input.getMap().size()*m_formatSize); _output = &(m_outputData[0]); - if (m_functionConvert == nullptr) { + if (m_functionConvert == null) { DRAIN_ERROR("null function ptr"); return false; } @@ -357,11 +357,11 @@ bool audio::drain::Volume::process(audio::Time& _time, } void audio::drain::Volume::addVolumeStage(const ememory::SharedPtr& _volume) { - if (_volume == nullptr) { + if (_volume == null) { return; } for (size_t iii=0; iiigetName() == "FLOW") { @@ -408,7 +408,7 @@ etk::String audio::drain::Volume::getParameter(const etk::String& _parameter) co if (_parameter == "FLOW") { // set Volume ... for (auto &it : m_volumeList) { - if (it == nullptr) { + if (it == null) { continue; } if (it->getName() == "FLOW") { @@ -424,7 +424,7 @@ etk::String audio::drain::Volume::getParameterProperty(const etk::String& _param if (_parameter == "FLOW") { // set Volume ... for (auto &it : m_volumeList) { - if (it == nullptr) { + if (it == null) { continue; } if (it->getName() == "FLOW") { @@ -439,7 +439,7 @@ etk::String audio::drain::Volume::getParameterProperty(const etk::String& _param etk::String audio::drain::Volume::getDotDesc() { etk::String out = audio::drain::Algo::getDotDesc(); for (auto &it : m_volumeList) { - if (it == nullptr) { + if (it == null) { continue; } out += "\\n" + it->getName() + "=" + etk::toString(it->getVolume()) + "dB"; diff --git a/tools/drainBiQuadProfiling/appl/Windows.cpp b/tools/drainBiQuadProfiling/appl/Windows.cpp index 231a6d0..8930617 100644 --- a/tools/drainBiQuadProfiling/appl/Windows.cpp +++ b/tools/drainBiQuadProfiling/appl/Windows.cpp @@ -16,18 +16,18 @@ define APPL_SAVE_FILE_MACRO(type,fileName,dataPointer,nbElement) \ do { \ - static FILE *pointerOnFile = nullptr; \ + static FILE *pointerOnFile = null; \ static bool errorOpen = false; \ - if (pointerOnFile == nullptr) { \ + if (pointerOnFile == null) { \ APPL_WARNING("open file '" << fileName << "' type=" << #type); \ pointerOnFile = fopen(fileName,"w"); \ if ( errorOpen == false \ - && pointerOnFile == nullptr) { \ + && pointerOnFile == null) { \ APPL_ERROR("ERROR OPEN file ... '" << fileName << "' type=" << #type); \ errorOpen=true; \ } \ } \ - if (pointerOnFile != nullptr) { \ + if (pointerOnFile != null) { \ fwrite((dataPointer), sizeof(type), (nbElement), pointerOnFile); \ /* fflush(pointerOnFile);*/ \ } \ @@ -67,7 +67,7 @@ void appl::Windows::init() { setTitle("Drain Equalizer Profiler"); m_gui = ewol::widget::Composer::create(ewol::widget::Composer::file, "DATA:gui.xml"); - if (m_gui != nullptr) { + if (m_gui != null) { setSubWidget(m_gui); } subBind(ewol::widget::Button, "sample-rate-low", signalPressed, sharedFromThis(), &appl::Windows::onCallbackSampleRateLow); @@ -265,8 +265,8 @@ void appl::Windows::onCallbackStart16() { } } // process - int16_t* output = nullptr; - void* outputVoid = nullptr; + int16_t* output = null; + void* outputVoid = null; size_t outputNbChunk = 0; APPL_SAVE_FILE_MACRO(int16_t,"aaa_test_INPUT_16.raw",&data[0],data.size()); bq.process(&data[0], &data[0], data.size(), 1, 1); diff --git a/tools/drainEqualizerProfiling/appl/Windows.cpp b/tools/drainEqualizerProfiling/appl/Windows.cpp index 6655eb6..9637dc3 100644 --- a/tools/drainEqualizerProfiling/appl/Windows.cpp +++ b/tools/drainEqualizerProfiling/appl/Windows.cpp @@ -14,18 +14,18 @@ #define APPL_SAVE_FILE_MACRO(type,fileName,dataPointer,nbElement) \ do { \ - static FILE *pointerOnFile = nullptr; \ + static FILE *pointerOnFile = null; \ static bool errorOpen = false; \ - if (pointerOnFile == nullptr) { \ + if (pointerOnFile == null) { \ APPL_WARNING("open file '" << fileName << "' type=" << #type); \ pointerOnFile = fopen(fileName,"w"); \ if ( errorOpen == false \ - && pointerOnFile == nullptr) { \ + && pointerOnFile == null) { \ APPL_ERROR("ERROR OPEN file ... '" << fileName << "' type=" << #type); \ errorOpen=true; \ } \ } \ - if (pointerOnFile != nullptr) { \ + if (pointerOnFile != null) { \ fwrite((dataPointer), sizeof(type), (nbElement), pointerOnFile); \ /* fflush(pointerOnFile);*/ \ } \ @@ -54,7 +54,7 @@ void appl::Windows::init() { setTitle("Drain Equalizer Profiler"); m_gui = ewol::widget::Composer::create(ewol::widget::Composer::file, "DATA:gui.xml"); - if (m_gui != nullptr) { + if (m_gui != null) { setSubWidget(m_gui); } subBind(ewol::widget::Button, "sample-rate-low", signalPressed, sharedFromThis(), &appl::Windows::onCallbackSampleRateLow); @@ -200,8 +200,8 @@ void appl::Windows::onCallbackStart16() { } } // process - int16_t* output = nullptr; - void* outputVoid = nullptr; + int16_t* output = null; + void* outputVoid = null; size_t outputNbChunk = 0; audio::Time time; APPL_SAVE_FILE_MACRO(int16_t, "aaa_test_INPUT.raw", &data[0], data.size()); @@ -241,8 +241,8 @@ void appl::Windows::onCallbackStartFloat() { } } // process - float* output = nullptr; - void* outputVoid = nullptr; + float* output = null; + void* outputVoid = null; size_t outputNbChunk = 0; audio::Time time; APPL_SAVE_FILE_MACRO(int16_t,"aaa_test_INPUT_F.raw",&data[0],data.size());