[DEV] update etk null

This commit is contained in:
Edouard DUPIN 2018-06-19 22:13:48 +02:00
parent 9a21d57c1f
commit 965df2ee2f
29 changed files with 199 additions and 199 deletions

View File

@ -54,7 +54,7 @@ bool audio::river::Interface::init(float _freq,
m_process.setInputConfig(m_node->getInterfaceFormat()); m_process.setInputConfig(m_node->getInterfaceFormat());
// Add volume only if the Low level has a volume (otherwise it will be added by the application) // Add volume only if the Low level has a volume (otherwise it will be added by the application)
ememory::SharedPtr<audio::drain::VolumeElement> tmpVolume = m_node->getVolume(); ememory::SharedPtr<audio::drain::VolumeElement> tmpVolume = m_node->getVolume();
if (tmpVolume != nullptr) { if (tmpVolume != null) {
// add all time the volume stage : // add all time the volume stage :
ememory::SharedPtr<audio::drain::Volume> algo = audio::drain::Volume::create(); ememory::SharedPtr<audio::drain::Volume> algo = audio::drain::Volume::create();
//algo->setInputFormat(m_node->getInterfaceFormat()); //algo->setInputFormat(m_node->getInterfaceFormat());
@ -69,7 +69,7 @@ bool audio::river::Interface::init(float _freq,
m_process.setInputConfig(audio::drain::IOFormatInterface(map, _format, _freq)); m_process.setInputConfig(audio::drain::IOFormatInterface(map, _format, _freq));
// Add volume only if the Low level has a volume (otherwise it will be added by the application) // Add volume only if the Low level has a volume (otherwise it will be added by the application)
ememory::SharedPtr<audio::drain::VolumeElement> tmpVolume = m_node->getVolume(); ememory::SharedPtr<audio::drain::VolumeElement> tmpVolume = m_node->getVolume();
if (tmpVolume != nullptr) { if (tmpVolume != null) {
// add all time the volume stage : // add all time the volume stage :
ememory::SharedPtr<audio::drain::Volume> algo = audio::drain::Volume::create(); ememory::SharedPtr<audio::drain::Volume> algo = audio::drain::Volume::create();
//algo->setOutputFormat(m_node->getInterfaceFormat()); //algo->setOutputFormat(m_node->getInterfaceFormat());
@ -165,7 +165,7 @@ void audio::river::Interface::setWriteCallback(audio::drain::playbackFunctionWri
RIVER_WARNING("Add output Write"); RIVER_WARNING("Add output Write");
m_process.removeAlgoDynamic(); m_process.removeAlgoDynamic();
ememory::SharedPtr<audio::drain::EndPointWrite> algo = m_process.get<audio::drain::EndPointWrite>(0); ememory::SharedPtr<audio::drain::EndPointWrite> algo = m_process.get<audio::drain::EndPointWrite>(0);
if (algo == nullptr) { if (algo == null) {
return; return;
} }
algo->setCallback(_function); algo->setCallback(_function);
@ -202,7 +202,7 @@ bool audio::river::Interface::setParameter(const etk::String& _filter, const etk
return false; return false;
} }
ememory::SharedPtr<audio::drain::Algo> algo = m_process.get<audio::drain::Algo>(_filter); ememory::SharedPtr<audio::drain::Algo> algo = m_process.get<audio::drain::Algo>(_filter);
if (algo == nullptr) { if (algo == null) {
RIVER_ERROR("setParameter(" << _filter << ") ==> no filter named like this ..."); RIVER_ERROR("setParameter(" << _filter << ") ==> no filter named like this ...");
return false; return false;
} }
@ -214,7 +214,7 @@ etk::String audio::river::Interface::getParameter(const etk::String& _filter, co
RIVER_DEBUG("getParameter [BEGIN] : '" << _filter << "':'" << _parameter << "'"); RIVER_DEBUG("getParameter [BEGIN] : '" << _filter << "':'" << _parameter << "'");
etk::String out; etk::String out;
ememory::SharedPtr<const audio::drain::Algo> algo = m_process.get<const audio::drain::Algo>(_filter); ememory::SharedPtr<const audio::drain::Algo> algo = m_process.get<const audio::drain::Algo>(_filter);
if (algo == nullptr) { if (algo == null) {
RIVER_ERROR("setParameter(" << _filter << ") ==> no filter named like this ..."); RIVER_ERROR("setParameter(" << _filter << ") ==> no filter named like this ...");
return "[ERROR]"; return "[ERROR]";
} }
@ -226,7 +226,7 @@ etk::String audio::river::Interface::getParameterProperty(const etk::String& _fi
RIVER_DEBUG("getParameterProperty [BEGIN] : '" << _filter << "':'" << _parameter << "'"); RIVER_DEBUG("getParameterProperty [BEGIN] : '" << _filter << "':'" << _parameter << "'");
etk::String out; etk::String out;
ememory::SharedPtr<const audio::drain::Algo> algo = m_process.get<const audio::drain::Algo>(_filter); ememory::SharedPtr<const audio::drain::Algo> algo = m_process.get<const audio::drain::Algo>(_filter);
if (algo == nullptr) { if (algo == null) {
RIVER_ERROR("setParameter(" << _filter << ") ==> no filter named like this ..."); RIVER_ERROR("setParameter(" << _filter << ") ==> no filter named like this ...");
return "[ERROR]"; return "[ERROR]";
} }
@ -239,7 +239,7 @@ void audio::river::Interface::write(const void* _value, size_t _nbChunk) {
ethread::RecursiveLock lock(m_mutex); ethread::RecursiveLock lock(m_mutex);
m_process.updateInterAlgo(); m_process.updateInterAlgo();
ememory::SharedPtr<audio::drain::EndPointWrite> algo = m_process.get<audio::drain::EndPointWrite>(0); ememory::SharedPtr<audio::drain::EndPointWrite> algo = m_process.get<audio::drain::EndPointWrite>(0);
if (algo == nullptr) { if (algo == null) {
return; return;
} }
algo->write(_value, _nbChunk); algo->write(_value, _nbChunk);
@ -291,7 +291,7 @@ void audio::river::Interface::setBufferSize(size_t _nbChunk) {
ethread::RecursiveLock lock(m_mutex); ethread::RecursiveLock lock(m_mutex);
if (m_node->isInput() == true) { if (m_node->isInput() == true) {
ememory::SharedPtr<audio::drain::EndPointRead> algo = m_process.get<audio::drain::EndPointRead>(m_process.size()-1); ememory::SharedPtr<audio::drain::EndPointRead> algo = m_process.get<audio::drain::EndPointRead>(m_process.size()-1);
if (algo == nullptr) { if (algo == null) {
RIVER_ERROR("Request set buffer size for Interface that is not READ or WRITE mode ..."); RIVER_ERROR("Request set buffer size for Interface that is not READ or WRITE mode ...");
return; return;
} }
@ -299,7 +299,7 @@ void audio::river::Interface::setBufferSize(size_t _nbChunk) {
return; return;
} }
ememory::SharedPtr<audio::drain::EndPointWrite> algo = m_process.get<audio::drain::EndPointWrite>(0); ememory::SharedPtr<audio::drain::EndPointWrite> algo = m_process.get<audio::drain::EndPointWrite>(0);
if (algo == nullptr) { if (algo == null) {
RIVER_ERROR("Request set buffer size for Interface that is not READ or WRITE mode ..."); RIVER_ERROR("Request set buffer size for Interface that is not READ or WRITE mode ...");
return; return;
} }
@ -310,7 +310,7 @@ void audio::river::Interface::setBufferSize(const echrono::microseconds& _time)
ethread::RecursiveLock lock(m_mutex); ethread::RecursiveLock lock(m_mutex);
if (m_node->isInput() == true) { if (m_node->isInput() == true) {
ememory::SharedPtr<audio::drain::EndPointRead> algo = m_process.get<audio::drain::EndPointRead>(m_process.size()-1); ememory::SharedPtr<audio::drain::EndPointRead> algo = m_process.get<audio::drain::EndPointRead>(m_process.size()-1);
if (algo == nullptr) { if (algo == null) {
RIVER_ERROR("Request set buffer size for Interface that is not READ or WRITE mode ..."); RIVER_ERROR("Request set buffer size for Interface that is not READ or WRITE mode ...");
return; return;
} }
@ -318,7 +318,7 @@ void audio::river::Interface::setBufferSize(const echrono::microseconds& _time)
return; return;
} }
ememory::SharedPtr<audio::drain::EndPointWrite> algo = m_process.get<audio::drain::EndPointWrite>(0); ememory::SharedPtr<audio::drain::EndPointWrite> algo = m_process.get<audio::drain::EndPointWrite>(0);
if (algo == nullptr) { if (algo == null) {
RIVER_ERROR("Request set buffer size for Interface that is not READ or WRITE mode ..."); RIVER_ERROR("Request set buffer size for Interface that is not READ or WRITE mode ...");
return; return;
} }
@ -329,14 +329,14 @@ size_t audio::river::Interface::getBufferSize() {
ethread::RecursiveLock lock(m_mutex); ethread::RecursiveLock lock(m_mutex);
if (m_node->isInput() == true) { if (m_node->isInput() == true) {
ememory::SharedPtr<audio::drain::EndPointRead> algo = m_process.get<audio::drain::EndPointRead>(m_process.size()-1); ememory::SharedPtr<audio::drain::EndPointRead> algo = m_process.get<audio::drain::EndPointRead>(m_process.size()-1);
if (algo == nullptr) { if (algo == null) {
RIVER_ERROR("Request get buffer size for Interface that is not READ or WRITE mode ..."); RIVER_ERROR("Request get buffer size for Interface that is not READ or WRITE mode ...");
return 0; return 0;
} }
return algo->getBufferSize(); return algo->getBufferSize();
} }
ememory::SharedPtr<audio::drain::EndPointWrite> algo = m_process.get<audio::drain::EndPointWrite>(0); ememory::SharedPtr<audio::drain::EndPointWrite> algo = m_process.get<audio::drain::EndPointWrite>(0);
if (algo == nullptr) { if (algo == null) {
RIVER_ERROR("Request get buffer size for Interface that is not READ or WRITE mode ..."); RIVER_ERROR("Request get buffer size for Interface that is not READ or WRITE mode ...");
return 0; return 0;
} }
@ -347,14 +347,14 @@ echrono::microseconds audio::river::Interface::getBufferSizeMicrosecond() {
ethread::RecursiveLock lock(m_mutex); ethread::RecursiveLock lock(m_mutex);
if (m_node->isInput() == true) { if (m_node->isInput() == true) {
ememory::SharedPtr<audio::drain::EndPointRead> algo = m_process.get<audio::drain::EndPointRead>(m_process.size()-1); ememory::SharedPtr<audio::drain::EndPointRead> algo = m_process.get<audio::drain::EndPointRead>(m_process.size()-1);
if (algo == nullptr) { if (algo == null) {
RIVER_ERROR("Request get buffer size for Interface that is not READ or WRITE mode ..."); RIVER_ERROR("Request get buffer size for Interface that is not READ or WRITE mode ...");
return echrono::microseconds(0); return echrono::microseconds(0);
} }
return algo->getBufferSizeMicrosecond(); return algo->getBufferSizeMicrosecond();
} }
ememory::SharedPtr<audio::drain::EndPointWrite> algo = m_process.get<audio::drain::EndPointWrite>(0); ememory::SharedPtr<audio::drain::EndPointWrite> algo = m_process.get<audio::drain::EndPointWrite>(0);
if (algo == nullptr) { if (algo == null) {
RIVER_ERROR("Request get buffer size for Interface that is not READ or WRITE mode ..."); RIVER_ERROR("Request get buffer size for Interface that is not READ or WRITE mode ...");
return echrono::microseconds(0); return echrono::microseconds(0);
} }
@ -365,14 +365,14 @@ size_t audio::river::Interface::getBufferFillSize() {
ethread::RecursiveLock lock(m_mutex); ethread::RecursiveLock lock(m_mutex);
if (m_node->isInput() == true) { if (m_node->isInput() == true) {
ememory::SharedPtr<audio::drain::EndPointRead> algo = m_process.get<audio::drain::EndPointRead>(m_process.size()-1); ememory::SharedPtr<audio::drain::EndPointRead> algo = m_process.get<audio::drain::EndPointRead>(m_process.size()-1);
if (algo == nullptr) { if (algo == null) {
RIVER_ERROR("Request get buffer size for Interface that is not READ or WRITE mode ..."); RIVER_ERROR("Request get buffer size for Interface that is not READ or WRITE mode ...");
return 0; return 0;
} }
return algo->getBufferFillSize(); return algo->getBufferFillSize();
} }
ememory::SharedPtr<audio::drain::EndPointWrite> algo = m_process.get<audio::drain::EndPointWrite>(0); ememory::SharedPtr<audio::drain::EndPointWrite> algo = m_process.get<audio::drain::EndPointWrite>(0);
if (algo == nullptr) { if (algo == null) {
RIVER_ERROR("Request get buffer size for Interface that is not READ or WRITE mode ..."); RIVER_ERROR("Request get buffer size for Interface that is not READ or WRITE mode ...");
return 0; return 0;
} }
@ -384,14 +384,14 @@ echrono::microseconds audio::river::Interface::getBufferFillSizeMicrosecond() {
ethread::RecursiveLock lock(m_mutex); ethread::RecursiveLock lock(m_mutex);
if (m_node->isInput() == true) { if (m_node->isInput() == true) {
ememory::SharedPtr<audio::drain::EndPointRead> algo = m_process.get<audio::drain::EndPointRead>(m_process.size()-1); ememory::SharedPtr<audio::drain::EndPointRead> algo = m_process.get<audio::drain::EndPointRead>(m_process.size()-1);
if (algo == nullptr) { if (algo == null) {
RIVER_ERROR("Request get buffer size for Interface that is not READ or WRITE mode ..."); RIVER_ERROR("Request get buffer size for Interface that is not READ or WRITE mode ...");
return echrono::microseconds(0); return echrono::microseconds(0);
} }
return algo->getBufferFillSizeMicrosecond(); return algo->getBufferFillSizeMicrosecond();
} }
ememory::SharedPtr<audio::drain::EndPointWrite> algo = m_process.get<audio::drain::EndPointWrite>(0); ememory::SharedPtr<audio::drain::EndPointWrite> algo = m_process.get<audio::drain::EndPointWrite>(0);
if (algo == nullptr) { if (algo == null) {
RIVER_ERROR("Request get buffer size for Interface that is not READ or WRITE mode ..."); RIVER_ERROR("Request get buffer size for Interface that is not READ or WRITE mode ...");
return echrono::microseconds(0); return echrono::microseconds(0);
} }
@ -418,7 +418,7 @@ void audio::river::Interface::addVolumeGroup(const etk::String& _name) {
ethread::RecursiveLock lock(m_mutex); ethread::RecursiveLock lock(m_mutex);
RIVER_DEBUG("addVolumeGroup(" << _name << ")"); RIVER_DEBUG("addVolumeGroup(" << _name << ")");
ememory::SharedPtr<audio::drain::Volume> algo = m_process.get<audio::drain::Volume>("volume"); ememory::SharedPtr<audio::drain::Volume> algo = m_process.get<audio::drain::Volume>("volume");
if (algo == nullptr) { if (algo == null) {
m_process.removeAlgoDynamic(); m_process.removeAlgoDynamic();
// add all time the volume stage : // add all time the volume stage :
algo = audio::drain::Volume::create(); algo = audio::drain::Volume::create();
@ -454,7 +454,7 @@ void audio::river::Interface::systemNeedOutputData(audio::Time _time, void* _dat
void audio::river::Interface::systemVolumeChange() { void audio::river::Interface::systemVolumeChange() {
ethread::RecursiveLock lockProcess(m_mutex); ethread::RecursiveLock lockProcess(m_mutex);
ememory::SharedPtr<audio::drain::Volume> algo = m_process.get<audio::drain::Volume>("volume"); ememory::SharedPtr<audio::drain::Volume> algo = m_process.get<audio::drain::Volume>("volume");
if (algo == nullptr) { if (algo == null) {
return; return;
} }
algo->volumeChange(); algo->volumeChange();

View File

@ -74,7 +74,7 @@ namespace audio {
* @param[in] _format Sample format * @param[in] _format Sample format
* @param[in] _node Low level interface to connect the flow. * @param[in] _node Low level interface to connect the flow.
* @param[in] _config Special configuration of this interface. * @param[in] _config Special configuration of this interface.
* @return nullptr The configuration does not work. * @return null The configuration does not work.
* @return pointer The interface has been corectly created. * @return pointer The interface has been corectly created.
*/ */
static ememory::SharedPtr<Interface> create(float _freq, static ememory::SharedPtr<Interface> create(float _freq,

View File

@ -18,7 +18,7 @@ ememory::SharedPtr<audio::river::Manager> audio::river::Manager::create(const et
ethread::UniqueLock lock(g_mutex); ethread::UniqueLock lock(g_mutex);
for (size_t iii=0; iii<g_listOfAllManager.size() ; ++iii) { for (size_t iii=0; iii<g_listOfAllManager.size() ; ++iii) {
ememory::SharedPtr<audio::river::Manager> tmp = g_listOfAllManager[iii].lock(); ememory::SharedPtr<audio::river::Manager> tmp = g_listOfAllManager[iii].lock();
if (tmp == nullptr) { if (tmp == null) {
continue; continue;
} }
if (tmp->m_applicationUniqueId == _applicationUniqueId) { if (tmp->m_applicationUniqueId == _applicationUniqueId) {
@ -52,7 +52,7 @@ audio::river::Manager::~Manager() {
etk::Vector<etk::String> audio::river::Manager::getListStreamInput() { etk::Vector<etk::String> audio::river::Manager::getListStreamInput() {
etk::Vector<etk::String> output; etk::Vector<etk::String> output;
ememory::SharedPtr<audio::river::io::Manager> manager = audio::river::io::Manager::getInstance(); ememory::SharedPtr<audio::river::io::Manager> manager = audio::river::io::Manager::getInstance();
if (manager == nullptr) { if (manager == null) {
RIVER_ERROR("Unable to load harware IO manager ... "); RIVER_ERROR("Unable to load harware IO manager ... ");
} else { } else {
output = manager->getListStreamInput(); output = manager->getListStreamInput();
@ -63,7 +63,7 @@ etk::Vector<etk::String> audio::river::Manager::getListStreamInput() {
etk::Vector<etk::String> audio::river::Manager::getListStreamOutput() { etk::Vector<etk::String> audio::river::Manager::getListStreamOutput() {
etk::Vector<etk::String> output; etk::Vector<etk::String> output;
ememory::SharedPtr<audio::river::io::Manager> manager = audio::river::io::Manager::getInstance(); ememory::SharedPtr<audio::river::io::Manager> manager = audio::river::io::Manager::getInstance();
if (manager == nullptr) { if (manager == null) {
RIVER_ERROR("Unable to load harware IO manager ... "); RIVER_ERROR("Unable to load harware IO manager ... ");
} else { } else {
output = manager->getListStreamOutput(); output = manager->getListStreamOutput();
@ -74,7 +74,7 @@ etk::Vector<etk::String> audio::river::Manager::getListStreamOutput() {
etk::Vector<etk::String> audio::river::Manager::getListStreamVirtual() { etk::Vector<etk::String> audio::river::Manager::getListStreamVirtual() {
etk::Vector<etk::String> output; etk::Vector<etk::String> output;
ememory::SharedPtr<audio::river::io::Manager> manager = audio::river::io::Manager::getInstance(); ememory::SharedPtr<audio::river::io::Manager> manager = audio::river::io::Manager::getInstance();
if (manager == nullptr) { if (manager == null) {
RIVER_ERROR("Unable to load harware IO manager ... "); RIVER_ERROR("Unable to load harware IO manager ... ");
} else { } else {
output = manager->getListStreamVirtual(); output = manager->getListStreamVirtual();
@ -85,7 +85,7 @@ etk::Vector<etk::String> audio::river::Manager::getListStreamVirtual() {
etk::Vector<etk::String> audio::river::Manager::getListStream() { etk::Vector<etk::String> audio::river::Manager::getListStream() {
etk::Vector<etk::String> output; etk::Vector<etk::String> output;
ememory::SharedPtr<audio::river::io::Manager> manager = audio::river::io::Manager::getInstance(); ememory::SharedPtr<audio::river::io::Manager> manager = audio::river::io::Manager::getInstance();
if (manager == nullptr) { if (manager == null) {
RIVER_ERROR("Unable to load harware IO manager ... "); RIVER_ERROR("Unable to load harware IO manager ... ");
} else { } else {
output = manager->getListStream(); output = manager->getListStream();
@ -95,7 +95,7 @@ etk::Vector<etk::String> audio::river::Manager::getListStream() {
bool audio::river::Manager::setVolume(const etk::String& _volumeName, float _valuedB) { bool audio::river::Manager::setVolume(const etk::String& _volumeName, float _valuedB) {
ememory::SharedPtr<audio::river::io::Manager> manager = audio::river::io::Manager::getInstance(); ememory::SharedPtr<audio::river::io::Manager> manager = audio::river::io::Manager::getInstance();
if (manager == nullptr) { if (manager == null) {
RIVER_ERROR("Unable to load harware IO manager ... "); RIVER_ERROR("Unable to load harware IO manager ... ");
return false; return false;
} }
@ -104,7 +104,7 @@ bool audio::river::Manager::setVolume(const etk::String& _volumeName, float _val
float audio::river::Manager::getVolume(const etk::String& _volumeName) const { float audio::river::Manager::getVolume(const etk::String& _volumeName) const {
ememory::SharedPtr<audio::river::io::Manager> manager = audio::river::io::Manager::getInstance(); ememory::SharedPtr<audio::river::io::Manager> manager = audio::river::io::Manager::getInstance();
if (manager == nullptr) { if (manager == null) {
RIVER_ERROR("Unable to load harware IO manager ... "); RIVER_ERROR("Unable to load harware IO manager ... ");
return false; return false;
} }
@ -113,7 +113,7 @@ float audio::river::Manager::getVolume(const etk::String& _volumeName) const {
etk::Pair<float,float> audio::river::Manager::getVolumeRange(const etk::String& _volumeName) const { etk::Pair<float,float> audio::river::Manager::getVolumeRange(const etk::String& _volumeName) const {
ememory::SharedPtr<audio::river::io::Manager> manager = audio::river::io::Manager::getInstance(); ememory::SharedPtr<audio::river::io::Manager> manager = audio::river::io::Manager::getInstance();
if (manager == nullptr) { if (manager == null) {
RIVER_ERROR("Unable to load harware IO manager ... "); RIVER_ERROR("Unable to load harware IO manager ... ");
return etk::makePair<float,float>(0.0f,0.0f); return etk::makePair<float,float>(0.0f,0.0f);
} }
@ -122,7 +122,7 @@ etk::Pair<float,float> audio::river::Manager::getVolumeRange(const etk::String&
void audio::river::Manager::setMute(const etk::String& _volumeName, bool _mute) { void audio::river::Manager::setMute(const etk::String& _volumeName, bool _mute) {
ememory::SharedPtr<audio::river::io::Manager> manager = audio::river::io::Manager::getInstance(); ememory::SharedPtr<audio::river::io::Manager> manager = audio::river::io::Manager::getInstance();
if (manager == nullptr) { if (manager == null) {
RIVER_ERROR("Unable to load harware IO manager ... "); RIVER_ERROR("Unable to load harware IO manager ... ");
return; return;
} }
@ -131,7 +131,7 @@ void audio::river::Manager::setMute(const etk::String& _volumeName, bool _mute)
bool audio::river::Manager::getMute(const etk::String& _volumeName) const { bool audio::river::Manager::getMute(const etk::String& _volumeName) const {
ememory::SharedPtr<audio::river::io::Manager> manager = audio::river::io::Manager::getInstance(); ememory::SharedPtr<audio::river::io::Manager> manager = audio::river::io::Manager::getInstance();
if (manager == nullptr) { if (manager == null) {
RIVER_ERROR("Unable to load harware IO manager ... "); RIVER_ERROR("Unable to load harware IO manager ... ");
return false; return false;
} }
@ -145,13 +145,13 @@ ememory::SharedPtr<audio::river::Interface> audio::river::Manager::createOutput(
const etk::String& _options) { const etk::String& _options) {
// get global hardware interface: // get global hardware interface:
ememory::SharedPtr<audio::river::io::Manager> manager = audio::river::io::Manager::getInstance(); ememory::SharedPtr<audio::river::io::Manager> manager = audio::river::io::Manager::getInstance();
if (manager == nullptr) { if (manager == null) {
RIVER_ERROR("Unable to load harware IO manager ... "); RIVER_ERROR("Unable to load harware IO manager ... ");
return ememory::SharedPtr<audio::river::Interface>(); return ememory::SharedPtr<audio::river::Interface>();
} }
// get the output or input channel : // get the output or input channel :
ememory::SharedPtr<audio::river::io::Node> node = manager->getNode(_streamName); ememory::SharedPtr<audio::river::io::Node> node = manager->getNode(_streamName);
if (node == nullptr) { if (node == null) {
RIVER_ERROR("Can not get the Requested stream '" << _streamName << "' ==> not listed in : " << manager->getListStream()); RIVER_ERROR("Can not get the Requested stream '" << _streamName << "' ==> not listed in : " << manager->getListStream());
return ememory::SharedPtr<audio::river::Interface>(); return ememory::SharedPtr<audio::river::Interface>();
} }
@ -176,13 +176,13 @@ ememory::SharedPtr<audio::river::Interface> audio::river::Manager::createInput(f
const etk::String& _options) { const etk::String& _options) {
// get global hardware interface: // get global hardware interface:
ememory::SharedPtr<audio::river::io::Manager> manager = audio::river::io::Manager::getInstance(); ememory::SharedPtr<audio::river::io::Manager> manager = audio::river::io::Manager::getInstance();
if (manager == nullptr) { if (manager == null) {
RIVER_ERROR("Unable to load harware IO manager ... "); RIVER_ERROR("Unable to load harware IO manager ... ");
return ememory::SharedPtr<audio::river::Interface>(); return ememory::SharedPtr<audio::river::Interface>();
} }
// get the output or input channel : // get the output or input channel :
ememory::SharedPtr<audio::river::io::Node> node = manager->getNode(_streamName); ememory::SharedPtr<audio::river::io::Node> node = manager->getNode(_streamName);
if (node == nullptr) { if (node == null) {
RIVER_ERROR("Can not get the Requested stream '" << _streamName << "' ==> not listed in : " << manager->getListStream()); RIVER_ERROR("Can not get the Requested stream '" << _streamName << "' ==> not listed in : " << manager->getListStream());
return ememory::SharedPtr<audio::river::Interface>(); return ememory::SharedPtr<audio::river::Interface>();
} }
@ -208,13 +208,13 @@ ememory::SharedPtr<audio::river::Interface> audio::river::Manager::createFeedbac
const etk::String& _options) { const etk::String& _options) {
// get global hardware interface: // get global hardware interface:
ememory::SharedPtr<audio::river::io::Manager> manager = audio::river::io::Manager::getInstance(); ememory::SharedPtr<audio::river::io::Manager> manager = audio::river::io::Manager::getInstance();
if (manager == nullptr) { if (manager == null) {
RIVER_ERROR("Unable to load harware IO manager ... "); RIVER_ERROR("Unable to load harware IO manager ... ");
return ememory::SharedPtr<audio::river::Interface>(); return ememory::SharedPtr<audio::river::Interface>();
} }
// get the output or input channel : // get the output or input channel :
ememory::SharedPtr<audio::river::io::Node> node = manager->getNode(_streamName); ememory::SharedPtr<audio::river::io::Node> node = manager->getNode(_streamName);
if (node == nullptr) { if (node == null) {
RIVER_ERROR("Can not get the Requested stream '" << _streamName << "' ==> not listed in : " << manager->getListStream()); RIVER_ERROR("Can not get the Requested stream '" << _streamName << "' ==> not listed in : " << manager->getListStream());
return ememory::SharedPtr<audio::river::Interface>(); return ememory::SharedPtr<audio::river::Interface>();
} }
@ -235,7 +235,7 @@ ememory::SharedPtr<audio::river::Interface> audio::river::Manager::createFeedbac
void audio::river::Manager::generateDotAll(const etk::String& _filename) { void audio::river::Manager::generateDotAll(const etk::String& _filename) {
// get global hardware interface: // get global hardware interface:
ememory::SharedPtr<audio::river::io::Manager> manager = audio::river::io::Manager::getInstance(); ememory::SharedPtr<audio::river::io::Manager> manager = audio::river::io::Manager::getInstance();
if (manager == nullptr) { if (manager == null) {
RIVER_ERROR("Can not get the harware manager"); RIVER_ERROR("Can not get the harware manager");
return; return;
} }

View File

@ -30,7 +30,7 @@ namespace audio {
/** /**
* @brief factory of the manager. Every Application will have only one maager for all his flow. this permit to manage all of it * @brief factory of the manager. Every Application will have only one maager for all his flow. this permit to manage all of it
* @param[in] _applicationUniqueId Unique name of the application * @param[in] _applicationUniqueId Unique name of the application
* @return Pointer on the manager or nullptr if an error occured * @return Pointer on the manager or null if an error occured
*/ */
static ememory::SharedPtr<audio::river::Manager> create(const etk::String& _applicationUniqueId); static ememory::SharedPtr<audio::river::Manager> create(const etk::String& _applicationUniqueId);
/** /**

View File

@ -41,18 +41,18 @@ namespace audio {
#define RIVER_SAVE_FILE_MACRO(type,fileName,dataPointer,nbElement) \ #define RIVER_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) { \
RIVER_WARNING("open file '" << fileName << "' type=" << #type); \ RIVER_WARNING("open file '" << fileName << "' type=" << #type); \
pointerOnFile = fopen(fileName,"w"); \ pointerOnFile = fopen(fileName,"w"); \
if ( errorOpen == false \ if ( errorOpen == false \
&& pointerOnFile == nullptr) { \ && pointerOnFile == null) { \
RIVER_ERROR("ERROR OPEN file ... '" << fileName << "' type=" << #type); \ RIVER_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);*/ \
} \ } \

View File

@ -48,7 +48,7 @@ void audio::river::io::Group::createFrom(const ejson::Document& _obj, const etk:
#ifdef AUDIO_RIVER_BUILD_ORCHESTRA #ifdef AUDIO_RIVER_BUILD_ORCHESTRA
ememory::SharedPtr<audio::river::io::NodeOrchestra> linkRef = ememory::dynamicPointerCast<audio::river::io::NodeOrchestra>(m_list[0]); ememory::SharedPtr<audio::river::io::NodeOrchestra> linkRef = ememory::dynamicPointerCast<audio::river::io::NodeOrchestra>(m_list[0]);
for (size_t iii=1; iii<m_list.size(); ++iii) { for (size_t iii=1; iii<m_list.size(); ++iii) {
if (m_list[iii] != nullptr) { if (m_list[iii] != null) {
ememory::SharedPtr<audio::river::io::NodeOrchestra> link = ememory::dynamicPointerCast<audio::river::io::NodeOrchestra>(m_list[iii]); ememory::SharedPtr<audio::river::io::NodeOrchestra> link = ememory::dynamicPointerCast<audio::river::io::NodeOrchestra>(m_list[iii]);
linkRef->m_interface.isMasterOf(link->m_interface); linkRef->m_interface.isMasterOf(link->m_interface);
} }
@ -57,10 +57,10 @@ void audio::river::io::Group::createFrom(const ejson::Document& _obj, const etk:
} }
/* /*
// manage Link Between Nodes : // manage Link Between Nodes :
if (m_link != nullptr) { if (m_link != null) {
RIVER_INFO("******** START LINK ************"); RIVER_INFO("******** START LINK ************");
ememory::SharedPtr<audio::river::io::NodeOrchestra> link = ememory::dynamicPointerCast<audio::river::io::NodeOrchestra>(m_link); ememory::SharedPtr<audio::river::io::NodeOrchestra> link = ememory::dynamicPointerCast<audio::river::io::NodeOrchestra>(m_link);
if (link == nullptr) { if (link == null) {
RIVER_ERROR("Can not link 2 Interface with not the same type (reserved for HW interface)"); RIVER_ERROR("Can not link 2 Interface with not the same type (reserved for HW interface)");
return; return;
} }
@ -72,7 +72,7 @@ void audio::river::io::Group::createFrom(const ejson::Document& _obj, const etk:
RIVER_INFO("Create Group[" << _name << "] ( END ) ___________________________"); RIVER_INFO("Create Group[" << _name << "] ( END ) ___________________________");
RIVER_INFO("Group[" << _name << "] List elements : "); RIVER_INFO("Group[" << _name << "] List elements : ");
for (size_t iii=0; iii<m_list.size(); ++iii) { for (size_t iii=0; iii<m_list.size(); ++iii) {
if (m_list[iii] != nullptr) { if (m_list[iii] != null) {
RIVER_INFO(" " << m_list[iii]->getName()); RIVER_INFO(" " << m_list[iii]->getName());
} }
} }
@ -81,7 +81,7 @@ void audio::river::io::Group::createFrom(const ejson::Document& _obj, const etk:
ememory::SharedPtr<audio::river::io::Node> audio::river::io::Group::getNode(const etk::String& _name) { ememory::SharedPtr<audio::river::io::Node> audio::river::io::Group::getNode(const etk::String& _name) {
for (size_t iii=0; iii<m_list.size(); ++iii) { for (size_t iii=0; iii<m_list.size(); ++iii) {
if (m_list[iii] != nullptr) { if (m_list[iii] != null) {
if (m_list[iii]->getName() == _name) { if (m_list[iii]->getName() == _name) {
return m_list[iii]; return m_list[iii];
} }
@ -94,7 +94,7 @@ void audio::river::io::Group::start() {
RIVER_ERROR("request start "); RIVER_ERROR("request start ");
int32_t count = 0; int32_t count = 0;
for (size_t iii=0; iii<m_list.size(); ++iii) { for (size_t iii=0; iii<m_list.size(); ++iii) {
if (m_list[iii] != nullptr) { if (m_list[iii] != null) {
count += m_list[iii]->getNumberOfInterface(); count += m_list[iii]->getNumberOfInterface();
} }
} }
@ -102,7 +102,7 @@ void audio::river::io::Group::start() {
if (count == 1) { if (count == 1) {
RIVER_ERROR("GROUP :::::::::::: START() [START]"); RIVER_ERROR("GROUP :::::::::::: START() [START]");
for (size_t iii=0; iii<m_list.size(); ++iii) { for (size_t iii=0; iii<m_list.size(); ++iii) {
if (m_list[iii] != nullptr) { if (m_list[iii] != null) {
m_list[iii]->start(); m_list[iii]->start();
} }
} }
@ -114,7 +114,7 @@ void audio::river::io::Group::stop() {
RIVER_ERROR("request stop "); RIVER_ERROR("request stop ");
int32_t count = 0; int32_t count = 0;
for (size_t iii=0; iii<m_list.size(); ++iii) { for (size_t iii=0; iii<m_list.size(); ++iii) {
if (m_list[iii] != nullptr) { if (m_list[iii] != null) {
count += m_list[iii]->getNumberOfInterface(); count += m_list[iii]->getNumberOfInterface();
} }
} }
@ -122,7 +122,7 @@ void audio::river::io::Group::stop() {
if (count == 0) { if (count == 0) {
RIVER_ERROR("GROUP :::::::::::: STOP() [START]"); RIVER_ERROR("GROUP :::::::::::: STOP() [START]");
for (int32_t iii=m_list.size()-1; iii>=0; --iii) { for (int32_t iii=m_list.size()-1; iii>=0; --iii) {
if (m_list[iii] != nullptr) { if (m_list[iii] != null) {
m_list[iii]->stop(); m_list[iii]->stop();
} }
} }
@ -132,7 +132,7 @@ void audio::river::io::Group::stop() {
void audio::river::io::Group::generateDot(etk::FSNode& _node, bool _hardwareNode) { void audio::river::io::Group::generateDot(etk::FSNode& _node, bool _hardwareNode) {
for (size_t iii=0; iii<m_list.size(); ++iii) { for (size_t iii=0; iii<m_list.size(); ++iii) {
if (m_list[iii] != nullptr) { if (m_list[iii] != null) {
if (m_list[iii]->isHarwareNode() == _hardwareNode) { if (m_list[iii]->isHarwareNode() == _hardwareNode) {
m_list[iii]->generateDot(_node); m_list[iii]->generateDot(_node);
} }

View File

@ -45,7 +45,7 @@ namespace audio {
/** /**
* @brief Get a node in the group (if the node is not in the group nothing append). * @brief Get a node in the group (if the node is not in the group nothing append).
* @param[in] _name Name of the node requested. * @param[in] _name Name of the node requested.
* @return nullptr The node named _name was not found. * @return null The node named _name was not found.
* @return pointer The node was find in this group. * @return pointer The node was find in this group.
*/ */
ememory::SharedPtr<audio::river::io::Node> getNode(const etk::String& _name); ememory::SharedPtr<audio::river::io::Node> getNode(const etk::String& _name);

View File

@ -186,7 +186,7 @@ ememory::SharedPtr<audio::river::io::Node> audio::river::io::Manager::getNode(co
// search in the standalone list : // search in the standalone list :
for (size_t iii=0; iii<m_list.size(); ++iii) { for (size_t iii=0; iii<m_list.size(); ++iii) {
ememory::SharedPtr<audio::river::io::Node> tmppp = m_list[iii].lock(); ememory::SharedPtr<audio::river::io::Node> tmppp = m_list[iii].lock();
if ( tmppp != nullptr if ( tmppp != null
&& _name == tmppp->getName()) { && _name == tmppp->getName()) {
RIVER_WARNING(" find it ... in standalone"); RIVER_WARNING(" find it ... in standalone");
return tmppp; return tmppp;
@ -197,9 +197,9 @@ ememory::SharedPtr<audio::river::io::Node> audio::river::io::Manager::getNode(co
for (etk::Map<etk::String, ememory::SharedPtr<audio::river::io::Group> >::Iterator it(m_listGroup.begin()); for (etk::Map<etk::String, ememory::SharedPtr<audio::river::io::Group> >::Iterator it(m_listGroup.begin());
it != m_listGroup.end(); it != m_listGroup.end();
++it) { ++it) {
if (it->second != nullptr) { if (it->second != null) {
ememory::SharedPtr<audio::river::io::Node> node = it->second->getNode(_name); ememory::SharedPtr<audio::river::io::Node> node = it->second->getNode(_name);
if (node != nullptr) { if (node != null) {
RIVER_WARNING(" find it ... in group: " << it->first); RIVER_WARNING(" find it ... in group: " << it->first);
return node; return node;
} }
@ -220,7 +220,7 @@ ememory::SharedPtr<audio::river::io::Node> audio::river::io::Manager::getNode(co
|| ioType == "PAinput" || ioType == "PAinput"
|| ioType == "PAoutput") ) { || ioType == "PAoutput") ) {
ememory::SharedPtr<audio::river::io::Group> tmpGroup = getGroup(groupName); ememory::SharedPtr<audio::river::io::Group> tmpGroup = getGroup(groupName);
if (tmpGroup == nullptr) { if (tmpGroup == null) {
RIVER_WARNING("Can not get group ... '" << groupName << "'"); RIVER_WARNING("Can not get group ... '" << groupName << "'");
return ememory::SharedPtr<audio::river::io::Node>(); return ememory::SharedPtr<audio::river::io::Node>();
} }
@ -274,7 +274,7 @@ ememory::SharedPtr<audio::drain::VolumeElement> audio::river::io::Manager::getVo
return ememory::SharedPtr<audio::drain::VolumeElement>(); return ememory::SharedPtr<audio::drain::VolumeElement>();
} }
for (size_t iii=0; iii<m_volumeGroup.size(); ++iii) { for (size_t iii=0; iii<m_volumeGroup.size(); ++iii) {
if (m_volumeGroup[iii] == nullptr) { if (m_volumeGroup[iii] == null) {
continue; continue;
} }
if (m_volumeGroup[iii]->getName() == _name) { if (m_volumeGroup[iii]->getName() == _name) {
@ -290,7 +290,7 @@ ememory::SharedPtr<audio::drain::VolumeElement> audio::river::io::Manager::getVo
bool audio::river::io::Manager::setVolume(const etk::String& _volumeName, float _valuedB) { bool audio::river::io::Manager::setVolume(const etk::String& _volumeName, float _valuedB) {
ethread::RecursiveLock lock(m_mutex); ethread::RecursiveLock lock(m_mutex);
ememory::SharedPtr<audio::drain::VolumeElement> volume = getVolumeGroup(_volumeName); ememory::SharedPtr<audio::drain::VolumeElement> volume = getVolumeGroup(_volumeName);
if (volume == nullptr) { if (volume == null) {
RIVER_ERROR("Can not set volume ... : '" << _volumeName << "'"); RIVER_ERROR("Can not set volume ... : '" << _volumeName << "'");
return false; return false;
} }
@ -302,7 +302,7 @@ bool audio::river::io::Manager::setVolume(const etk::String& _volumeName, float
volume->setVolume(_valuedB); volume->setVolume(_valuedB);
for (size_t iii=0; iii<m_list.size(); ++iii) { for (size_t iii=0; iii<m_list.size(); ++iii) {
ememory::SharedPtr<audio::river::io::Node> val = m_list[iii].lock(); ememory::SharedPtr<audio::river::io::Node> val = m_list[iii].lock();
if (val != nullptr) { if (val != null) {
val->volumeChange(); val->volumeChange();
} }
} }
@ -312,7 +312,7 @@ bool audio::river::io::Manager::setVolume(const etk::String& _volumeName, float
float audio::river::io::Manager::getVolume(const etk::String& _volumeName) { float audio::river::io::Manager::getVolume(const etk::String& _volumeName) {
ethread::RecursiveLock lock(m_mutex); ethread::RecursiveLock lock(m_mutex);
ememory::SharedPtr<audio::drain::VolumeElement> volume = getVolumeGroup(_volumeName); ememory::SharedPtr<audio::drain::VolumeElement> volume = getVolumeGroup(_volumeName);
if (volume == nullptr) { if (volume == null) {
RIVER_ERROR("Can not get volume ... : '" << _volumeName << "'"); RIVER_ERROR("Can not get volume ... : '" << _volumeName << "'");
return 0.0f; return 0.0f;
} }
@ -326,14 +326,14 @@ etk::Pair<float,float> audio::river::io::Manager::getVolumeRange(const etk::Stri
void audio::river::io::Manager::setMute(const etk::String& _volumeName, bool _mute) { void audio::river::io::Manager::setMute(const etk::String& _volumeName, bool _mute) {
ethread::RecursiveLock lock(m_mutex); ethread::RecursiveLock lock(m_mutex);
ememory::SharedPtr<audio::drain::VolumeElement> volume = getVolumeGroup(_volumeName); ememory::SharedPtr<audio::drain::VolumeElement> volume = getVolumeGroup(_volumeName);
if (volume == nullptr) { if (volume == null) {
RIVER_ERROR("Can not set volume ... : '" << _volumeName << "'"); RIVER_ERROR("Can not set volume ... : '" << _volumeName << "'");
return; return;
} }
volume->setMute(_mute); volume->setMute(_mute);
for (size_t iii=0; iii<m_list.size(); ++iii) { for (size_t iii=0; iii<m_list.size(); ++iii) {
ememory::SharedPtr<audio::river::io::Node> val = m_list[iii].lock(); ememory::SharedPtr<audio::river::io::Node> val = m_list[iii].lock();
if (val != nullptr) { if (val != null) {
val->volumeChange(); val->volumeChange();
} }
} }
@ -342,7 +342,7 @@ void audio::river::io::Manager::setMute(const etk::String& _volumeName, bool _mu
bool audio::river::io::Manager::getMute(const etk::String& _volumeName) { bool audio::river::io::Manager::getMute(const etk::String& _volumeName) {
ethread::RecursiveLock lock(m_mutex); ethread::RecursiveLock lock(m_mutex);
ememory::SharedPtr<audio::drain::VolumeElement> volume = getVolumeGroup(_volumeName); ememory::SharedPtr<audio::drain::VolumeElement> volume = getVolumeGroup(_volumeName);
if (volume == nullptr) { if (volume == null) {
RIVER_ERROR("Can not get volume ... : '" << _volumeName << "'"); RIVER_ERROR("Can not get volume ... : '" << _volumeName << "'");
return false; return false;
} }
@ -364,7 +364,7 @@ void audio::river::io::Manager::generateDot(const etk::String& _filename) {
// standalone // standalone
for (size_t iii=0; iii<m_list.size(); ++iii) { for (size_t iii=0; iii<m_list.size(); ++iii) {
ememory::SharedPtr<audio::river::io::Node> val = m_list[iii].lock(); ememory::SharedPtr<audio::river::io::Node> val = m_list[iii].lock();
if (val != nullptr) { if (val != null) {
if (val->isHarwareNode() == true) { if (val->isHarwareNode() == true) {
val->generateDot(node); val->generateDot(node);
} }
@ -373,7 +373,7 @@ void audio::river::io::Manager::generateDot(const etk::String& _filename) {
for (etk::Map<etk::String, ememory::SharedPtr<audio::river::io::Group> >::Iterator it(m_listGroup.begin()); for (etk::Map<etk::String, ememory::SharedPtr<audio::river::io::Group> >::Iterator it(m_listGroup.begin());
it != m_listGroup.end(); it != m_listGroup.end();
++it) { ++it) {
if (it->second != nullptr) { if (it->second != null) {
it->second->generateDot(node, true); it->second->generateDot(node, true);
} }
} }
@ -383,7 +383,7 @@ void audio::river::io::Manager::generateDot(const etk::String& _filename) {
// standalone // standalone
for (size_t iii=0; iii<m_list.size(); ++iii) { for (size_t iii=0; iii<m_list.size(); ++iii) {
ememory::SharedPtr<audio::river::io::Node> val = m_list[iii].lock(); ememory::SharedPtr<audio::river::io::Node> val = m_list[iii].lock();
if (val != nullptr) { if (val != null) {
if (val->isHarwareNode() == false) { if (val->isHarwareNode() == false) {
val->generateDot(node); val->generateDot(node);
} }
@ -392,7 +392,7 @@ void audio::river::io::Manager::generateDot(const etk::String& _filename) {
for (etk::Map<etk::String, ememory::SharedPtr<audio::river::io::Group> >::Iterator it(m_listGroup.begin()); for (etk::Map<etk::String, ememory::SharedPtr<audio::river::io::Group> >::Iterator it(m_listGroup.begin());
it != m_listGroup.end(); it != m_listGroup.end();
++it) { ++it) {
if (it->second != nullptr) { if (it->second != null) {
it->second->generateDot(node, false); it->second->generateDot(node, false);
} }
} }
@ -410,7 +410,7 @@ ememory::SharedPtr<audio::river::io::Group> audio::river::io::Manager::getGroup(
if (it == m_listGroup.end()) { if (it == m_listGroup.end()) {
RIVER_INFO("Create a new group: " << _name << " (START)"); RIVER_INFO("Create a new group: " << _name << " (START)");
out = ememory::makeShared<audio::river::io::Group>(); out = ememory::makeShared<audio::river::io::Group>();
if (out != nullptr) { if (out != null) {
out->createFrom(m_config, _name); out->createFrom(m_config, _name);
m_listGroup.add(_name, out); m_listGroup.add(_name, out);
RIVER_INFO("Create a new group: " << _name << " ( END )"); RIVER_INFO("Create a new group: " << _name << " ( END )");

View File

@ -62,7 +62,7 @@ namespace audio {
/** /**
* @brief Get a node with his name (the name is set in the description file. * @brief Get a node with his name (the name is set in the description file.
* @param[in] _name Name of the node * @param[in] _name Name of the node
* @return Pointer on the noe or a nullptr if the node does not exist in the file or an error occured. * @return Pointer on the noe or a null if the node does not exist in the file or an error occured.
*/ */
ememory::SharedPtr<audio::river::io::Node> getNode(const etk::String& _name); ememory::SharedPtr<audio::river::io::Node> getNode(const etk::String& _name);
private: private:
@ -71,7 +71,7 @@ namespace audio {
/** /**
* @brief Get a volume in the global list of vilume * @brief Get a volume in the global list of vilume
* @param[in] _name Name of the volume. * @param[in] _name Name of the volume.
* @return pointer on the requested volume (create it if does not exist). nullptr if the name is empty. * @return pointer on the requested volume (create it if does not exist). null if the name is empty.
*/ */
ememory::SharedPtr<audio::drain::VolumeElement> getVolumeGroup(const etk::String& _name); ememory::SharedPtr<audio::drain::VolumeElement> getVolumeGroup(const etk::String& _name);
/** /**
@ -140,7 +140,7 @@ namespace audio {
/** /**
* @brief get a low level interface group. * @brief get a low level interface group.
* @param[in] _name Name of the group. * @param[in] _name Name of the group.
* @return Pointer on the requested group or nullptr if the group does not existed. * @return Pointer on the requested group or null if the group does not existed.
*/ */
ememory::SharedPtr<audio::river::io::Group> getGroup(const etk::String& _name); ememory::SharedPtr<audio::river::io::Group> getGroup(const etk::String& _name);

View File

@ -110,7 +110,7 @@ audio::river::io::Node::~Node() {
size_t audio::river::io::Node::getNumberOfInterface(enum audio::river::modeInterface _interfaceType) { size_t audio::river::io::Node::getNumberOfInterface(enum audio::river::modeInterface _interfaceType) {
size_t out = 0; size_t out = 0;
for (size_t iii=0; iii<m_list.size(); ++iii) { for (size_t iii=0; iii<m_list.size(); ++iii) {
if (m_list[iii] == nullptr) { if (m_list[iii] == null) {
continue; continue;
} }
if (m_list[iii]->getMode() == _interfaceType) { if (m_list[iii]->getMode() == _interfaceType) {
@ -123,7 +123,7 @@ size_t audio::river::io::Node::getNumberOfInterfaceAvaillable(enum audio::river:
size_t out = 0; size_t out = 0;
for (size_t iii=0; iii<m_listAvaillable.size(); ++iii) { for (size_t iii=0; iii<m_listAvaillable.size(); ++iii) {
auto element = m_listAvaillable[iii].lock(); auto element = m_listAvaillable[iii].lock();
if (element == nullptr) { if (element == null) {
continue; continue;
} }
if (element->getMode() == _interfaceType) { if (element->getMode() == _interfaceType) {
@ -181,7 +181,7 @@ void audio::river::io::Node::interfaceRemove(const ememory::SharedPtr<audio::riv
void audio::river::io::Node::volumeChange() { void audio::river::io::Node::volumeChange() {
for (size_t iii=0; iii< m_listAvaillable.size(); ++iii) { for (size_t iii=0; iii< m_listAvaillable.size(); ++iii) {
auto node = m_listAvaillable[iii].lock(); auto node = m_listAvaillable[iii].lock();
if (node != nullptr) { if (node != null) {
node->systemVolumeChange(); node->systemVolumeChange();
} }
} }
@ -190,11 +190,11 @@ void audio::river::io::Node::volumeChange() {
void audio::river::io::Node::newInput(const void* _inputBuffer, void audio::river::io::Node::newInput(const void* _inputBuffer,
uint32_t _nbChunk, uint32_t _nbChunk,
const audio::Time& _time) { const audio::Time& _time) {
if (_inputBuffer == nullptr) { if (_inputBuffer == null) {
return; return;
} }
for (size_t iii=0; iii< m_list.size(); ++iii) { for (size_t iii=0; iii< m_list.size(); ++iii) {
if (m_list[iii] == nullptr) { if (m_list[iii] == null) {
continue; continue;
} }
if (m_list[iii]->getMode() != audio::river::modeInterface_input) { if (m_list[iii]->getMode() != audio::river::modeInterface_input) {
@ -210,7 +210,7 @@ void audio::river::io::Node::newInput(const void* _inputBuffer,
void audio::river::io::Node::newOutput(void* _outputBuffer, void audio::river::io::Node::newOutput(void* _outputBuffer,
uint32_t _nbChunk, uint32_t _nbChunk,
const audio::Time& _time) { const audio::Time& _time) {
if (_outputBuffer == nullptr) { if (_outputBuffer == null) {
return; return;
} }
enum audio::format muxerFormatType = m_process.getInputConfig().getFormat(); enum audio::format muxerFormatType = m_process.getInputConfig().getFormat();
@ -228,9 +228,9 @@ void audio::river::io::Node::newOutput(void* _outputBuffer,
RIVER_VERBOSE("resize=" << _nbChunk*m_process.getInputConfig().getMap().size()); RIVER_VERBOSE("resize=" << _nbChunk*m_process.getInputConfig().getMap().size());
output.resize(_nbChunk*m_process.getInputConfig().getMap().size(), 0); output.resize(_nbChunk*m_process.getInputConfig().getMap().size(), 0);
// $$$$ change the int16 // $$$$ change the int16
const int16_t* outputTmp = nullptr; const int16_t* outputTmp = null;
for (size_t iii=0; iii< m_list.size(); ++iii) { for (size_t iii=0; iii< m_list.size(); ++iii) {
if (m_list[iii] == nullptr) { if (m_list[iii] == null) {
continue; continue;
} }
if (m_list[iii]->getMode() != audio::river::modeInterface_output) { if (m_list[iii]->getMode() != audio::river::modeInterface_output) {
@ -260,9 +260,9 @@ void audio::river::io::Node::newOutput(void* _outputBuffer,
etk::Vector<int32_t> output; etk::Vector<int32_t> output;
RIVER_VERBOSE("resize=" << _nbChunk*m_process.getInputConfig().getMap().size()); RIVER_VERBOSE("resize=" << _nbChunk*m_process.getInputConfig().getMap().size());
output.resize(_nbChunk*m_process.getInputConfig().getMap().size(), 0); output.resize(_nbChunk*m_process.getInputConfig().getMap().size(), 0);
const int32_t* outputTmp = nullptr; const int32_t* outputTmp = null;
for (size_t iii=0; iii< m_list.size(); ++iii) { for (size_t iii=0; iii< m_list.size(); ++iii) {
if (m_list[iii] == nullptr) { if (m_list[iii] == null) {
continue; continue;
} }
if (m_list[iii]->getMode() != audio::river::modeInterface_output) { if (m_list[iii]->getMode() != audio::river::modeInterface_output) {
@ -290,9 +290,9 @@ void audio::river::io::Node::newOutput(void* _outputBuffer,
etk::Vector<int64_t> output; etk::Vector<int64_t> output;
RIVER_VERBOSE("resize=" << _nbChunk*m_process.getInputConfig().getMap().size()); RIVER_VERBOSE("resize=" << _nbChunk*m_process.getInputConfig().getMap().size());
output.resize(_nbChunk*m_process.getInputConfig().getMap().size(), 0); output.resize(_nbChunk*m_process.getInputConfig().getMap().size(), 0);
const int64_t* outputTmp = nullptr; const int64_t* outputTmp = null;
for (size_t iii=0; iii< m_list.size(); ++iii) { for (size_t iii=0; iii< m_list.size(); ++iii) {
if (m_list[iii] == nullptr) { if (m_list[iii] == null) {
continue; continue;
} }
if (m_list[iii]->getMode() != audio::river::modeInterface_output) { if (m_list[iii]->getMode() != audio::river::modeInterface_output) {
@ -320,9 +320,9 @@ void audio::river::io::Node::newOutput(void* _outputBuffer,
etk::Vector<float> output; etk::Vector<float> output;
RIVER_VERBOSE("resize=" << _nbChunk*m_process.getInputConfig().getMap().size()); RIVER_VERBOSE("resize=" << _nbChunk*m_process.getInputConfig().getMap().size());
output.resize(_nbChunk*m_process.getInputConfig().getMap().size(), 0); output.resize(_nbChunk*m_process.getInputConfig().getMap().size(), 0);
const float* outputTmp = nullptr; const float* outputTmp = null;
for (size_t iii=0; iii< m_list.size(); ++iii) { for (size_t iii=0; iii< m_list.size(); ++iii) {
if (m_list[iii] == nullptr) { if (m_list[iii] == null) {
continue; continue;
} }
if (m_list[iii]->getMode() != audio::river::modeInterface_output) { if (m_list[iii]->getMode() != audio::river::modeInterface_output) {
@ -349,9 +349,9 @@ void audio::river::io::Node::newOutput(void* _outputBuffer,
etk::Vector<double> output; etk::Vector<double> output;
RIVER_VERBOSE("resize=" << _nbChunk*m_process.getInputConfig().getMap().size()); RIVER_VERBOSE("resize=" << _nbChunk*m_process.getInputConfig().getMap().size());
output.resize(_nbChunk*m_process.getInputConfig().getMap().size(), 0); output.resize(_nbChunk*m_process.getInputConfig().getMap().size(), 0);
const double* outputTmp = nullptr; const double* outputTmp = null;
for (size_t iii=0; iii< m_list.size(); ++iii) { for (size_t iii=0; iii< m_list.size(); ++iii) {
if (m_list[iii] == nullptr) { if (m_list[iii] == null) {
continue; continue;
} }
if (m_list[iii]->getMode() != audio::river::modeInterface_output) { if (m_list[iii]->getMode() != audio::river::modeInterface_output) {
@ -378,7 +378,7 @@ void audio::river::io::Node::newOutput(void* _outputBuffer,
// The feedback get the real output data (after processing ...==> then no nneed to specify for each channels // The feedback get the real output data (after processing ...==> then no nneed to specify for each channels
RIVER_VERBOSE(" Feedback :"); RIVER_VERBOSE(" Feedback :");
for (size_t iii=0; iii< m_list.size(); ++iii) { for (size_t iii=0; iii< m_list.size(); ++iii) {
if (m_list[iii] == nullptr) { if (m_list[iii] == null) {
continue; continue;
} }
if (m_list[iii]->getMode() != audio::river::modeInterface_feedback) { if (m_list[iii]->getMode() != audio::river::modeInterface_feedback) {
@ -454,7 +454,7 @@ void audio::river::io::Node::generateDot(etk::FSNode& _node) {
continue; continue;
} }
ememory::SharedPtr<audio::river::Interface> element = m_listAvaillable[iii].lock(); ememory::SharedPtr<audio::river::Interface> element = m_listAvaillable[iii].lock();
if (element == nullptr) { if (element == null) {
continue; continue;
} }
bool isLink = false; bool isLink = false;
@ -463,7 +463,7 @@ void audio::river::io::Node::generateDot(etk::FSNode& _node) {
isLink = true; isLink = true;
} }
} }
if (element != nullptr) { if (element != null) {
if (element->getMode() == modeInterface_input) { if (element->getMode() == modeInterface_input) {
element->generateDot(_node, "NODE_" + etk::toString(m_uid) + "_demuxer", isLink); element->generateDot(_node, "NODE_" + etk::toString(m_uid) + "_demuxer", isLink);
} else if (element->getMode() == modeInterface_output) { } else if (element->getMode() == modeInterface_output) {
@ -480,7 +480,7 @@ void audio::river::io::Node::generateDot(etk::FSNode& _node) {
void audio::river::io::Node::startInGroup() { void audio::river::io::Node::startInGroup() {
ememory::SharedPtr<audio::river::io::Group> group = m_group.lock(); ememory::SharedPtr<audio::river::io::Group> group = m_group.lock();
if (group != nullptr) { if (group != null) {
group->start(); group->start();
} else { } else {
start(); start();
@ -489,7 +489,7 @@ void audio::river::io::Node::startInGroup() {
void audio::river::io::Node::stopInGroup() { void audio::river::io::Node::stopInGroup() {
ememory::SharedPtr<audio::river::io::Group> group = m_group.lock(); ememory::SharedPtr<audio::river::io::Group> group = m_group.lock();
if (group != nullptr) { if (group != null) {
group->stop(); group->stop();
} else { } else {
stop(); stop();

View File

@ -42,7 +42,7 @@ ememory::SharedPtr<audio::river::Interface> audio::river::io::NodeAEC::createInp
// create user iterface: // create user iterface:
ememory::SharedPtr<audio::river::Interface> interface; ememory::SharedPtr<audio::river::Interface> interface;
interface = audio::river::Interface::create(_freq, _map, _format, node, tmppp); interface = audio::river::Interface::create(_freq, _map, _format, node, tmppp);
if (interface != nullptr) { if (interface != null) {
interface->setName(_name); interface->setName(_name);
} }
return interface; return interface;
@ -87,7 +87,7 @@ audio::river::io::NodeAEC::NodeAEC(const etk::String& _name, const ejson::Object
hardwareFormat.getFormat(), hardwareFormat.getFormat(),
"map-on-feedback", "map-on-feedback",
_name + "-AEC-feedback"); _name + "-AEC-feedback");
if (m_interfaceFeedBack == nullptr) { if (m_interfaceFeedBack == null) {
RIVER_ERROR("Can not opne virtual device ... map-on-feedback in " << _name); RIVER_ERROR("Can not opne virtual device ... map-on-feedback in " << _name);
return; return;
} }
@ -97,7 +97,7 @@ audio::river::io::NodeAEC::NodeAEC(const etk::String& _name, const ejson::Object
hardwareFormat.getFormat(), hardwareFormat.getFormat(),
"map-on-microphone", "map-on-microphone",
_name + "-AEC-microphone"); _name + "-AEC-microphone");
if (m_interfaceMicrophone == nullptr) { if (m_interfaceMicrophone == null) {
RIVER_ERROR("Can not opne virtual device ... map-on-microphone in " << _name); RIVER_ERROR("Can not opne virtual device ... map-on-microphone in " << _name);
return; return;
} }
@ -140,11 +140,11 @@ audio::river::io::NodeAEC::~NodeAEC() {
void audio::river::io::NodeAEC::start() { void audio::river::io::NodeAEC::start() {
ethread::UniqueLock lock(m_mutex); ethread::UniqueLock lock(m_mutex);
RIVER_INFO("Start stream : '" << m_name << "' mode=" << (m_isInput?"input":"output") ); RIVER_INFO("Start stream : '" << m_name << "' mode=" << (m_isInput?"input":"output") );
if (m_interfaceFeedBack != nullptr) { if (m_interfaceFeedBack != null) {
RIVER_INFO("Start FEEDBACK : "); RIVER_INFO("Start FEEDBACK : ");
m_interfaceFeedBack->start(); m_interfaceFeedBack->start();
} }
if (m_interfaceMicrophone != nullptr) { if (m_interfaceMicrophone != null) {
RIVER_INFO("Start Microphone : "); RIVER_INFO("Start Microphone : ");
m_interfaceMicrophone->start(); m_interfaceMicrophone->start();
} }
@ -152,10 +152,10 @@ void audio::river::io::NodeAEC::start() {
void audio::river::io::NodeAEC::stop() { void audio::river::io::NodeAEC::stop() {
ethread::UniqueLock lock(m_mutex); ethread::UniqueLock lock(m_mutex);
if (m_interfaceFeedBack != nullptr) { if (m_interfaceFeedBack != null) {
m_interfaceFeedBack->stop(); m_interfaceFeedBack->stop();
} }
if (m_interfaceMicrophone != nullptr) { if (m_interfaceMicrophone != null) {
m_interfaceMicrophone->stop(); m_interfaceMicrophone->stop();
} }
} }
@ -330,10 +330,10 @@ void audio::river::io::NodeAEC::generateDot(etk::FSNode& _node) {
_node << " NODE_" << m_uid << "_HW_AEC -> " << nameIn << ";\n"; _node << " NODE_" << m_uid << "_HW_AEC -> " << nameIn << ";\n";
_node << " " << nameOut << " -> NODE_" << m_uid << "_demuxer;\n"; _node << " " << nameOut << " -> NODE_" << m_uid << "_demuxer;\n";
_node << " }\n"; _node << " }\n";
if (m_interfaceMicrophone != nullptr) { if (m_interfaceMicrophone != null) {
_node << " " << m_interfaceMicrophone->getDotNodeName() << " -> NODE_" << m_uid << "_HW_AEC;\n"; _node << " " << m_interfaceMicrophone->getDotNodeName() << " -> NODE_" << m_uid << "_HW_AEC;\n";
} }
if (m_interfaceFeedBack != nullptr) { if (m_interfaceFeedBack != null) {
_node << " " << m_interfaceFeedBack->getDotNodeName() << " -> NODE_" << m_uid << "_HW_AEC;\n"; _node << " " << m_interfaceFeedBack->getDotNodeName() << " -> NODE_" << m_uid << "_HW_AEC;\n";
} }
_node << " \n"; _node << " \n";
@ -343,7 +343,7 @@ void audio::river::io::NodeAEC::generateDot(etk::FSNode& _node) {
continue; continue;
} }
ememory::SharedPtr<audio::river::Interface> element = m_listAvaillable[iii].lock(); ememory::SharedPtr<audio::river::Interface> element = m_listAvaillable[iii].lock();
if (element == nullptr) { if (element == null) {
continue; continue;
} }
bool isLink = false; bool isLink = false;
@ -352,7 +352,7 @@ void audio::river::io::NodeAEC::generateDot(etk::FSNode& _node) {
isLink = true; isLink = true;
} }
} }
if (element != nullptr) { if (element != null) {
if (element->getMode() == modeInterface_input) { if (element->getMode() == modeInterface_input) {
element->generateDot(_node, "NODE_" + etk::toString(m_uid) + "_demuxer", isLink); element->generateDot(_node, "NODE_" + etk::toString(m_uid) + "_demuxer", isLink);
} else if (element->getMode() == modeInterface_output) { } else if (element->getMode() == modeInterface_output) {

View File

@ -197,7 +197,7 @@ audio::river::io::NodeFile::NodeFile(const etk::String& _name, const ejson::Obje
if (m_isInput == true) { if (m_isInput == true) {
m_process.setInputConfig(hardwareFormat); m_process.setInputConfig(hardwareFormat);
m_process.setOutputConfig(interfaceFormat); m_process.setOutputConfig(interfaceFormat);
err = m_interface.openStream(nullptr, err = m_interface.openStream(null,
&params, &params,
hardwareFormat.getFormat(), hardwareFormat.getFormat(),
hardwareFormat.getFrequency(), hardwareFormat.getFrequency(),
@ -217,7 +217,7 @@ audio::river::io::NodeFile::NodeFile(const etk::String& _name, const ejson::Obje
m_process.setInputConfig(interfaceFormat); m_process.setInputConfig(interfaceFormat);
m_process.setOutputConfig(hardwareFormat); m_process.setOutputConfig(hardwareFormat);
err = m_interface.openStream(&params, err = m_interface.openStream(&params,
nullptr, null,
hardwareFormat.getFormat(), hardwareFormat.getFormat(),
hardwareFormat.getFrequency(), hardwareFormat.getFrequency(),
&m_rtaudioFrameSize, &m_rtaudioFrameSize,
@ -259,7 +259,7 @@ void audio::river::io::NodeFile::threadCallback() {
void audio::river::io::NodeFile::start() { void audio::river::io::NodeFile::start() {
ethread::UniqueLock lock(m_mutex); ethread::UniqueLock lock(m_mutex);
if (m_thread != nullptr) { if (m_thread != null) {
RIVER_ERROR("Start stream : '" << m_name << "' mode=" << (m_isInput?"read":"write") << " ==> already started ..." ); RIVER_ERROR("Start stream : '" << m_name << "' mode=" << (m_isInput?"read":"write") << " ==> already started ..." );
return; return;
} }

View File

@ -42,7 +42,7 @@ ememory::SharedPtr<audio::river::Interface> audio::river::io::NodeMuxer::createI
// create user iterface: // create user iterface:
ememory::SharedPtr<audio::river::Interface> interface; ememory::SharedPtr<audio::river::Interface> interface;
interface = audio::river::Interface::create(_freq, _map, _format, node, tmppp); interface = audio::river::Interface::create(_freq, _map, _format, node, tmppp);
if (interface != nullptr) { if (interface != null) {
interface->setName(_name); interface->setName(_name);
} }
return interface; return interface;
@ -81,7 +81,7 @@ audio::river::io::NodeMuxer::NodeMuxer(const etk::String& _name, const ejson::Ob
hardwareFormat.getFormat(), hardwareFormat.getFormat(),
"map-on-input-1", "map-on-input-1",
_name + "-muxer-in1"); _name + "-muxer-in1");
if (m_interfaceInput1 == nullptr) { if (m_interfaceInput1 == null) {
RIVER_ERROR("Can not opne virtual device ... map-on-input-1 in " << _name); RIVER_ERROR("Can not opne virtual device ... map-on-input-1 in " << _name);
return; return;
} }
@ -107,7 +107,7 @@ audio::river::io::NodeMuxer::NodeMuxer(const etk::String& _name, const ejson::Ob
hardwareFormat.getFormat(), hardwareFormat.getFormat(),
"map-on-input-2", "map-on-input-2",
_name + "-muxer-in2"); _name + "-muxer-in2");
if (m_interfaceInput2 == nullptr) { if (m_interfaceInput2 == null) {
RIVER_ERROR("Can not opne virtual device ... map-on-input-2 in " << _name); RIVER_ERROR("Can not opne virtual device ... map-on-input-2 in " << _name);
return; return;
} }
@ -166,11 +166,11 @@ audio::river::io::NodeMuxer::~NodeMuxer() {
void audio::river::io::NodeMuxer::start() { void audio::river::io::NodeMuxer::start() {
ethread::UniqueLock lock(m_mutex); ethread::UniqueLock lock(m_mutex);
RIVER_INFO("Start stream : '" << m_name << "' mode=" << (m_isInput?"input":"output") ); RIVER_INFO("Start stream : '" << m_name << "' mode=" << (m_isInput?"input":"output") );
if (m_interfaceInput1 != nullptr) { if (m_interfaceInput1 != null) {
RIVER_INFO("Start FEEDBACK : "); RIVER_INFO("Start FEEDBACK : ");
m_interfaceInput1->start(); m_interfaceInput1->start();
} }
if (m_interfaceInput2 != nullptr) { if (m_interfaceInput2 != null) {
RIVER_INFO("Start Microphone : "); RIVER_INFO("Start Microphone : ");
m_interfaceInput2->start(); m_interfaceInput2->start();
} }
@ -178,10 +178,10 @@ void audio::river::io::NodeMuxer::start() {
void audio::river::io::NodeMuxer::stop() { void audio::river::io::NodeMuxer::stop() {
ethread::UniqueLock lock(m_mutex); ethread::UniqueLock lock(m_mutex);
if (m_interfaceInput1 != nullptr) { if (m_interfaceInput1 != null) {
m_interfaceInput1->stop(); m_interfaceInput1->stop();
} }
if (m_interfaceInput2 != nullptr) { if (m_interfaceInput2 != null) {
m_interfaceInput2->stop(); m_interfaceInput2->stop();
} }
} }
@ -450,10 +450,10 @@ void audio::river::io::NodeMuxer::generateDot(etk::FSNode& _node) {
_node << " NODE_" << m_uid << "_HW_MUXER -> " << nameIn << ";\n"; _node << " NODE_" << m_uid << "_HW_MUXER -> " << nameIn << ";\n";
_node << " " << nameOut << " -> NODE_" << m_uid << "_demuxer;\n"; _node << " " << nameOut << " -> NODE_" << m_uid << "_demuxer;\n";
_node << " }\n"; _node << " }\n";
if (m_interfaceInput2 != nullptr) { if (m_interfaceInput2 != null) {
_node << " " << m_interfaceInput2->getDotNodeName() << " -> NODE_" << m_uid << "_HW_MUXER;\n"; _node << " " << m_interfaceInput2->getDotNodeName() << " -> NODE_" << m_uid << "_HW_MUXER;\n";
} }
if (m_interfaceInput1 != nullptr) { if (m_interfaceInput1 != null) {
_node << " " << m_interfaceInput1->getDotNodeName() << " -> NODE_" << m_uid << "_HW_MUXER;\n"; _node << " " << m_interfaceInput1->getDotNodeName() << " -> NODE_" << m_uid << "_HW_MUXER;\n";
} }
_node << " \n"; _node << " \n";
@ -462,7 +462,7 @@ void audio::river::io::NodeMuxer::generateDot(etk::FSNode& _node) {
continue; continue;
} }
ememory::SharedPtr<audio::river::Interface> element = m_listAvaillable[iii].lock(); ememory::SharedPtr<audio::river::Interface> element = m_listAvaillable[iii].lock();
if (element == nullptr) { if (element == null) {
continue; continue;
} }
bool isLink = false; bool isLink = false;
@ -471,7 +471,7 @@ void audio::river::io::NodeMuxer::generateDot(etk::FSNode& _node) {
isLink = true; isLink = true;
} }
} }
if (element != nullptr) { if (element != null) {
if (element->getMode() == modeInterface_input) { if (element->getMode() == modeInterface_input) {
element->generateDot(_node, "NODE_" + etk::toString(m_uid) + "_demuxer", isLink); element->generateDot(_node, "NODE_" + etk::toString(m_uid) + "_demuxer", isLink);
} else if (element->getMode() == modeInterface_output) { } else if (element->getMode() == modeInterface_output) {

View File

@ -198,7 +198,7 @@ audio::river::io::NodeOrchestra::NodeOrchestra(const etk::String& _name, const e
if (m_isInput == true) { if (m_isInput == true) {
m_process.setInputConfig(hardwareFormat); m_process.setInputConfig(hardwareFormat);
m_process.setOutputConfig(interfaceFormat); m_process.setOutputConfig(interfaceFormat);
err = m_interface.openStream(nullptr, err = m_interface.openStream(null,
&params, &params,
hardwareFormat.getFormat(), hardwareFormat.getFormat(),
hardwareFormat.getFrequency(), hardwareFormat.getFrequency(),
@ -217,7 +217,7 @@ audio::river::io::NodeOrchestra::NodeOrchestra(const etk::String& _name, const e
m_process.setInputConfig(interfaceFormat); m_process.setInputConfig(interfaceFormat);
m_process.setOutputConfig(hardwareFormat); m_process.setOutputConfig(hardwareFormat);
err = m_interface.openStream(&params, err = m_interface.openStream(&params,
nullptr, null,
hardwareFormat.getFormat(), hardwareFormat.getFormat(),
hardwareFormat.getFrequency(), hardwareFormat.getFrequency(),
&m_rtaudioFrameSize, &m_rtaudioFrameSize,

View File

@ -41,11 +41,11 @@ int32_t audio::river::io::NodePortAudio::duplexCallback(const void* _inputBuffer
PaStreamCallbackFlags _status) { PaStreamCallbackFlags _status) {
ethread::UniqueLock lock(m_mutex); ethread::UniqueLock lock(m_mutex);
// TODO : Manage status ... // TODO : Manage status ...
if (_inputBuffer != nullptr) { if (_inputBuffer != null) {
RIVER_VERBOSE("data Input size request :" << _nbChunk << " [BEGIN] status=" << _status << " nbIO=" << m_list.size()); RIVER_VERBOSE("data Input size request :" << _nbChunk << " [BEGIN] status=" << _status << " nbIO=" << m_list.size());
newInput(_inputBuffer, _nbChunk, _timeInput); newInput(_inputBuffer, _nbChunk, _timeInput);
} }
if (_outputBuffer != nullptr) { if (_outputBuffer != null) {
RIVER_VERBOSE("data Output size request :" << _nbChunk << " [BEGIN] status=" << _status << " nbIO=" << m_list.size()); RIVER_VERBOSE("data Output size request :" << _nbChunk << " [BEGIN] status=" << _status << " nbIO=" << m_list.size());
newOutput(_outputBuffer, _nbChunk, _timeOutput); newOutput(_outputBuffer, _nbChunk, _timeOutput);
} }

View File

@ -19,7 +19,7 @@ void audio::river::init(const etk::String& _filename) {
river_configFile = _filename; river_configFile = _filename;
RIVER_DEBUG("init RIVER :" << river_configFile); RIVER_DEBUG("init RIVER :" << river_configFile);
ememory::SharedPtr<audio::river::io::Manager> mng = audio::river::io::Manager::getInstance(); ememory::SharedPtr<audio::river::io::Manager> mng = audio::river::io::Manager::getInstance();
if (mng != nullptr) { if (mng != null) {
mng->init(river_configFile); mng->init(river_configFile);
} }
} else { } else {
@ -33,7 +33,7 @@ void audio::river::initString(const etk::String& _config) {
river_configFile = _config; river_configFile = _config;
RIVER_DEBUG("init RIVER with config."); RIVER_DEBUG("init RIVER with config.");
ememory::SharedPtr<audio::river::io::Manager> mng = audio::river::io::Manager::getInstance(); ememory::SharedPtr<audio::river::io::Manager> mng = audio::river::io::Manager::getInstance();
if (mng != nullptr) { if (mng != null) {
mng->initString(river_configFile); mng->initString(river_configFile);
} }
} else { } else {
@ -46,7 +46,7 @@ void audio::river::unInit() {
river_isInit = false; river_isInit = false;
RIVER_DEBUG("un-init RIVER."); RIVER_DEBUG("un-init RIVER.");
ememory::SharedPtr<audio::river::io::Manager> mng = audio::river::io::Manager::getInstance(); ememory::SharedPtr<audio::river::io::Manager> mng = audio::river::io::Manager::getInstance();
if (mng != nullptr) { if (mng != null) {
RIVER_ERROR("Can not get on the RIVER hardware manager !!!"); RIVER_ERROR("Can not get on the RIVER hardware manager !!!");
mng->unInit(); mng->unInit();
} }

View File

@ -13,7 +13,7 @@
#include <etk/tool.hpp> #include <etk/tool.hpp>
appl::Windows::Windows() : appl::Windows::Windows() :
m_composer(nullptr) { m_composer(null) {
addObjectType("appl::Windows"); addObjectType("appl::Windows");
propertyTitle.setDirectCheck("River IO viewer"); propertyTitle.setDirectCheck("River IO viewer");
} }
@ -38,7 +38,7 @@ void appl::Windows::init() {
composition += "</sizer>\n"; composition += "</sizer>\n";
m_composer = ewol::widget::Composer::create(); m_composer = ewol::widget::Composer::create();
if (m_composer == nullptr) { if (m_composer == null) {
APPL_CRITICAL(" An error occured ... in the windows creatrion ..."); APPL_CRITICAL(" An error occured ... in the windows creatrion ...");
return; return;
} }
@ -50,14 +50,14 @@ void appl::Windows::init() {
void appl::Windows::onCallbackRecord() { void appl::Windows::onCallbackRecord() {
ememory::SharedPtr<audio::river::widget::TemporalViewer> tmpDisp = ememory::dynamicPointerCast<audio::river::widget::TemporalViewer>(getSubObjectNamed("displayer")); ememory::SharedPtr<audio::river::widget::TemporalViewer> tmpDisp = ememory::dynamicPointerCast<audio::river::widget::TemporalViewer>(getSubObjectNamed("displayer"));
if (tmpDisp != nullptr) { if (tmpDisp != null) {
tmpDisp->recordToggle(); tmpDisp->recordToggle();
} }
} }
void appl::Windows::onCallbackGenerate() { void appl::Windows::onCallbackGenerate() {
ememory::SharedPtr<audio::river::widget::TemporalViewer> tmpDisp = ememory::dynamicPointerCast<audio::river::widget::TemporalViewer>(getSubObjectNamed("displayer")); ememory::SharedPtr<audio::river::widget::TemporalViewer> tmpDisp = ememory::dynamicPointerCast<audio::river::widget::TemporalViewer>(getSubObjectNamed("displayer"));
if (tmpDisp != nullptr) { if (tmpDisp != null) {
tmpDisp->generateToggle(); tmpDisp->generateToggle();
} }
} }

View File

@ -125,8 +125,8 @@ int main(int _argc, const char **_argv) {
etk::Vector<audio::channel>(), etk::Vector<audio::channel>(),
audio::format_int16, audio::format_int16,
ioName); ioName);
if(interface == nullptr) { if(interface == null) {
TEST_ERROR("nullptr interface"); TEST_ERROR("null interface");
return -1; return -1;
} }
//! [audio_river_sample_create_read_interface] //! [audio_river_sample_create_read_interface]

View File

@ -87,8 +87,8 @@ int main(int _argc, const char **_argv) {
etk::Vector<audio::channel>(), etk::Vector<audio::channel>(),
audio::format_int16, audio::format_int16,
"speaker"); "speaker");
if(interface == nullptr) { if(interface == null) {
TEST_ERROR("nullptr interface"); TEST_ERROR("null interface");
return -1; return -1;
} }
//! [audio_river_sample_create_write_interface] //! [audio_river_sample_create_write_interface]

View File

@ -8,18 +8,18 @@
#define TEST_SAVE_FILE_MACRO(type,fileName,dataPointer,nbElement) \ #define TEST_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) { \
TEST_WARNING("open file '" << fileName << "' type=" << #type); \ TEST_WARNING("open file '" << fileName << "' type=" << #type); \
pointerOnFile = fopen(fileName,"w"); \ pointerOnFile = fopen(fileName,"w"); \
if ( errorOpen == false \ if ( errorOpen == false \
&& pointerOnFile == nullptr) { \ && pointerOnFile == null) { \
TEST_ERROR("ERROR OPEN file ... '" << fileName << "' type=" << #type); \ TEST_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);*/ \
} \ } \

View File

@ -44,8 +44,8 @@ namespace river_test_aec {
channelMap, channelMap,
audio::format_int16, audio::format_int16,
_output); _output);
if(m_interfaceOut == nullptr) { if(m_interfaceOut == null) {
TEST_ERROR("nullptr interface"); TEST_ERROR("null interface");
return; return;
} }
// set callback mode ... // set callback mode ...
@ -66,8 +66,8 @@ namespace river_test_aec {
channelMap, channelMap,
audio::format_int16, audio::format_int16,
_input); _input);
if(m_interfaceIn == nullptr) { if(m_interfaceIn == null) {
TEST_ERROR("nullptr interface"); TEST_ERROR("null interface");
return; return;
} }
// set callback mode ... // set callback mode ...
@ -104,24 +104,24 @@ namespace river_test_aec {
m_buffer.write(_data, _nbChunk); m_buffer.write(_data, _nbChunk);
} }
void start() { void start() {
if(m_interfaceIn == nullptr) { if(m_interfaceIn == null) {
TEST_ERROR("nullptr interface"); TEST_ERROR("null interface");
return; return;
} }
if(m_interfaceOut == nullptr) { if(m_interfaceOut == null) {
TEST_ERROR("nullptr interface"); TEST_ERROR("null interface");
return; return;
} }
m_interfaceOut->start(); m_interfaceOut->start();
m_interfaceIn->start(); m_interfaceIn->start();
} }
void stop() { void stop() {
if(m_interfaceIn == nullptr) { if(m_interfaceIn == null) {
TEST_ERROR("nullptr interface"); TEST_ERROR("null interface");
return; return;
} }
if(m_interfaceOut == nullptr) { if(m_interfaceOut == null) {
TEST_ERROR("nullptr interface"); TEST_ERROR("null interface");
return; return;
} }
m_manager->generateDotAll("activeProcess.dot"); m_manager->generateDotAll("activeProcess.dot");

View File

@ -56,8 +56,8 @@ namespace river_test_echo_delay {
channelMap, channelMap,
audio::format_int16, audio::format_int16,
"speaker"); "speaker");
if(m_interfaceOut == nullptr) { if(m_interfaceOut == null) {
TEST_ERROR("nullptr interface"); TEST_ERROR("null interface");
return; return;
} }
// set callback mode ... // set callback mode ...
@ -76,8 +76,8 @@ namespace river_test_echo_delay {
channelMap, channelMap,
audio::format_int16, audio::format_int16,
"microphone"); "microphone");
if(m_interfaceIn == nullptr) { if(m_interfaceIn == null) {
TEST_ERROR("nullptr interface"); TEST_ERROR("null interface");
return; return;
} }
// set callback mode ... // set callback mode ...
@ -94,8 +94,8 @@ namespace river_test_echo_delay {
channelMap, channelMap,
audio::format_int16, audio::format_int16,
"speaker"); "speaker");
if(m_interfaceFB == nullptr) { if(m_interfaceFB == null) {
TEST_ERROR("nullptr interface"); TEST_ERROR("null interface");
return; return;
} }
// set callback mode ... // set callback mode ...
@ -356,16 +356,16 @@ namespace river_test_echo_delay {
} }
} }
void run() { void run() {
if(m_interfaceIn == nullptr) { if(m_interfaceIn == null) {
TEST_ERROR("nullptr interface"); TEST_ERROR("null interface");
return; return;
} }
if(m_interfaceOut == nullptr) { if(m_interfaceOut == null) {
TEST_ERROR("nullptr interface"); TEST_ERROR("null interface");
return; return;
} }
if(m_interfaceFB == nullptr) { if(m_interfaceFB == null) {
TEST_ERROR("nullptr interface"); TEST_ERROR("null interface");
return; return;
} }
m_interfaceOut->start(); m_interfaceOut->start();

View File

@ -75,8 +75,8 @@ namespace river_test_format {
_format, _format,
"speaker", "speaker",
"WriteModeCallbackType"); "WriteModeCallbackType");
if(m_interface == nullptr) { if(m_interface == null) {
TEST_ERROR("nullptr interface"); TEST_ERROR("null interface");
return; return;
} }
// set callback mode ... // set callback mode ...
@ -144,8 +144,8 @@ namespace river_test_format {
} }
} }
void run() { void run() {
if(m_interface == nullptr) { if(m_interface == null) {
TEST_ERROR("nullptr interface"); TEST_ERROR("null interface");
return; return;
} }
m_interface->start(); m_interface->start();

View File

@ -36,8 +36,8 @@ namespace river_test_muxer {
channelMap, channelMap,
audio::format_int16, audio::format_int16,
"speaker"); "speaker");
if(m_interfaceOut == nullptr) { if(m_interfaceOut == null) {
TEST_ERROR("nullptr interface"); TEST_ERROR("null interface");
return; return;
} }
// set callback mode ... // set callback mode ...
@ -57,8 +57,8 @@ namespace river_test_muxer {
etk::Vector<audio::channel>(), etk::Vector<audio::channel>(),
audio::format_int16, audio::format_int16,
"microphone-muxed"); "microphone-muxed");
if(m_interfaceIn == nullptr) { if(m_interfaceIn == null) {
TEST_ERROR("nullptr interface"); TEST_ERROR("null interface");
return; return;
} }
// set callback mode ... // set callback mode ...
@ -104,12 +104,12 @@ namespace river_test_muxer {
TEST_ERROR("Receive data ... " << _nbChunk << " map=" << _map); TEST_ERROR("Receive data ... " << _nbChunk << " map=" << _map);
} }
void run() { void run() {
if(m_interfaceIn == nullptr) { if(m_interfaceIn == null) {
TEST_ERROR("nullptr interface"); TEST_ERROR("null interface");
return; return;
} }
if(m_interfaceOut == nullptr) { if(m_interfaceOut == null) {
TEST_ERROR("nullptr interface"); TEST_ERROR("null interface");
return; return;
} }
m_interfaceOut->start(); m_interfaceOut->start();

View File

@ -38,8 +38,8 @@ namespace river_test_playback_callback {
channelMap, channelMap,
audio::format_int16, audio::format_int16,
_io); _io);
if(m_interface == nullptr) { if(m_interface == null) {
TEST_ERROR("nullptr interface"); TEST_ERROR("null interface");
return; return;
} }
// set callback mode ... // set callback mode ...
@ -74,8 +74,8 @@ namespace river_test_playback_callback {
} }
} }
void run() { void run() {
if(m_interface == nullptr) { if(m_interface == null) {
TEST_ERROR("nullptr interface"); TEST_ERROR("null interface");
return; return;
} }
m_interface->start(); m_interface->start();
@ -108,7 +108,7 @@ namespace river_test_playback_callback {
TEST_INFO("test output (callback mode)"); TEST_INFO("test output (callback mode)");
ememory::SharedPtr<testOutCallback> process = ememory::makeShared<testOutCallback>(manager, "speaker"); ememory::SharedPtr<testOutCallback> process = ememory::makeShared<testOutCallback>(manager, "speaker");
ASSERT_NE(process, nullptr); ASSERT_NE(process, null);
process->run(); process->run();
process.reset(); process.reset();
ethread::sleepMilliSeconds((500)); ethread::sleepMilliSeconds((500));

View File

@ -51,15 +51,15 @@ namespace river_test_playback_write {
m_channelMap, m_channelMap,
audio::format_int16, audio::format_int16,
"speaker"); "speaker");
if(m_interface == nullptr) { if(m_interface == null) {
TEST_ERROR("nullptr interface"); TEST_ERROR("null interface");
return; return;
} }
m_interface->setReadwrite(); m_interface->setReadwrite();
} }
void run() { void run() {
if(m_interface == nullptr) { if(m_interface == null) {
TEST_ERROR("nullptr interface"); TEST_ERROR("null interface");
return; return;
} }
double phase=0; double phase=0;
@ -128,8 +128,8 @@ namespace river_test_playback_write {
channelMap, channelMap,
audio::format_int16, audio::format_int16,
"speaker"); "speaker");
if(m_interface == nullptr) { if(m_interface == null) {
TEST_ERROR("nullptr interface"); TEST_ERROR("null interface");
return; return;
} }
m_interface->setReadwrite(); m_interface->setReadwrite();
@ -165,8 +165,8 @@ namespace river_test_playback_write {
m_interface->write(&data[0], data.size()/_map.size()); m_interface->write(&data[0], data.size()/_map.size());
} }
void run() { void run() {
if(m_interface == nullptr) { if(m_interface == null) {
TEST_ERROR("nullptr interface"); TEST_ERROR("null interface");
return; return;
} }
m_interface->start(); m_interface->start();

View File

@ -47,8 +47,8 @@ namespace river_test_record_callback {
channelMap, channelMap,
audio::format_int16, audio::format_int16,
_input); _input);
if(m_interface == nullptr) { if(m_interface == null) {
TEST_ERROR("nullptr interface"); TEST_ERROR("null interface");
return; return;
} }
// set callback mode ... // set callback mode ...
@ -80,8 +80,8 @@ namespace river_test_record_callback {
TEST_INFO("Get data ... average=" << int32_t(value)); TEST_INFO("Get data ... average=" << int32_t(value));
} }
void run() { void run() {
if(m_interface == nullptr) { if(m_interface == null) {
TEST_ERROR("nullptr interface"); TEST_ERROR("null interface");
return; return;
} }
m_interface->start(); m_interface->start();

View File

@ -53,8 +53,8 @@ namespace river_test_volume {
channelMap, channelMap,
audio::format_int16, audio::format_int16,
"speaker"); "speaker");
if(m_interface == nullptr) { if(m_interface == null) {
TEST_ERROR("nullptr interface"); TEST_ERROR("null interface");
return; return;
} }
// set callback mode ... // set callback mode ...
@ -88,8 +88,8 @@ namespace river_test_volume {
} }
} }
void run() { void run() {
if(m_interface == nullptr) { if(m_interface == null) {
TEST_ERROR("nullptr interface"); TEST_ERROR("null interface");
return; return;
} }
m_interface->start(); m_interface->start();

View File

@ -58,7 +58,7 @@ void audio::river::widget::TemporalViewer::onDataReceived(const void* _data,
void audio::river::widget::TemporalViewer::recordToggle() { void audio::river::widget::TemporalViewer::recordToggle() {
ethread::UniqueLock lock(m_mutex); ethread::UniqueLock lock(m_mutex);
if (m_interface == nullptr) { if (m_interface == null) {
//Get the generic input: //Get the generic input:
etk::Vector<audio::channel> channel; etk::Vector<audio::channel> channel;
channel.pushBack(audio::channel_frontLeft); channel.pushBack(audio::channel_frontLeft);
@ -66,8 +66,8 @@ void audio::river::widget::TemporalViewer::recordToggle() {
channel, channel,
audio::format_float, audio::format_float,
"microphone"); "microphone");
if(m_interface == nullptr) { if(m_interface == null) {
ARW_ERROR("nullptr interface"); ARW_ERROR("null interface");
return; return;
} }
// set callback mode ... // set callback mode ...