[DEV] update etk null

This commit is contained in:
Edouard DUPIN 2018-06-19 22:13:48 +02:00
parent 1863974f8f
commit fccbf4953e
14 changed files with 70 additions and 70 deletions

View File

@ -117,7 +117,7 @@ void audio::drain::Algo::setStatusFunction(algoStatusFunction _newFunction) {
} }
void audio::drain::Algo::generateStatus(const etk::String& _status) { void audio::drain::Algo::generateStatus(const etk::String& _status) {
if (m_statusFunction != nullptr) { if (m_statusFunction != null) {
if (m_name.size() == 0) { if (m_name.size() == 0) {
m_statusFunction(m_type, _status); m_statusFunction(m_type, _status);
} else { } else {

View File

@ -56,7 +56,7 @@ bool audio::drain::ChannelReorder::process(audio::Time& _time,
_output = _input; _output = _input;
return true; return true;
} }
if (_input == nullptr) { if (_input == null) {
_output = &(m_outputData[0]); _output = &(m_outputData[0]);
_outputNbChunk = 0; _outputNbChunk = 0;
DRAIN_ERROR("null pointer input ... "); DRAIN_ERROR("null pointer input ... ");

View File

@ -9,8 +9,8 @@
audio::drain::CircularBuffer::CircularBuffer(const audio::drain::CircularBuffer& _obj) : audio::drain::CircularBuffer::CircularBuffer(const audio::drain::CircularBuffer& _obj) :
m_data(), m_data(),
m_write(nullptr), m_write(null),
m_read(nullptr), m_read(null),
m_timeRead(), m_timeRead(),
m_capacity(0), m_capacity(0),
m_sizeChunk(0), m_sizeChunk(0),
@ -27,8 +27,8 @@ audio::drain::CircularBuffer& audio::drain::CircularBuffer::operator=(const audi
audio::drain::CircularBuffer::CircularBuffer() : audio::drain::CircularBuffer::CircularBuffer() :
m_data(), m_data(),
m_write(nullptr), m_write(null),
m_read(nullptr), m_read(null),
m_timeRead(), m_timeRead(),
m_capacity(0), m_capacity(0),
m_sizeChunk(0), m_sizeChunk(0),
@ -38,8 +38,8 @@ audio::drain::CircularBuffer::CircularBuffer() :
audio::drain::CircularBuffer::~CircularBuffer() { audio::drain::CircularBuffer::~CircularBuffer() {
m_data.clear(); m_data.clear();
m_read = nullptr; m_read = null;
m_write = nullptr; m_write = null;
} }
void audio::drain::CircularBuffer::setCapacity(size_t _capacity, size_t _chunkSize, uint32_t _frequency) { 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; _chunkSize = 8;
} }
m_data.clear(); m_data.clear();
m_write = nullptr; m_write = null;
m_read = nullptr; m_read = null;
m_frequency = _frequency; m_frequency = _frequency;
m_capacity = _capacity; m_capacity = _capacity;
m_sizeChunk = _chunkSize; m_sizeChunk = _chunkSize;

View File

@ -9,8 +9,8 @@
audio::drain::EndPointCallback::EndPointCallback() : audio::drain::EndPointCallback::EndPointCallback() :
m_outputFunction(nullptr), m_outputFunction(null),
m_inputFunction(nullptr) { m_inputFunction(null) {
} }
@ -50,7 +50,7 @@ bool audio::drain::EndPointCallback::process(audio::Time& _time,
void*& _output, void*& _output,
size_t& _outputNbChunk){ size_t& _outputNbChunk){
audio::drain::AutoLogInOut tmpLog("EndPointCallback"); audio::drain::AutoLogInOut tmpLog("EndPointCallback");
if (m_inputFunction != nullptr) { if (m_inputFunction != null) {
// Call user ... // Call user ...
DRAIN_VERBOSE("call user set " << _inputNbChunk << "*" << m_input.getMap().size()); DRAIN_VERBOSE("call user set " << _inputNbChunk << "*" << m_input.getMap().size());
m_inputFunction(_input, m_inputFunction(_input,
@ -61,7 +61,7 @@ bool audio::drain::EndPointCallback::process(audio::Time& _time,
m_output.getMap()); m_output.getMap());
return true; return true;
} }
if (m_outputFunction != nullptr) { if (m_outputFunction != null) {
// update buffer size ... // update buffer size ...
m_outputData.resize(_inputNbChunk*m_output.getMap().size()*m_formatSize); m_outputData.resize(_inputNbChunk*m_output.getMap().size()*m_formatSize);
// clean output to prevent errors ... // clean output to prevent errors ...

View File

@ -8,7 +8,7 @@
audio::drain::EndPointWrite::EndPointWrite() : audio::drain::EndPointWrite::EndPointWrite() :
m_function(nullptr), m_function(null),
m_bufferSizeMicroseconds(1000000), m_bufferSizeMicroseconds(1000000),
m_bufferSizeChunk(32), m_bufferSizeChunk(32),
m_bufferUnderFlowSize(0) { m_bufferUnderFlowSize(0) {
@ -58,7 +58,7 @@ bool audio::drain::EndPointWrite::process(audio::Time& _time,
size_t& _outputNbChunk){ size_t& _outputNbChunk){
audio::drain::AutoLogInOut tmpLog("EndPointWrite"); audio::drain::AutoLogInOut tmpLog("EndPointWrite");
//DRAIN_INFO(" nb Sample in buffer : " << m_buffer.size()); //DRAIN_INFO(" nb Sample in buffer : " << m_buffer.size());
if (m_function != nullptr) { if (m_function != null) {
// TODO : Rework this ... // TODO : Rework this ...
if (m_buffer.getSize() <= 20000) { if (m_buffer.getSize() <= 20000) {
m_function(_time, _inputNbChunk, m_output.getFormat(), m_output.getFrequency(), m_output.getMap()); m_function(_time, _inputNbChunk, m_output.getFormat(), m_output.getFrequency(), m_output.getMap());

View File

@ -45,7 +45,7 @@ bool audio::drain::Equalizer::process(audio::Time& _time,
size_t& _outputNbChunk) { size_t& _outputNbChunk) {
_outputNbChunk = _inputNbChunk; _outputNbChunk = _inputNbChunk;
_output = _input; _output = _input;
if (_input == nullptr) { if (_input == null) {
return false; return false;
} }
m_algo.process(_output, _input, _inputNbChunk); m_algo.process(_output, _input, _inputNbChunk);

View File

@ -123,7 +123,7 @@ static void convert__float__to__int32(void* _input, void* _output, size_t _nbSam
audio::drain::FormatUpdate::FormatUpdate() : audio::drain::FormatUpdate::FormatUpdate() :
m_functionConvert(nullptr) { m_functionConvert(null) {
} }
@ -251,7 +251,7 @@ bool audio::drain::FormatUpdate::process(audio::Time& _time,
_outputNbChunk = _inputNbChunk; _outputNbChunk = _inputNbChunk;
return true; return true;
} }
if (_input == nullptr) { if (_input == null) {
_output = &(m_outputData[0]); _output = &(m_outputData[0]);
_outputNbChunk = 0; _outputNbChunk = 0;
DRAIN_ERROR("null pointer input ... "); DRAIN_ERROR("null pointer input ... ");
@ -260,7 +260,7 @@ bool audio::drain::FormatUpdate::process(audio::Time& _time,
_outputNbChunk = _inputNbChunk; _outputNbChunk = _inputNbChunk;
m_outputData.resize(_outputNbChunk*m_input.getMap().size()*m_formatSize); m_outputData.resize(_outputNbChunk*m_input.getMap().size()*m_formatSize);
_output = &(m_outputData[0]); _output = &(m_outputData[0]);
if (m_functionConvert == nullptr) { if (m_functionConvert == null) {
DRAIN_ERROR("null function ptr"); DRAIN_ERROR("null function ptr");
return false; return false;
} }

View File

@ -105,7 +105,7 @@ void audio::drain::IOFormatInterface::setFrequency(float _value) {
} }
void audio::drain::IOFormatInterface::configurationChange() { void audio::drain::IOFormatInterface::configurationChange() {
if (m_ioChangeFunctor != nullptr) { if (m_ioChangeFunctor != null) {
m_ioChangeFunctor(); m_ioChangeFunctor();
} }
} }

View File

@ -27,7 +27,7 @@ audio::drain::Process::~Process() {
bool audio::drain::Process::push(audio::Time& _time, bool audio::drain::Process::push(audio::Time& _time,
void* _data, void* _data,
size_t _nbChunk) { size_t _nbChunk) {
void* out = nullptr; void* out = null;
size_t nbChunkOut; size_t nbChunkOut;
DRAIN_VERBOSE(" Process push"); DRAIN_VERBOSE(" Process push");
process(_time, _data, _nbChunk, out, nbChunkOut); process(_time, _data, _nbChunk, out, nbChunkOut);
@ -40,16 +40,16 @@ bool audio::drain::Process::pull(audio::Time& _time,
size_t _chunkSize) { size_t _chunkSize) {
//DRAIN_DEBUG("Execute:"); //DRAIN_DEBUG("Execute:");
while(m_data.size() < _nbChunk*_chunkSize) { while(m_data.size() < _nbChunk*_chunkSize) {
void* in = nullptr; void* in = null;
size_t nbChunkIn = _nbChunk - m_data.size()/_chunkSize; size_t nbChunkIn = _nbChunk - m_data.size()/_chunkSize;
void* out = nullptr; void* out = null;
size_t nbChunkOut; size_t nbChunkOut;
if (nbChunkIn < 128) { if (nbChunkIn < 128) {
nbChunkIn = 128; nbChunkIn = 128;
} }
// TODO : maybe remove this for input data ... // TODO : maybe remove this for input data ...
for (int32_t iii=m_listAlgo.size()-1; iii >=0; --iii) { 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); 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); DRAIN_VERBOSE(" process : " << m_listAlgo.size() << " algos nbChunk=" << _inNbChunk);
for (size_t iii=0; iii<m_listAlgo.size(); ++iii) { for (size_t iii=0; iii<m_listAlgo.size(); ++iii) {
DRAIN_VERBOSE(" Algo " << iii+1 << "/" << m_listAlgo.size()); DRAIN_VERBOSE(" Algo " << iii+1 << "/" << m_listAlgo.size());
if (m_listAlgo[iii] != nullptr) { if (m_listAlgo[iii] != null) {
m_listAlgo[iii]->process(_time, _inData, _inNbChunk, _outData, _outNbChunk); m_listAlgo[iii]->process(_time, _inData, _inNbChunk, _outData, _outNbChunk);
_inData = _outData; _inData = _outData;
_inNbChunk = _outNbChunk; _inNbChunk = _outNbChunk;
@ -427,7 +427,7 @@ bool audio::drain::Process::processIn(void* _inData,
size_t _inNbChunk, size_t _inNbChunk,
void* _outData, void* _outData,
size_t _outNbChunk){ size_t _outNbChunk){
void* outData = nullptr; void* outData = null;
size_t outSize = 0; size_t outSize = 0;
bool error = process(_inData, _inNbChunk, outData, outSize); bool error = process(_inData, _inNbChunk, outData, outSize);
if (outSize != _outNbChunk) { if (outSize != _outNbChunk) {
@ -484,7 +484,7 @@ void audio::drain::Process::generateDot(etk::FSNode& _node,
// -- STEP 3 -- // -- STEP 3 --
// ---------------------- // ----------------------
for (size_t iii=0; iii<m_listAlgo.size(); ++iii) { for (size_t iii=0; iii<m_listAlgo.size(); ++iii) {
if (m_listAlgo[iii] == nullptr) { if (m_listAlgo[iii] == null) {
continue; continue;
} }
etk::String connectStringSecond = "ALGO_" + etk::toString(_basicID) + "__" + etk::toString(iii); etk::String connectStringSecond = "ALGO_" + etk::toString(_basicID) + "__" + etk::toString(iii);
@ -533,7 +533,7 @@ void audio::drain::Process::generateDot(etk::FSNode& _node,
// ---------------------- // ----------------------
for (int32_t iii=m_listAlgo.size()-1; iii>=0; --iii) { for (int32_t iii=m_listAlgo.size()-1; iii>=0; --iii) {
//for (size_t iii=0; iii<m_listAlgo.size(); ++iii) { //for (size_t iii=0; iii<m_listAlgo.size(); ++iii) {
if (m_listAlgo[iii] == nullptr) { if (m_listAlgo[iii] == null) {
continue; continue;
} }
etk::String connectStringSecond = "ALGO_" + etk::toString(_basicID) + "__" + etk::toString(iii); etk::String connectStringSecond = "ALGO_" + etk::toString(_basicID) + "__" + etk::toString(iii);
@ -590,7 +590,7 @@ void audio::drain::Process::generateDotProcess(etk::FSNode& _node, int32_t _offs
_node << " node [shape=box];\n"; _node << " node [shape=box];\n";
if (_reserseGraph == false) { if (_reserseGraph == false) {
for (size_t iii=0; iii<m_listAlgo.size(); ++iii) { for (size_t iii=0; iii<m_listAlgo.size(); ++iii) {
if (m_listAlgo[iii] == nullptr) { if (m_listAlgo[iii] == null) {
continue; continue;
} }
etk::String connectStringSecond = "ALGO_" + etk::toString(_basicID) + "__" + etk::toString(iii); etk::String connectStringSecond = "ALGO_" + etk::toString(_basicID) + "__" + etk::toString(iii);
@ -609,7 +609,7 @@ void audio::drain::Process::generateDotProcess(etk::FSNode& _node, int32_t _offs
} else { } else {
//for (int32_t iii=m_listAlgo.size()-1; iii>=0; --iii) { //for (int32_t iii=m_listAlgo.size()-1; iii>=0; --iii) {
for (size_t iii=0; iii<m_listAlgo.size(); ++iii) { for (size_t iii=0; iii<m_listAlgo.size(); ++iii) {
if (m_listAlgo[iii] == nullptr) { if (m_listAlgo[iii] == null) {
continue; continue;
} }
etk::String connectStringSecond = "ALGO_" + etk::toString(_basicID) + "__" + etk::toString(iii); etk::String connectStringSecond = "ALGO_" + etk::toString(_basicID) + "__" + etk::toString(iii);
@ -648,7 +648,7 @@ void audio::drain::Process::generateDotProcess(etk::FSNode& _node, int32_t _offs
void audio::drain::Process::generateStatus(const etk::String& _origin, const etk::String& _status) { void audio::drain::Process::generateStatus(const etk::String& _origin, const etk::String& _status) {
if (m_statusFunction != nullptr) { if (m_statusFunction != null) {
m_statusFunction(_origin, _status); m_statusFunction(_origin, _status);
} }
} }

View File

@ -116,7 +116,7 @@ namespace audio {
template<typename T> ememory::SharedPtr<T> get(const etk::String& _name) { template<typename T> ememory::SharedPtr<T> get(const etk::String& _name) {
for (size_t iii=0; iii<m_listAlgo.size(); ++iii) { for (size_t iii=0; iii<m_listAlgo.size(); ++iii) {
if (m_listAlgo[iii] == nullptr) { if (m_listAlgo[iii] == null) {
continue; continue;
} }
if (m_listAlgo[iii]->getName() == _name) { if (m_listAlgo[iii]->getName() == _name) {
@ -127,7 +127,7 @@ namespace audio {
} }
template<typename T> ememory::SharedPtr<const T> get(const etk::String& _name) const { template<typename T> ememory::SharedPtr<const T> get(const etk::String& _name) const {
for (size_t iii=0; iii<m_listAlgo.size(); ++iii) { for (size_t iii=0; iii<m_listAlgo.size(); ++iii) {
if (m_listAlgo[iii] == nullptr) { if (m_listAlgo[iii] == null) {
continue; continue;
} }
if (m_listAlgo[iii]->getName() == _name) { if (m_listAlgo[iii]->getName() == _name) {
@ -142,7 +142,7 @@ namespace audio {
template<typename T> void removeIfFirst() { template<typename T> void removeIfFirst() {
if (m_listAlgo.size() > 0) { if (m_listAlgo.size() > 0) {
ememory::SharedPtr<T> algoEP = get<T>(0); ememory::SharedPtr<T> algoEP = get<T>(0);
if (algoEP != nullptr) { if (algoEP != null) {
m_listAlgo.erase(m_listAlgo.begin()); m_listAlgo.erase(m_listAlgo.begin());
} }
} }
@ -150,7 +150,7 @@ namespace audio {
template<typename T> void removeIfLast() { template<typename T> void removeIfLast() {
if (m_listAlgo.size() > 0) { if (m_listAlgo.size() > 0) {
ememory::SharedPtr<T> algoEP = get<T>(m_listAlgo.size()-1); ememory::SharedPtr<T> algoEP = get<T>(m_listAlgo.size()-1);
if (algoEP != nullptr) { if (algoEP != null) {
m_listAlgo.erase(m_listAlgo.begin()+m_listAlgo.size()-1); m_listAlgo.erase(m_listAlgo.begin()+m_listAlgo.size()-1);
} }
} }
@ -158,7 +158,7 @@ namespace audio {
template<typename T> bool hasType() { template<typename T> bool hasType() {
for (size_t iii=0; iii<m_listAlgo.size(); ++iii) { for (size_t iii=0; iii<m_listAlgo.size(); ++iii) {
ememory::SharedPtr<T> tmp = ememory::dynamicPointerCast<T>(m_listAlgo[iii]); ememory::SharedPtr<T> tmp = ememory::dynamicPointerCast<T>(m_listAlgo[iii]);
if (tmp != nullptr) { if (tmp != null) {
return true; return true;
} }
} }

View File

@ -9,7 +9,7 @@
audio::drain::Resampler::Resampler() : audio::drain::Resampler::Resampler() :
#ifdef HAVE_SPEEX_DSP_RESAMPLE #ifdef HAVE_SPEEX_DSP_RESAMPLE
m_speexResampler(nullptr), m_speexResampler(null),
#endif #endif
m_positionRead(0), m_positionRead(0),
m_positionWrite(0) { m_positionWrite(0) {
@ -31,9 +31,9 @@ ememory::SharedPtr<audio::drain::Resampler> audio::drain::Resampler::create() {
audio::drain::Resampler::~Resampler() { audio::drain::Resampler::~Resampler() {
#ifdef HAVE_SPEEX_DSP_RESAMPLE #ifdef HAVE_SPEEX_DSP_RESAMPLE
if (m_speexResampler != nullptr) { if (m_speexResampler != null) {
speex_resampler_destroy(m_speexResampler); speex_resampler_destroy(m_speexResampler);
m_speexResampler = nullptr; m_speexResampler = null;
} }
#endif #endif
} }
@ -64,9 +64,9 @@ void audio::drain::Resampler::configurationChange() {
return; return;
} }
#ifdef HAVE_SPEEX_DSP_RESAMPLE #ifdef HAVE_SPEEX_DSP_RESAMPLE
if (m_speexResampler != nullptr) { if (m_speexResampler != null) {
speex_resampler_destroy(m_speexResampler); speex_resampler_destroy(m_speexResampler);
m_speexResampler = nullptr; m_speexResampler = null;
} }
int err = 0; int err = 0;
DRAIN_WARNING("Create resampler for : " << m_input << " to " << m_output); DRAIN_WARNING("Create resampler for : " << m_input << " to " << m_output);
@ -95,7 +95,7 @@ bool audio::drain::Resampler::process(audio::Time& _time,
_outputNbChunk = _inputNbChunk; _outputNbChunk = _inputNbChunk;
return true; return true;
} }
if (_input == nullptr) { if (_input == null) {
_output = &(m_outputData[0]); _output = &(m_outputData[0]);
_outputNbChunk = 0; _outputNbChunk = 0;
DRAIN_ERROR("null pointer input ... "); 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); m_outputData.resize(_outputNbChunk*m_output.getMap().size()*m_formatSize*16);
_output = &(m_outputData[0]); _output = &(m_outputData[0]);
if (m_speexResampler == nullptr) { if (m_speexResampler == null) {
DRAIN_ERROR(" No speex resampler"); DRAIN_ERROR(" No speex resampler");
return false; return false;
} }

View File

@ -12,7 +12,7 @@ extern "C" {
audio::drain::Volume::Volume() : audio::drain::Volume::Volume() :
m_volumeAppli(1.0f), m_volumeAppli(1.0f),
m_functionConvert(nullptr) { m_functionConvert(null) {
} }
@ -162,7 +162,7 @@ void audio::drain::Volume::volumeChange() {
float volumedB = 0.0f; float volumedB = 0.0f;
bool mute = false; bool mute = false;
for (size_t iii=0; iii<m_volumeList.size(); ++iii) { for (size_t iii=0; iii<m_volumeList.size(); ++iii) {
if (m_volumeList[iii] == nullptr) { if (m_volumeList[iii] == null) {
continue; continue;
} }
if (m_volumeList[iii]->getMute() == true) { if (m_volumeList[iii]->getMute() == true) {
@ -338,7 +338,7 @@ bool audio::drain::Volume::process(audio::Time& _time,
_outputNbChunk = _inputNbChunk; _outputNbChunk = _inputNbChunk;
return true; return true;
} }
if (_input == nullptr) { if (_input == null) {
_output = &(m_outputData[0]); _output = &(m_outputData[0]);
_outputNbChunk = 0; _outputNbChunk = 0;
DRAIN_ERROR("null pointer input ... "); DRAIN_ERROR("null pointer input ... ");
@ -347,7 +347,7 @@ bool audio::drain::Volume::process(audio::Time& _time,
_outputNbChunk = _inputNbChunk; _outputNbChunk = _inputNbChunk;
m_outputData.resize(_outputNbChunk*m_input.getMap().size()*m_formatSize); m_outputData.resize(_outputNbChunk*m_input.getMap().size()*m_formatSize);
_output = &(m_outputData[0]); _output = &(m_outputData[0]);
if (m_functionConvert == nullptr) { if (m_functionConvert == null) {
DRAIN_ERROR("null function ptr"); DRAIN_ERROR("null function ptr");
return false; return false;
} }
@ -357,11 +357,11 @@ bool audio::drain::Volume::process(audio::Time& _time,
} }
void audio::drain::Volume::addVolumeStage(const ememory::SharedPtr<audio::drain::VolumeElement>& _volume) { void audio::drain::Volume::addVolumeStage(const ememory::SharedPtr<audio::drain::VolumeElement>& _volume) {
if (_volume == nullptr) { if (_volume == null) {
return; return;
} }
for (size_t iii=0; iii<m_volumeList.size(); ++iii) { for (size_t iii=0; iii<m_volumeList.size(); ++iii) {
if (m_volumeList[iii] == nullptr) { if (m_volumeList[iii] == null) {
continue; continue;
} }
if (m_volumeList[iii] == _volume) { if (m_volumeList[iii] == _volume) {
@ -380,7 +380,7 @@ bool audio::drain::Volume::setParameter(const etk::String& _parameter, const etk
if (_parameter == "FLOW") { if (_parameter == "FLOW") {
// set Volume ... // set Volume ...
for (auto &it : m_volumeList) { for (auto &it : m_volumeList) {
if (it == nullptr) { if (it == null) {
continue; continue;
} }
if (it->getName() == "FLOW") { if (it->getName() == "FLOW") {
@ -408,7 +408,7 @@ etk::String audio::drain::Volume::getParameter(const etk::String& _parameter) co
if (_parameter == "FLOW") { if (_parameter == "FLOW") {
// set Volume ... // set Volume ...
for (auto &it : m_volumeList) { for (auto &it : m_volumeList) {
if (it == nullptr) { if (it == null) {
continue; continue;
} }
if (it->getName() == "FLOW") { if (it->getName() == "FLOW") {
@ -424,7 +424,7 @@ etk::String audio::drain::Volume::getParameterProperty(const etk::String& _param
if (_parameter == "FLOW") { if (_parameter == "FLOW") {
// set Volume ... // set Volume ...
for (auto &it : m_volumeList) { for (auto &it : m_volumeList) {
if (it == nullptr) { if (it == null) {
continue; continue;
} }
if (it->getName() == "FLOW") { 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 audio::drain::Volume::getDotDesc() {
etk::String out = audio::drain::Algo::getDotDesc(); etk::String out = audio::drain::Algo::getDotDesc();
for (auto &it : m_volumeList) { for (auto &it : m_volumeList) {
if (it == nullptr) { if (it == null) {
continue; continue;
} }
out += "\\n" + it->getName() + "=" + etk::toString(it->getVolume()) + "dB"; out += "\\n" + it->getName() + "=" + etk::toString(it->getVolume()) + "dB";

View File

@ -16,18 +16,18 @@
define APPL_SAVE_FILE_MACRO(type,fileName,dataPointer,nbElement) \ define APPL_SAVE_FILE_MACRO(type,fileName,dataPointer,nbElement) \
do { \ do { \
static FILE *pointerOnFile = nullptr; \ static FILE *pointerOnFile = null; \
static bool errorOpen = false; \ static bool errorOpen = false; \
if (pointerOnFile == nullptr) { \ if (pointerOnFile == null) { \
APPL_WARNING("open file '" << fileName << "' type=" << #type); \ APPL_WARNING("open file '" << fileName << "' type=" << #type); \
pointerOnFile = fopen(fileName,"w"); \ pointerOnFile = fopen(fileName,"w"); \
if ( errorOpen == false \ if ( errorOpen == false \
&& pointerOnFile == nullptr) { \ && pointerOnFile == null) { \
APPL_ERROR("ERROR OPEN file ... '" << fileName << "' type=" << #type); \ APPL_ERROR("ERROR OPEN file ... '" << fileName << "' type=" << #type); \
errorOpen=true; \ errorOpen=true; \
} \ } \
} \ } \
if (pointerOnFile != nullptr) { \ if (pointerOnFile != null) { \
fwrite((dataPointer), sizeof(type), (nbElement), pointerOnFile); \ fwrite((dataPointer), sizeof(type), (nbElement), pointerOnFile); \
/* fflush(pointerOnFile);*/ \ /* fflush(pointerOnFile);*/ \
} \ } \
@ -67,7 +67,7 @@ void appl::Windows::init() {
setTitle("Drain Equalizer Profiler"); setTitle("Drain Equalizer Profiler");
m_gui = ewol::widget::Composer::create(ewol::widget::Composer::file, "DATA:gui.xml"); m_gui = ewol::widget::Composer::create(ewol::widget::Composer::file, "DATA:gui.xml");
if (m_gui != nullptr) { if (m_gui != null) {
setSubWidget(m_gui); setSubWidget(m_gui);
} }
subBind(ewol::widget::Button, "sample-rate-low", signalPressed, sharedFromThis(), &appl::Windows::onCallbackSampleRateLow); subBind(ewol::widget::Button, "sample-rate-low", signalPressed, sharedFromThis(), &appl::Windows::onCallbackSampleRateLow);
@ -265,8 +265,8 @@ void appl::Windows::onCallbackStart16() {
} }
} }
// process // process
int16_t* output = nullptr; int16_t* output = null;
void* outputVoid = nullptr; void* outputVoid = null;
size_t outputNbChunk = 0; size_t outputNbChunk = 0;
APPL_SAVE_FILE_MACRO(int16_t,"aaa_test_INPUT_16.raw",&data[0],data.size()); 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); bq.process(&data[0], &data[0], data.size(), 1, 1);

View File

@ -14,18 +14,18 @@
#define APPL_SAVE_FILE_MACRO(type,fileName,dataPointer,nbElement) \ #define APPL_SAVE_FILE_MACRO(type,fileName,dataPointer,nbElement) \
do { \ do { \
static FILE *pointerOnFile = nullptr; \ static FILE *pointerOnFile = null; \
static bool errorOpen = false; \ static bool errorOpen = false; \
if (pointerOnFile == nullptr) { \ if (pointerOnFile == null) { \
APPL_WARNING("open file '" << fileName << "' type=" << #type); \ APPL_WARNING("open file '" << fileName << "' type=" << #type); \
pointerOnFile = fopen(fileName,"w"); \ pointerOnFile = fopen(fileName,"w"); \
if ( errorOpen == false \ if ( errorOpen == false \
&& pointerOnFile == nullptr) { \ && pointerOnFile == null) { \
APPL_ERROR("ERROR OPEN file ... '" << fileName << "' type=" << #type); \ APPL_ERROR("ERROR OPEN file ... '" << fileName << "' type=" << #type); \
errorOpen=true; \ errorOpen=true; \
} \ } \
} \ } \
if (pointerOnFile != nullptr) { \ if (pointerOnFile != null) { \
fwrite((dataPointer), sizeof(type), (nbElement), pointerOnFile); \ fwrite((dataPointer), sizeof(type), (nbElement), pointerOnFile); \
/* fflush(pointerOnFile);*/ \ /* fflush(pointerOnFile);*/ \
} \ } \
@ -54,7 +54,7 @@ void appl::Windows::init() {
setTitle("Drain Equalizer Profiler"); setTitle("Drain Equalizer Profiler");
m_gui = ewol::widget::Composer::create(ewol::widget::Composer::file, "DATA:gui.xml"); m_gui = ewol::widget::Composer::create(ewol::widget::Composer::file, "DATA:gui.xml");
if (m_gui != nullptr) { if (m_gui != null) {
setSubWidget(m_gui); setSubWidget(m_gui);
} }
subBind(ewol::widget::Button, "sample-rate-low", signalPressed, sharedFromThis(), &appl::Windows::onCallbackSampleRateLow); subBind(ewol::widget::Button, "sample-rate-low", signalPressed, sharedFromThis(), &appl::Windows::onCallbackSampleRateLow);
@ -200,8 +200,8 @@ void appl::Windows::onCallbackStart16() {
} }
} }
// process // process
int16_t* output = nullptr; int16_t* output = null;
void* outputVoid = nullptr; void* outputVoid = null;
size_t outputNbChunk = 0; size_t outputNbChunk = 0;
audio::Time time; audio::Time time;
APPL_SAVE_FILE_MACRO(int16_t, "aaa_test_INPUT.raw", &data[0], data.size()); APPL_SAVE_FILE_MACRO(int16_t, "aaa_test_INPUT.raw", &data[0], data.size());
@ -241,8 +241,8 @@ void appl::Windows::onCallbackStartFloat() {
} }
} }
// process // process
float* output = nullptr; float* output = null;
void* outputVoid = nullptr; void* outputVoid = null;
size_t outputNbChunk = 0; size_t outputNbChunk = 0;
audio::Time time; audio::Time time;
APPL_SAVE_FILE_MACRO(int16_t,"aaa_test_INPUT_F.raw",&data[0],data.size()); APPL_SAVE_FILE_MACRO(int16_t,"aaa_test_INPUT_F.raw",&data[0],data.size());