[DEV] add dynamic dependency of airtaudio and portaudio

This commit is contained in:
2015-02-23 22:14:48 +01:00
parent 7d6e1e0bf6
commit 62cb1ef639
6 changed files with 25 additions and 13 deletions

View File

@@ -99,17 +99,23 @@ std::shared_ptr<river::io::Node> river::io::Manager::getNode(const std::string&
if (tmpObject != nullptr) {
// get type : io
std::string ioType = tmpObject->getStringValue("io", "error");
#ifdef __AIRTAUDIO_INFERFACE__
if ( ioType == "input"
|| ioType == "output") {
std::shared_ptr<river::io::Node> tmp = river::io::NodeAirTAudio::create(_name, tmpObject);
m_list.push_back(tmp);
return tmp;
} else if ( ioType == "PAinput"
|| ioType == "PAoutput") {
} else
#endif
#ifdef __PORTAUDIO_INFERFACE__
if ( ioType == "PAinput"
|| ioType == "PAoutput") {
std::shared_ptr<river::io::Node> tmp = river::io::NodePortAudio::create(_name, tmpObject);
m_list.push_back(tmp);
return tmp;
} else if (ioType == "aec") {
} else
#endif
if (ioType == "aec") {
std::shared_ptr<river::io::Node> tmp = river::io::NodeAEC::create(_name, tmpObject);
m_list.push_back(tmp);
return tmp;

View File

@@ -4,6 +4,8 @@
* @license APACHE v2.0 (see license file)
*/
#ifdef __AIRTAUDIO_INFERFACE__
#include <river/io/NodeAirTAudio.h>
#include <river/debug.h>
@@ -261,3 +263,5 @@ void river::io::NodeAirTAudio::stop() {
RIVER_ERROR("Stop stream : '" << m_name << "' mode=" << (m_isInput?"input":"output") << " can not stop stream ... " << err);
}
}
#endif

View File

@@ -7,6 +7,8 @@
#ifndef __RIVER_IO_NODE_AIRTAUDIO_H__
#define __RIVER_IO_NODE_AIRTAUDIO_H__
#ifdef __AIRTAUDIO_INFERFACE__
#include <river/io/Node.h>
namespace river {
@@ -49,6 +51,7 @@ namespace river {
};
}
}
#endif
#endif

View File

@@ -4,6 +4,8 @@
* @license APACHE v2.0 (see license file)
*/
#ifdef __PORTTAUDIO_INFERFACE__
#include <river/io/NodePortAudio.h>
#include <river/debug.h>
@@ -150,3 +152,5 @@ void river::io::NodePortAudio::stop() {
RIVER_ERROR("Start stream : '" << m_name << "' mode=" << (m_isInput?"input":"output") << " can not stop stream ... " << Pa_GetErrorText(err));
}
}
#endif

View File

@@ -7,6 +7,8 @@
#ifndef __RIVER_IO_NODE_PORTAUDIO_H__
#define __RIVER_IO_NODE_PORTAUDIO_H__
#ifdef __PORTTAUDIO_INFERFACE__
#include <river/Interface.h>
#include <river/io/Node.h>
#include <portaudio.h>
@@ -41,6 +43,7 @@ namespace river {
};
}
}
#endif
#endif