diff --git a/audio/river/io/Group.cpp b/audio/river/io/Group.cpp index 7f4c3da..0c1b127 100644 --- a/audio/river/io/Group.cpp +++ b/audio/river/io/Group.cpp @@ -27,7 +27,7 @@ void audio::river::io::Group::createFrom(const ejson::Document& _obj, const std: RIVER_INFO("Add element in Group[" << _name << "]: " << _obj.getKey(iii)); // get type : io std::string ioType = tmpObject->getStringValue("io", "error"); - #ifdef __AIRTAUDIO_INFERFACE__ + #ifdef AUDIO_RIVER_BUILD_ORCHESTRA if ( ioType == "input" || ioType == "output") { std11::shared_ptr tmp = audio::river::io::NodeOrchestra::create(_obj.getKey(iii), tmpObject); @@ -35,7 +35,7 @@ void audio::river::io::Group::createFrom(const ejson::Document& _obj, const std: m_list.push_back(tmp); } #endif - #ifdef __PORTAUDIO_INFERFACE__ + #ifdef AUDIO_RIVER_BUILD_PORTAUDIO if ( ioType == "PAinput" || ioType == "PAoutput") { std11::shared_ptr tmp = audio::river::io::NodePortAudio::create(_obj.getKey(iii), tmpObject); @@ -48,7 +48,7 @@ void audio::river::io::Group::createFrom(const ejson::Document& _obj, const std: // Link all the IO together : (not needed if one device ... // Note : The interlink work only for alsa (NOW) and with AirTAudio... if(m_list.size() > 1) { - #ifdef __AIRTAUDIO_INFERFACE__ + #ifdef AUDIO_RIVER_BUILD_ORCHESTRA std11::shared_ptr linkRef = std11::dynamic_pointer_cast(m_list[0]); for (size_t iii=1; iii #endif @@ -58,7 +58,7 @@ static std::string basicAutoConfig = audio::river::io::Manager::Manager() { - #ifdef __PORTAUDIO_INFERFACE__ + #ifdef AUDIO_RIVER_BUILD_PORTAUDIO PaError err = Pa_Initialize(); if(err != paNoError) { RIVER_WARNING("Can not initialize portaudio : " << Pa_GetErrorText(err)); @@ -87,7 +87,7 @@ void audio::river::io::Manager::unInit() { } audio::river::io::Manager::~Manager() { - #ifdef __PORTAUDIO_INFERFACE__ + #ifdef AUDIO_RIVER_BUILD_PORTAUDIO PaError err = Pa_Terminate(); if(err != paNoError) { RIVER_WARNING("Can not initialize portaudio : " << Pa_GetErrorText(err)); @@ -200,7 +200,7 @@ std11::shared_ptr audio::river::io::Manager::getNode(con } } } - RIVER_WARNING("Create a new one : " << _name); + RIVER_WARNING("Try create a new one : " << _name); // check if the node can be open : const std11::shared_ptr tmpObject = m_config.getObject(_name); if (tmpObject != nullptr) { @@ -224,22 +224,27 @@ std11::shared_ptr audio::river::io::Manager::getNode(con RIVER_WARNING("Group is only availlable for Hardware interface ... '" << _name << "'"); } // TODO : Create a standalone group for every single element ==> simplify understanding ... but not for virtual interface ... - #ifdef __AIRTAUDIO_INFERFACE__ + if ( ioType == "input" || ioType == "output") { - std11::shared_ptr tmp = audio::river::io::NodeOrchestra::create(_name, tmpObject); - m_list.push_back(tmp); - return tmp; + #ifdef AUDIO_RIVER_BUILD_ORCHESTRA + std11::shared_ptr tmp = audio::river::io::NodeOrchestra::create(_name, tmpObject); + m_list.push_back(tmp); + return tmp; + #else + RIVER_WARNING("not present interface"); + #endif } - #endif - #ifdef __PORTAUDIO_INFERFACE__ if ( ioType == "PAinput" || ioType == "PAoutput") { - std11::shared_ptr tmp = audio::river::io::NodePortAudio::create(_name, tmpObject); - m_list.push_back(tmp); - return tmp; + #ifdef AUDIO_RIVER_BUILD_PORTAUDIO + std11::shared_ptr tmp = audio::river::io::NodePortAudio::create(_name, tmpObject); + m_list.push_back(tmp); + return tmp; + #else + RIVER_WARNING("not present interface"); + #endif } - #endif if (ioType == "aec") { std11::shared_ptr tmp = audio::river::io::NodeAEC::create(_name, tmpObject); m_list.push_back(tmp); diff --git a/audio/river/river.h b/audio/river/river.h index a12aa2d..7e4524a 100644 --- a/audio/river/river.h +++ b/audio/river/river.h @@ -15,7 +15,7 @@ namespace audio { * @brief Initialize the River Library * @param[in] _filename Name of the configuration file (if "" ==> default config file) */ - void init(const std::string& _filename); + void init(const std::string& _filename = ""); /** * @brief Initialize the River Library with a json data string * @param[in] _config json sting data