[RENAME] change airtalgo => drain

This commit is contained in:
Edouard DUPIN 2015-02-05 19:10:53 +01:00
parent 8f29bd608b
commit ff6c33d566
31 changed files with 210 additions and 210 deletions

View File

@ -3,7 +3,7 @@
* @copyright 2011, Edouard DUPIN, all right reserved * @copyright 2011, Edouard DUPIN, all right reserved
* @license APACHE v2.0 (see license file) * @license APACHE v2.0 (see license file)
*/ */
#include <airtalgo/Algo.h> #include <drain/Algo.h>
#include <functional> #include <functional>
#include "debug.h" #include "debug.h"
@ -11,7 +11,7 @@
#undef __class__ #undef __class__
#define __class__ "Algo" #define __class__ "Algo"
airtalgo::Algo::Algo() : drain::Algo::Algo() :
m_temporary(false), m_temporary(false),
m_outputData(), m_outputData(),
m_formatSize(0), m_formatSize(0),
@ -19,15 +19,15 @@ airtalgo::Algo::Algo() :
AIRTALGO_VERBOSE("CREATE ALGO"); AIRTALGO_VERBOSE("CREATE ALGO");
} }
void airtalgo::Algo::init() { void drain::Algo::init() {
// set notification callback : // set notification callback :
m_input.setCallback(std::bind(&airtalgo::Algo::configurationChangeLocal, this)); m_input.setCallback(std::bind(&drain::Algo::configurationChangeLocal, this));
m_output.setCallback(std::bind(&airtalgo::Algo::configurationChangeLocal, this)); m_output.setCallback(std::bind(&drain::Algo::configurationChangeLocal, this));
// first configure ==> update the internal parameters // first configure ==> update the internal parameters
configurationChange(); configurationChange();
} }
void airtalgo::Algo::configurationChange() { void drain::Algo::configurationChange() {
m_needProcess = false; m_needProcess = false;
if (m_input.getFormat() != m_output.getFormat()) { if (m_input.getFormat() != m_output.getFormat()) {
m_needProcess = true; m_needProcess = true;
@ -63,7 +63,7 @@ void airtalgo::Algo::configurationChange() {
} }
} }
size_t airtalgo::Algo::needInputData(size_t _output) { size_t drain::Algo::needInputData(size_t _output) {
size_t input = _output; size_t input = _output;
/* NOT good at all ... /* NOT good at all ...
if (m_input.getFormat() != m_output.getFormat()) { if (m_input.getFormat() != m_output.getFormat()) {

View File

@ -20,7 +20,7 @@
#include "IOFormatInterface.h" #include "IOFormatInterface.h"
#include "debug.h" #include "debug.h"
namespace airtalgo{ namespace drain{
class Algo : public std::enable_shared_from_this<Algo> { class Algo : public std::enable_shared_from_this<Algo> {
private: private:
std::string m_name; std::string m_name;

View File

@ -7,11 +7,11 @@
#include "AutoLogInOut.h" #include "AutoLogInOut.h"
#include "debug.h" #include "debug.h"
airtalgo::AutoLogInOut::AutoLogInOut(const std::string& _value) : drain::AutoLogInOut::AutoLogInOut(const std::string& _value) :
m_value(_value) { m_value(_value) {
AIRTALGO_VERBOSE(" '" << m_value << "' [START]"); AIRTALGO_VERBOSE(" '" << m_value << "' [START]");
} }
airtalgo::AutoLogInOut::~AutoLogInOut() { drain::AutoLogInOut::~AutoLogInOut() {
AIRTALGO_VERBOSE(" '" << m_value << "' [STOP]"); AIRTALGO_VERBOSE(" '" << m_value << "' [STOP]");
} }

View File

@ -11,7 +11,7 @@
#include <string> #include <string>
#include "debug.h" #include "debug.h"
namespace airtalgo{ namespace drain{
class AutoLogInOut { class AutoLogInOut {
private: private:
std::string m_value; std::string m_value;

View File

@ -4,7 +4,7 @@
* @license APACHE v2.0 (see license file) * @license APACHE v2.0 (see license file)
*/ */
#include <airtalgo/ChannelReorder.h> #include <drain/ChannelReorder.h>
#include <iostream> #include <iostream>
#include "debug.h" #include "debug.h"
#include "debug.h" #include "debug.h"
@ -13,25 +13,25 @@
#undef __class__ #undef __class__
#define __class__ "ChannelReorder" #define __class__ "ChannelReorder"
airtalgo::ChannelReorder::ChannelReorder() { drain::ChannelReorder::ChannelReorder() {
} }
void airtalgo::ChannelReorder::init() { void drain::ChannelReorder::init() {
airtalgo::Algo::init(); drain::Algo::init();
m_type = "ChannelReorder"; m_type = "ChannelReorder";
} }
std::shared_ptr<airtalgo::ChannelReorder> airtalgo::ChannelReorder::create() { std::shared_ptr<drain::ChannelReorder> drain::ChannelReorder::create() {
std::shared_ptr<airtalgo::ChannelReorder> tmp(new airtalgo::ChannelReorder()); std::shared_ptr<drain::ChannelReorder> tmp(new drain::ChannelReorder());
tmp->init(); tmp->init();
return tmp; return tmp;
} }
void airtalgo::ChannelReorder::configurationChange() { void drain::ChannelReorder::configurationChange() {
airtalgo::AutoLogInOut("ChannelReorder (config)"); drain::AutoLogInOut("ChannelReorder (config)");
airtalgo::Algo::configurationChange(); drain::Algo::configurationChange();
if (m_input.getFormat() != m_output.getFormat()) { if (m_input.getFormat() != m_output.getFormat()) {
AIRTALGO_ERROR("can not support Format Change ..."); AIRTALGO_ERROR("can not support Format Change ...");
m_needProcess = false; m_needProcess = false;
@ -49,12 +49,12 @@ void airtalgo::ChannelReorder::configurationChange() {
} }
bool airtalgo::ChannelReorder::process(std::chrono::system_clock::time_point& _time, bool drain::ChannelReorder::process(std::chrono::system_clock::time_point& _time,
void* _input, void* _input,
size_t _inputNbChunk, size_t _inputNbChunk,
void*& _output, void*& _output,
size_t& _outputNbChunk) { size_t& _outputNbChunk) {
airtalgo::AutoLogInOut tmpLog("ChannelReorder"); drain::AutoLogInOut tmpLog("ChannelReorder");
_outputNbChunk = _inputNbChunk; _outputNbChunk = _inputNbChunk;
// check if we need to process: // check if we need to process:
if (m_needProcess == false) { if (m_needProcess == false) {

View File

@ -7,9 +7,9 @@
#ifndef __AIRT_ALGO_CHANNEL_REORDER_H__ #ifndef __AIRT_ALGO_CHANNEL_REORDER_H__
#define __AIRT_ALGO_CHANNEL_REORDER_H__ #define __AIRT_ALGO_CHANNEL_REORDER_H__
#include <airtalgo/Algo.h> #include <drain/Algo.h>
namespace airtalgo{ namespace drain{
class ChannelReorder : public Algo { class ChannelReorder : public Algo {
protected: protected:
/** /**

View File

@ -7,9 +7,9 @@
#ifndef __AIRT_ALGO_END_POINT_H__ #ifndef __AIRT_ALGO_END_POINT_H__
#define __AIRT_ALGO_END_POINT_H__ #define __AIRT_ALGO_END_POINT_H__
#include <airtalgo/Algo.h> #include <drain/Algo.h>
namespace airtalgo{ namespace drain{
class EndPoint : public Algo { class EndPoint : public Algo {
protected: protected:
/** /**
@ -17,7 +17,7 @@ namespace airtalgo{
*/ */
EndPoint() {}; EndPoint() {};
void init() { void init() {
airtalgo::Algo::init(); drain::Algo::init();
}; };
public: public:
/** /**

View File

@ -5,53 +5,53 @@
*/ */
#include "debug.h" #include "debug.h"
#include <airtalgo/EndPointCallback.h> #include <drain/EndPointCallback.h>
#undef __class__ #undef __class__
#define __class__ "EndPointCallback" #define __class__ "EndPointCallback"
airtalgo::EndPointCallback::EndPointCallback() : drain::EndPointCallback::EndPointCallback() :
m_outputFunction(nullptr), m_outputFunction(nullptr),
m_inputFunction(nullptr) { m_inputFunction(nullptr) {
} }
void airtalgo::EndPointCallback::init(needDataFunction _callback) { void drain::EndPointCallback::init(needDataFunction _callback) {
m_outputFunction = _callback; m_outputFunction = _callback;
airtalgo::EndPoint::init(); drain::EndPoint::init();
m_type = "EndPointCallback"; m_type = "EndPointCallback";
} }
void airtalgo::EndPointCallback::init(haveNewDataFunction _callback) { void drain::EndPointCallback::init(haveNewDataFunction _callback) {
m_inputFunction = _callback; m_inputFunction = _callback;
airtalgo::EndPoint::init(); drain::EndPoint::init();
m_type = "EndPointCallback"; m_type = "EndPointCallback";
} }
std::shared_ptr<airtalgo::EndPointCallback> airtalgo::EndPointCallback::create(needDataFunction _callback) { std::shared_ptr<drain::EndPointCallback> drain::EndPointCallback::create(needDataFunction _callback) {
std::shared_ptr<airtalgo::EndPointCallback> tmp(new airtalgo::EndPointCallback()); std::shared_ptr<drain::EndPointCallback> tmp(new drain::EndPointCallback());
tmp->init(_callback); tmp->init(_callback);
return tmp; return tmp;
} }
std::shared_ptr<airtalgo::EndPointCallback> airtalgo::EndPointCallback::create(haveNewDataFunction _callback) { std::shared_ptr<drain::EndPointCallback> drain::EndPointCallback::create(haveNewDataFunction _callback) {
std::shared_ptr<airtalgo::EndPointCallback> tmp(new airtalgo::EndPointCallback()); std::shared_ptr<drain::EndPointCallback> tmp(new drain::EndPointCallback());
tmp->init(_callback); tmp->init(_callback);
return tmp; return tmp;
} }
void airtalgo::EndPointCallback::configurationChange() { void drain::EndPointCallback::configurationChange() {
airtalgo::EndPoint::configurationChange(); drain::EndPoint::configurationChange();
AIRTALGO_INFO("update : format=" << m_output.getFormat() << " map=" << m_input.getMap() << " freq=" << m_input.getFrequency() << " size=" << int32_t(m_formatSize)); AIRTALGO_INFO("update : format=" << m_output.getFormat() << " map=" << m_input.getMap() << " freq=" << m_input.getFrequency() << " size=" << int32_t(m_formatSize));
m_needProcess = true; m_needProcess = true;
} }
bool airtalgo::EndPointCallback::process(std::chrono::system_clock::time_point& _time, bool drain::EndPointCallback::process(std::chrono::system_clock::time_point& _time,
void* _input, // uneeded void* _input, // uneeded
size_t _inputNbChunk, // requested number of sample ... size_t _inputNbChunk, // requested number of sample ...
void*& _output, void*& _output,
size_t& _outputNbChunk){ size_t& _outputNbChunk){
airtalgo::AutoLogInOut tmpLog("EndPointCallback"); drain::AutoLogInOut tmpLog("EndPointCallback");
if (m_outputFunction != nullptr) { if (m_outputFunction != nullptr) {
// 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);

View File

@ -7,11 +7,11 @@
#ifndef __AIRT_ALGO_END_POINT_CALLBACK_H__ #ifndef __AIRT_ALGO_END_POINT_CALLBACK_H__
#define __AIRT_ALGO_END_POINT_CALLBACK_H__ #define __AIRT_ALGO_END_POINT_CALLBACK_H__
#include <airtalgo/EndPoint.h> #include <drain/EndPoint.h>
#include <functional> #include <functional>
namespace airtalgo { namespace drain {
typedef std::function<void (const std::chrono::system_clock::time_point& _playTime, typedef std::function<void (const std::chrono::system_clock::time_point& _playTime,
size_t _nbChunk, size_t _nbChunk,
const std::vector<audio::channel>& _map, const std::vector<audio::channel>& _map,

View File

@ -5,39 +5,39 @@
*/ */
#include "debug.h" #include "debug.h"
#include <airtalgo/EndPointRead.h> #include <drain/EndPointRead.h>
#undef __class__ #undef __class__
#define __class__ "EndPointRead" #define __class__ "EndPointRead"
airtalgo::EndPointRead::EndPointRead() { drain::EndPointRead::EndPointRead() {
} }
void airtalgo::EndPointRead::init() { void drain::EndPointRead::init() {
airtalgo::EndPoint::init(); drain::EndPoint::init();
m_type = "EndPointRead"; m_type = "EndPointRead";
} }
std::shared_ptr<airtalgo::EndPointRead> airtalgo::EndPointRead::create() { std::shared_ptr<drain::EndPointRead> drain::EndPointRead::create() {
std::shared_ptr<airtalgo::EndPointRead> tmp(new airtalgo::EndPointRead()); std::shared_ptr<drain::EndPointRead> tmp(new drain::EndPointRead());
tmp->init(); tmp->init();
return tmp; return tmp;
} }
void airtalgo::EndPointRead::configurationChange() { void drain::EndPointRead::configurationChange() {
airtalgo::EndPoint::configurationChange(); drain::EndPoint::configurationChange();
m_needProcess = true; m_needProcess = true;
} }
bool airtalgo::EndPointRead::process(std::chrono::system_clock::time_point& _time, bool drain::EndPointRead::process(std::chrono::system_clock::time_point& _time,
void* _input, void* _input,
size_t _inputNbChunk, size_t _inputNbChunk,
void*& _output, void*& _output,
size_t& _outputNbChunk){ size_t& _outputNbChunk){
airtalgo::AutoLogInOut tmpLog("EndPointRead"); drain::AutoLogInOut tmpLog("EndPointRead");
return false; return false;
} }

View File

@ -7,9 +7,9 @@
#ifndef __AIRT_ALGO_END_POINT_READ_H__ #ifndef __AIRT_ALGO_END_POINT_READ_H__
#define __AIRT_ALGO_END_POINT_READ_H__ #define __AIRT_ALGO_END_POINT_READ_H__
#include <airtalgo/EndPoint.h> #include <drain/EndPoint.h>
namespace airtalgo{ namespace drain{
class EndPointRead : public EndPoint { class EndPointRead : public EndPoint {
protected: protected:
/** /**

View File

@ -4,40 +4,40 @@
* @license APACHE v2.0 (see license file) * @license APACHE v2.0 (see license file)
*/ */
#include "debug.h" #include "debug.h"
#include <airtalgo/EndPointWrite.h> #include <drain/EndPointWrite.h>
#undef __class__ #undef __class__
#define __class__ "EndPointWrite" #define __class__ "EndPointWrite"
airtalgo::EndPointWrite::EndPointWrite() : drain::EndPointWrite::EndPointWrite() :
m_function(nullptr) { m_function(nullptr) {
} }
void airtalgo::EndPointWrite::init() { void drain::EndPointWrite::init() {
airtalgo::EndPoint::init(); drain::EndPoint::init();
m_type = "EndPoint"; m_type = "EndPoint";
} }
std::shared_ptr<airtalgo::EndPointWrite> airtalgo::EndPointWrite::create() { std::shared_ptr<drain::EndPointWrite> drain::EndPointWrite::create() {
std::shared_ptr<airtalgo::EndPointWrite> tmp(new airtalgo::EndPointWrite()); std::shared_ptr<drain::EndPointWrite> tmp(new drain::EndPointWrite());
tmp->init(); tmp->init();
return tmp; return tmp;
} }
void airtalgo::EndPointWrite::configurationChange() { void drain::EndPointWrite::configurationChange() {
airtalgo::EndPoint::configurationChange(); drain::EndPoint::configurationChange();
m_needProcess = true; m_needProcess = true;
} }
bool airtalgo::EndPointWrite::process(std::chrono::system_clock::time_point& _time, bool drain::EndPointWrite::process(std::chrono::system_clock::time_point& _time,
void* _input, void* _input,
size_t _inputNbChunk, size_t _inputNbChunk,
void*& _output, void*& _output,
size_t& _outputNbChunk){ size_t& _outputNbChunk){
airtalgo::AutoLogInOut tmpLog("EndPointWrite"); drain::AutoLogInOut tmpLog("EndPointWrite");
//AIRTALGO_INFO(" nb Sample in buffer : " << m_tmpData.size()); //AIRTALGO_INFO(" nb Sample in buffer : " << m_tmpData.size());
if (m_function != nullptr) { if (m_function != nullptr) {
if (m_tmpData.size() <= 20000) { if (m_tmpData.size() <= 20000) {
@ -70,7 +70,7 @@ bool airtalgo::EndPointWrite::process(std::chrono::system_clock::time_point& _ti
return true; return true;
} }
void airtalgo::EndPointWrite::write(const void* _value, size_t _nbChunk) { void drain::EndPointWrite::write(const void* _value, size_t _nbChunk) {
std::unique_lock<std::mutex> lock(m_mutex); std::unique_lock<std::mutex> lock(m_mutex);
AIRTALGO_INFO("[ASYNC] Write data : " << _nbChunk << " chunks" AIRTALGO_INFO("[ASYNC] Write data : " << _nbChunk << " chunks"
<< " ==> " << _nbChunk*m_output.getMap().size() << " samples" << " ==> " << _nbChunk*m_output.getMap().size() << " samples"

View File

@ -7,11 +7,11 @@
#ifndef __AIRT_ALGO_ALGO_END_POINT_WRITE_H__ #ifndef __AIRT_ALGO_ALGO_END_POINT_WRITE_H__
#define __AIRT_ALGO_ALGO_END_POINT_WRITE_H__ #define __AIRT_ALGO_ALGO_END_POINT_WRITE_H__
#include <airtalgo/EndPoint.h> #include <drain/EndPoint.h>
#include <mutex> #include <mutex>
#include <functional> #include <functional>
namespace airtalgo{ namespace drain{
typedef std::function<void (const std::chrono::system_clock::time_point& _playTime, typedef std::function<void (const std::chrono::system_clock::time_point& _playTime,
const size_t& _nbChunk, const size_t& _nbChunk,
const std::vector<audio::channel>& _map, const std::vector<audio::channel>& _map,

View File

@ -5,7 +5,7 @@
*/ */
#include "debug.h" #include "debug.h"
#include <airtalgo/FormatUpdate.h> #include <drain/FormatUpdate.h>
#include <iostream> #include <iostream>
#undef __class__ #undef __class__
@ -126,24 +126,24 @@ static void convert__float__to__int32(void* _input, void* _output, size_t _nbSam
} }
airtalgo::FormatUpdate::FormatUpdate() : drain::FormatUpdate::FormatUpdate() :
m_functionConvert(nullptr) { m_functionConvert(nullptr) {
} }
void airtalgo::FormatUpdate::init() { void drain::FormatUpdate::init() {
airtalgo::Algo::init(); drain::Algo::init();
m_type = "FormatUpdate"; m_type = "FormatUpdate";
} }
std::shared_ptr<airtalgo::FormatUpdate> airtalgo::FormatUpdate::create() { std::shared_ptr<drain::FormatUpdate> drain::FormatUpdate::create() {
std::shared_ptr<airtalgo::FormatUpdate> tmp(new airtalgo::FormatUpdate()); std::shared_ptr<drain::FormatUpdate> tmp(new drain::FormatUpdate());
tmp->init(); tmp->init();
return tmp; return tmp;
} }
void airtalgo::FormatUpdate::configurationChange() { void drain::FormatUpdate::configurationChange() {
airtalgo::Algo::configurationChange(); drain::Algo::configurationChange();
if (m_input.getMap() != m_output.getMap()) { if (m_input.getMap() != m_output.getMap()) {
AIRTALGO_ERROR("can not support Map Change ..."); AIRTALGO_ERROR("can not support Map Change ...");
m_needProcess = false; m_needProcess = false;
@ -243,12 +243,12 @@ void airtalgo::FormatUpdate::configurationChange() {
} }
bool airtalgo::FormatUpdate::process(std::chrono::system_clock::time_point& _time, bool drain::FormatUpdate::process(std::chrono::system_clock::time_point& _time,
void* _input, void* _input,
size_t _inputNbChunk, size_t _inputNbChunk,
void*& _output, void*& _output,
size_t& _outputNbChunk) { size_t& _outputNbChunk) {
airtalgo::AutoLogInOut tmpLog("FormatUpdate"); drain::AutoLogInOut tmpLog("FormatUpdate");
// chack if we need to process: // chack if we need to process:
if (m_needProcess == false) { if (m_needProcess == false) {
_output = _input; _output = _input;

View File

@ -6,9 +6,9 @@
#ifndef __AIRT_ALGO_FORMAT_UPDATE_H__ #ifndef __AIRT_ALGO_FORMAT_UPDATE_H__
#define __AIRT_ALGO_FORMAT_UPDATE_H__ #define __AIRT_ALGO_FORMAT_UPDATE_H__
#include <airtalgo/Algo.h> #include <drain/Algo.h>
namespace airtalgo { namespace drain {
class FormatUpdate : public Algo { class FormatUpdate : public Algo {
protected: protected:
/** /**

View File

@ -11,7 +11,7 @@
#define __class__ "IOFormatInterface" #define __class__ "IOFormatInterface"
std::ostream& airtalgo::operator <<(std::ostream& _os, const IOFormatInterface& _obj) { std::ostream& drain::operator <<(std::ostream& _os, const IOFormatInterface& _obj) {
_os << "{"; _os << "{";
if (_obj.getConfigured() == false) { if (_obj.getConfigured() == false) {
_os << "Not configured"; _os << "Not configured";
@ -24,7 +24,7 @@ std::ostream& airtalgo::operator <<(std::ostream& _os, const IOFormatInterface&
return _os; return _os;
} }
airtalgo::IOFormatInterface::IOFormatInterface() : drain::IOFormatInterface::IOFormatInterface() :
m_configured(false), m_configured(false),
m_format(audio::format_unknow), m_format(audio::format_unknow),
m_map(), m_map(),
@ -33,7 +33,7 @@ airtalgo::IOFormatInterface::IOFormatInterface() :
m_map.push_back(audio::channel_frontRight); m_map.push_back(audio::channel_frontRight);
} }
airtalgo::IOFormatInterface::IOFormatInterface(std::vector<audio::channel> _map, audio::format _format, float _frequency) : drain::IOFormatInterface::IOFormatInterface(std::vector<audio::channel> _map, audio::format _format, float _frequency) :
m_configured(true), m_configured(true),
m_format(_format), m_format(_format),
m_map(_map), m_map(_map),
@ -41,7 +41,7 @@ airtalgo::IOFormatInterface::IOFormatInterface(std::vector<audio::channel> _map,
} }
void airtalgo::IOFormatInterface::set(std::vector<audio::channel> _map, audio::format _format, float _frequency) { void drain::IOFormatInterface::set(std::vector<audio::channel> _map, audio::format _format, float _frequency) {
bool hasChange = false; bool hasChange = false;
if (m_map != _map) { if (m_map != _map) {
m_map = _map; m_map = _map;
@ -61,19 +61,19 @@ void airtalgo::IOFormatInterface::set(std::vector<audio::channel> _map, audio::f
} }
} }
void airtalgo::IOFormatInterface::setConfigured(bool _value) { void drain::IOFormatInterface::setConfigured(bool _value) {
m_configured = _value; m_configured = _value;
} }
bool airtalgo::IOFormatInterface::getConfigured() const { bool drain::IOFormatInterface::getConfigured() const {
return m_configured; return m_configured;
} }
audio::format airtalgo::IOFormatInterface::getFormat() const { audio::format drain::IOFormatInterface::getFormat() const {
return m_format; return m_format;
} }
void airtalgo::IOFormatInterface::setFormat(audio::format _value) { void drain::IOFormatInterface::setFormat(audio::format _value) {
if (m_format == _value) { if (m_format == _value) {
return; return;
} }
@ -82,11 +82,11 @@ void airtalgo::IOFormatInterface::setFormat(audio::format _value) {
configurationChange(); configurationChange();
} }
const std::vector<audio::channel>& airtalgo::IOFormatInterface::getMap() const{ const std::vector<audio::channel>& drain::IOFormatInterface::getMap() const{
return m_map; return m_map;
} }
void airtalgo::IOFormatInterface::setMap(const std::vector<audio::channel>& _value) { void drain::IOFormatInterface::setMap(const std::vector<audio::channel>& _value) {
if (m_map == _value) { if (m_map == _value) {
return; return;
} }
@ -95,11 +95,11 @@ void airtalgo::IOFormatInterface::setMap(const std::vector<audio::channel>& _val
configurationChange(); configurationChange();
} }
float airtalgo::IOFormatInterface::getFrequency() const{ float drain::IOFormatInterface::getFrequency() const{
return m_frequency; return m_frequency;
} }
void airtalgo::IOFormatInterface::setFrequency(float _value) { void drain::IOFormatInterface::setFrequency(float _value) {
if (m_frequency == _value) { if (m_frequency == _value) {
return; return;
} }
@ -108,12 +108,12 @@ void airtalgo::IOFormatInterface::setFrequency(float _value) {
configurationChange(); configurationChange();
} }
void airtalgo::IOFormatInterface::configurationChange() { void drain::IOFormatInterface::configurationChange() {
if (m_ioChangeFunctor != nullptr) { if (m_ioChangeFunctor != nullptr) {
m_ioChangeFunctor(); m_ioChangeFunctor();
} }
} }
void airtalgo::IOFormatInterface::setCallback(const std::function<void()>& _functor) { void drain::IOFormatInterface::setCallback(const std::function<void()>& _functor) {
m_ioChangeFunctor = _functor; m_ioChangeFunctor = _functor;
} }

View File

@ -19,7 +19,7 @@
#include "AutoLogInOut.h" #include "AutoLogInOut.h"
#include "debug.h" #include "debug.h"
namespace airtalgo{ namespace drain{
class IOFormatInterface { class IOFormatInterface {
public: public:
IOFormatInterface(); IOFormatInterface();

View File

@ -11,26 +11,26 @@
#include <stdint.h> #include <stdint.h>
#include <audio/format.h> #include <audio/format.h>
#include <audio/channel.h> #include <audio/channel.h>
#include <airtalgo/Process.h> #include <drain/Process.h>
#include <airtalgo/ChannelReorder.h> #include <drain/ChannelReorder.h>
#include <airtalgo/FormatUpdate.h> #include <drain/FormatUpdate.h>
#include <airtalgo/Resampler.h> #include <drain/Resampler.h>
#include <chrono> #include <chrono>
#undef __class__ #undef __class__
#define __class__ "Process" #define __class__ "Process"
airtalgo::Process::Process() : drain::Process::Process() :
m_isConfigured(false) { m_isConfigured(false) {
} }
airtalgo::Process::~Process() { drain::Process::~Process() {
for (auto &it : m_listAlgo) { for (auto &it : m_listAlgo) {
it.reset(); it.reset();
} }
} }
bool airtalgo::Process::push(std::chrono::system_clock::time_point& _time, bool drain::Process::push(std::chrono::system_clock::time_point& _time,
void* _data, void* _data,
size_t _nbChunk) { size_t _nbChunk) {
void* out = nullptr; void* out = nullptr;
@ -40,7 +40,7 @@ bool airtalgo::Process::push(std::chrono::system_clock::time_point& _time,
return true; return true;
} }
bool airtalgo::Process::pull(std::chrono::system_clock::time_point& _time, bool drain::Process::pull(std::chrono::system_clock::time_point& _time,
void* _data, void* _data,
size_t _nbChunk, size_t _nbChunk,
size_t _chunkSize) { size_t _chunkSize) {
@ -89,7 +89,7 @@ bool airtalgo::Process::pull(std::chrono::system_clock::time_point& _time,
} }
bool airtalgo::Process::process(std::chrono::system_clock::time_point& _time, bool drain::Process::process(std::chrono::system_clock::time_point& _time,
void* _inData, void* _inData,
size_t _inNbChunk, size_t _inNbChunk,
void*& _outData, void*& _outData,
@ -111,12 +111,12 @@ bool airtalgo::Process::process(std::chrono::system_clock::time_point& _time,
return true; return true;
} }
void airtalgo::Process::pushBack(const std::shared_ptr<airtalgo::Algo>& _algo) { void drain::Process::pushBack(const std::shared_ptr<drain::Algo>& _algo) {
removeAlgoDynamic(); removeAlgoDynamic();
m_listAlgo.push_back(_algo); m_listAlgo.push_back(_algo);
} }
void airtalgo::Process::pushFront(const std::shared_ptr<airtalgo::Algo>& _algo) { void drain::Process::pushFront(const std::shared_ptr<drain::Algo>& _algo) {
removeAlgoDynamic(); removeAlgoDynamic();
m_listAlgo.insert(m_listAlgo.begin(), _algo); m_listAlgo.insert(m_listAlgo.begin(), _algo);
} }
@ -156,7 +156,7 @@ template<typename T> std::vector<T> getUnion(const std::vector<T>& _out, const s
return out; return out;
} }
void airtalgo::Process::updateInterAlgo() { void drain::Process::updateInterAlgo() {
if (m_isConfigured == true) { if (m_isConfigured == true) {
// cahin is already configured // cahin is already configured
return ; return ;
@ -202,14 +202,14 @@ void airtalgo::Process::updateInterAlgo() {
&& map.size() >= 1 && map.size() >= 1
&& format.size() >= 1) { && format.size() >= 1) {
AIRTALGO_INFO(" find 1 compatibility :{format=" << format << ",frequency=" << freq << ",map=" << map << "}"); AIRTALGO_INFO(" find 1 compatibility :{format=" << format << ",frequency=" << freq << ",map=" << map << "}");
airtalgo::IOFormatInterface tmp(map[0], format[0], freq[0]); drain::IOFormatInterface tmp(map[0], format[0], freq[0]);
m_listAlgo[iii-1]->setOutputFormat(tmp); m_listAlgo[iii-1]->setOutputFormat(tmp);
m_listAlgo[iii]->setInputFormat(tmp); m_listAlgo[iii]->setInputFormat(tmp);
continue; continue;
} }
// create mapping to transform: // create mapping to transform:
airtalgo::IOFormatInterface out; drain::IOFormatInterface out;
airtalgo::IOFormatInterface in; drain::IOFormatInterface in;
if (freq.size() > 0) { if (freq.size() > 0) {
out.setFrequency(freq[0]); out.setFrequency(freq[0]);
in.setFrequency(freq[0]); in.setFrequency(freq[0]);
@ -291,7 +291,7 @@ void airtalgo::Process::updateInterAlgo() {
if ( out.getFormat() != audio::format_int16 if ( out.getFormat() != audio::format_int16
/* && out.getFormat() != format_float */) { /* && out.getFormat() != format_float */) {
// need add a format Updater // need add a format Updater
std::shared_ptr<airtalgo::FormatUpdate> algo = airtalgo::FormatUpdate::create(); std::shared_ptr<drain::FormatUpdate> algo = drain::FormatUpdate::create();
algo->setTemporary(); algo->setTemporary();
algo->setInputFormat(out); algo->setInputFormat(out);
out.setFormat(audio::format_int16); out.setFormat(audio::format_int16);
@ -301,7 +301,7 @@ void airtalgo::Process::updateInterAlgo() {
iii++; iii++;
} }
// need add a resampler // need add a resampler
std::shared_ptr<airtalgo::Resampler> algo = airtalgo::Resampler::create(); std::shared_ptr<drain::Resampler> algo = drain::Resampler::create();
algo->setTemporary(); algo->setTemporary();
algo->setInputFormat(out); algo->setInputFormat(out);
out.setFrequency(in.getFrequency()); out.setFrequency(in.getFrequency());
@ -313,7 +313,7 @@ void airtalgo::Process::updateInterAlgo() {
} }
if (out.getMap() != in.getMap()) { if (out.getMap() != in.getMap()) {
// need add a channel Reorder // need add a channel Reorder
std::shared_ptr<airtalgo::ChannelReorder> algo = airtalgo::ChannelReorder::create(); std::shared_ptr<drain::ChannelReorder> algo = drain::ChannelReorder::create();
algo->setTemporary(); algo->setTemporary();
algo->setInputFormat(out); algo->setInputFormat(out);
out.setMap(in.getMap()); out.setMap(in.getMap());
@ -324,7 +324,7 @@ void airtalgo::Process::updateInterAlgo() {
} }
if (out.getFormat() != in.getFormat()) { if (out.getFormat() != in.getFormat()) {
// need add a format Updater // need add a format Updater
std::shared_ptr<airtalgo::FormatUpdate> algo = airtalgo::FormatUpdate::create(); std::shared_ptr<drain::FormatUpdate> algo = drain::FormatUpdate::create();
algo->setTemporary(); algo->setTemporary();
algo->setInputFormat(out); algo->setInputFormat(out);
out.setFormat(in.getFormat()); out.setFormat(in.getFormat());
@ -357,7 +357,7 @@ void airtalgo::Process::updateInterAlgo() {
//exit(-1); //exit(-1);
} }
void airtalgo::Process::removeAlgoDynamic() { void drain::Process::removeAlgoDynamic() {
if (m_isConfigured == true) { if (m_isConfigured == true) {
// chain is already unconfigured. // chain is already unconfigured.
return; return;

View File

@ -13,11 +13,11 @@
#include <stdint.h> #include <stdint.h>
#include <audio/format.h> #include <audio/format.h>
#include <audio/channel.h> #include <audio/channel.h>
#include <airtalgo/Algo.h> #include <drain/Algo.h>
#include <chrono> #include <chrono>
#include <memory> #include <memory>
namespace airtalgo{ namespace drain{
class Process { class Process {
protected: protected:
std::vector<int8_t> m_data; //!< temporary overlap output buffer (change size of the output data) std::vector<int8_t> m_data; //!< temporary overlap output buffer (change size of the output data)
@ -65,10 +65,10 @@ namespace airtalgo{
void*& _outData, void*& _outData,
size_t& _outNbChunk); size_t& _outNbChunk);
protected: protected:
std::vector<std::shared_ptr<airtalgo::Algo> > m_listAlgo; std::vector<std::shared_ptr<drain::Algo> > m_listAlgo;
public: public:
void pushBack(const std::shared_ptr<airtalgo::Algo>& _algo); void pushBack(const std::shared_ptr<drain::Algo>& _algo);
void pushFront(const std::shared_ptr<airtalgo::Algo>& _algo); void pushFront(const std::shared_ptr<drain::Algo>& _algo);
void clear() { void clear() {
m_isConfigured = false; m_isConfigured = false;
m_listAlgo.clear(); m_listAlgo.clear();

View File

@ -5,13 +5,13 @@
*/ */
#include "debug.h" #include "debug.h"
#include <airtalgo/Resampler.h> #include <drain/Resampler.h>
#include <iostream> #include <iostream>
#undef __class__ #undef __class__
#define __class__ "Resampler" #define __class__ "Resampler"
airtalgo::Resampler::Resampler() : drain::Resampler::Resampler() :
#ifdef HAVE_SPEEX_DSP_RESAMPLE #ifdef HAVE_SPEEX_DSP_RESAMPLE
m_speexResampler(nullptr), m_speexResampler(nullptr),
#endif #endif
@ -20,19 +20,19 @@ airtalgo::Resampler::Resampler() :
} }
void airtalgo::Resampler::init() { void drain::Resampler::init() {
airtalgo::Algo::init(); drain::Algo::init();
m_type = "Resampler"; m_type = "Resampler";
m_supportedFormat.push_back(audio::format_int16); m_supportedFormat.push_back(audio::format_int16);
} }
std::shared_ptr<airtalgo::Resampler> airtalgo::Resampler::create() { std::shared_ptr<drain::Resampler> drain::Resampler::create() {
std::shared_ptr<airtalgo::Resampler> tmp(new airtalgo::Resampler()); std::shared_ptr<drain::Resampler> tmp(new drain::Resampler());
tmp->init(); tmp->init();
return tmp; return tmp;
} }
airtalgo::Resampler::~Resampler() { drain::Resampler::~Resampler() {
#ifdef HAVE_SPEEX_DSP_RESAMPLE #ifdef HAVE_SPEEX_DSP_RESAMPLE
if (m_speexResampler != nullptr) { if (m_speexResampler != nullptr) {
speex_resampler_destroy(m_speexResampler); speex_resampler_destroy(m_speexResampler);
@ -41,8 +41,8 @@ airtalgo::Resampler::~Resampler() {
#endif #endif
} }
void airtalgo::Resampler::configurationChange() { void drain::Resampler::configurationChange() {
airtalgo::Algo::configurationChange(); drain::Algo::configurationChange();
if (m_input.getFormat() != m_output.getFormat()) { if (m_input.getFormat() != m_output.getFormat()) {
AIRTALGO_ERROR("can not support Format Change ..."); AIRTALGO_ERROR("can not support Format Change ...");
m_needProcess = false; m_needProcess = false;
@ -78,12 +78,12 @@ void airtalgo::Resampler::configurationChange() {
} }
bool airtalgo::Resampler::process(std::chrono::system_clock::time_point& _time, bool drain::Resampler::process(std::chrono::system_clock::time_point& _time,
void* _input, void* _input,
size_t _inputNbChunk, size_t _inputNbChunk,
void*& _output, void*& _output,
size_t& _outputNbChunk) { size_t& _outputNbChunk) {
airtalgo::AutoLogInOut tmpLog("Resampler"); drain::AutoLogInOut tmpLog("Resampler");
_outputNbChunk = 2048; _outputNbChunk = 2048;
// chack if we need to process: // chack if we need to process:
if (m_needProcess == false) { if (m_needProcess == false) {

View File

@ -7,13 +7,13 @@
#ifndef __AIRT_ALGO_RESAMPLER_H__ #ifndef __AIRT_ALGO_RESAMPLER_H__
#define __AIRT_ALGO_RESAMPLER_H__ #define __AIRT_ALGO_RESAMPLER_H__
#include <airtalgo/Algo.h> #include <drain/Algo.h>
#ifdef HAVE_SPEEX_DSP_RESAMPLE #ifdef HAVE_SPEEX_DSP_RESAMPLE
#include <speex/speex_resampler.h> #include <speex/speex_resampler.h>
#endif #endif
#include <memory> #include <memory>
namespace airtalgo { namespace drain {
class Resampler : public Algo { class Resampler : public Algo {
private: private:
#ifdef HAVE_SPEEX_DSP_RESAMPLE #ifdef HAVE_SPEEX_DSP_RESAMPLE

View File

@ -5,32 +5,32 @@
*/ */
#include "debug.h" #include "debug.h"
#include <airtalgo/Volume.h> #include <drain/Volume.h>
#include <iostream> #include <iostream>
#undef __class__ #undef __class__
#define __class__ "Volume" #define __class__ "Volume"
airtalgo::Volume::Volume() : drain::Volume::Volume() :
m_volumeAppli(1.0f), m_volumeAppli(1.0f),
m_functionConvert(nullptr) { m_functionConvert(nullptr) {
} }
void airtalgo::Volume::init() { void drain::Volume::init() {
airtalgo::Algo::init(); drain::Algo::init();
m_type = "Volume"; m_type = "Volume";
m_supportedFormat.push_back(audio::format_int16); m_supportedFormat.push_back(audio::format_int16);
m_supportedFormat.push_back(audio::format_int16_on_int32); m_supportedFormat.push_back(audio::format_int16_on_int32);
} }
std::shared_ptr<airtalgo::Volume> airtalgo::Volume::create() { std::shared_ptr<drain::Volume> drain::Volume::create() {
std::shared_ptr<airtalgo::Volume> tmp(new airtalgo::Volume()); std::shared_ptr<drain::Volume> tmp(new drain::Volume());
tmp->init(); tmp->init();
return tmp; return tmp;
} }
airtalgo::Volume::~Volume() { drain::Volume::~Volume() {
} }
@ -86,8 +86,8 @@ static void convert__float__to__float(void* _input, void* _output, size_t _nbSam
} }
} }
void airtalgo::Volume::configurationChange() { void drain::Volume::configurationChange() {
airtalgo::Algo::configurationChange(); drain::Algo::configurationChange();
switch (m_input.getFormat()) { switch (m_input.getFormat()) {
default: default:
case audio::format_int16: case audio::format_int16:
@ -151,7 +151,7 @@ void airtalgo::Volume::configurationChange() {
volumeChange(); volumeChange();
} }
void airtalgo::Volume::volumeChange() { void drain::Volume::volumeChange() {
//m_volumeAppli = 20 * log(m_volumedB); //m_volumeAppli = 20 * log(m_volumedB);
float volumedB = 0.0f; float volumedB = 0.0f;
for (auto &it : m_volumeList) { for (auto &it : m_volumeList) {
@ -268,7 +268,7 @@ void airtalgo::Volume::volumeChange() {
} }
std::vector<audio::format> airtalgo::Volume::getFormatSupportedInput() { std::vector<audio::format> drain::Volume::getFormatSupportedInput() {
std::vector<audio::format> tmp; std::vector<audio::format> tmp;
if (m_output.getFormat() == audio::format_float) { if (m_output.getFormat() == audio::format_float) {
tmp.push_back(audio::format_float); tmp.push_back(audio::format_float);
@ -283,7 +283,7 @@ std::vector<audio::format> airtalgo::Volume::getFormatSupportedInput() {
return tmp; return tmp;
}; };
std::vector<audio::format> airtalgo::Volume::getFormatSupportedOutput() { std::vector<audio::format> drain::Volume::getFormatSupportedOutput() {
std::vector<audio::format> tmp; std::vector<audio::format> tmp;
if (m_input.getFormat() == audio::format_float) { if (m_input.getFormat() == audio::format_float) {
tmp.push_back(audio::format_float); tmp.push_back(audio::format_float);
@ -299,12 +299,12 @@ std::vector<audio::format> airtalgo::Volume::getFormatSupportedOutput() {
}; };
bool airtalgo::Volume::process(std::chrono::system_clock::time_point& _time, bool drain::Volume::process(std::chrono::system_clock::time_point& _time,
void* _input, void* _input,
size_t _inputNbChunk, size_t _inputNbChunk,
void*& _output, void*& _output,
size_t& _outputNbChunk) { size_t& _outputNbChunk) {
airtalgo::AutoLogInOut tmpLog("Volume"); drain::AutoLogInOut tmpLog("Volume");
// chack if we need to process: // chack if we need to process:
if (m_needProcess == false) { if (m_needProcess == false) {
_output = _input; _output = _input;
@ -329,7 +329,7 @@ bool airtalgo::Volume::process(std::chrono::system_clock::time_point& _time,
return true; return true;
} }
void airtalgo::Volume::addVolumeStage(const std::shared_ptr<VolumeElement>& _volume) { void drain::Volume::addVolumeStage(const std::shared_ptr<VolumeElement>& _volume) {
if (_volume == nullptr) { if (_volume == nullptr) {
return; return;
} }
@ -349,7 +349,7 @@ void airtalgo::Volume::addVolumeStage(const std::shared_ptr<VolumeElement>& _vol
volumeChange(); volumeChange();
} }
bool airtalgo::Volume::setParameter(const std::string& _parameter, const std::string& _value) { bool drain::Volume::setParameter(const std::string& _parameter, const std::string& _value) {
if (_parameter == "FLOW") { if (_parameter == "FLOW") {
// set Volume ... // set Volume ...
for (auto &it : m_volumeList) { for (auto &it : m_volumeList) {
@ -377,7 +377,7 @@ bool airtalgo::Volume::setParameter(const std::string& _parameter, const std::st
return false; return false;
} }
std::string airtalgo::Volume::getParameter(const std::string& _parameter) const { std::string drain::Volume::getParameter(const std::string& _parameter) const {
if (_parameter == "FLOW") { if (_parameter == "FLOW") {
// set Volume ... // set Volume ...
for (auto &it : m_volumeList) { for (auto &it : m_volumeList) {
@ -393,7 +393,7 @@ std::string airtalgo::Volume::getParameter(const std::string& _parameter) const
return "[ERROR]"; return "[ERROR]";
} }
std::string airtalgo::Volume::getParameterProperty(const std::string& _parameter) const { std::string drain::Volume::getParameterProperty(const std::string& _parameter) const {
if (_parameter == "FLOW") { if (_parameter == "FLOW") {
// set Volume ... // set Volume ...
for (auto &it : m_volumeList) { for (auto &it : m_volumeList) {

View File

@ -7,13 +7,13 @@
#ifndef __AIRT_ALGO_VOLUME_H__ #ifndef __AIRT_ALGO_VOLUME_H__
#define __AIRT_ALGO_VOLUME_H__ #define __AIRT_ALGO_VOLUME_H__
#include <airtalgo/Algo.h> #include <drain/Algo.h>
#ifdef HAVE_SPEEX_DSP_RESAMPLE #ifdef HAVE_SPEEX_DSP_RESAMPLE
#include <speex/speex_resampler.h> #include <speex/speex_resampler.h>
#endif #endif
#include <memory> #include <memory>
namespace airtalgo { namespace drain {
// data structure. // data structure.
class VolumeElement { class VolumeElement {
public: public:
@ -45,7 +45,7 @@ namespace airtalgo {
// TODO: Manage set volume // TODO: Manage set volume
class Volume : public Algo { class Volume : public Algo {
private: private:
std::vector<std::shared_ptr<airtalgo::VolumeElement>> m_volumeList; std::vector<std::shared_ptr<drain::VolumeElement>> m_volumeList;
// for float input : // for float input :
float m_volumeAppli; float m_volumeAppli;
// for integer input : // for integer input :
@ -77,7 +77,7 @@ namespace airtalgo {
virtual std::vector<audio::format> getFormatSupportedInput(); virtual std::vector<audio::format> getFormatSupportedInput();
virtual std::vector<audio::format> getFormatSupportedOutput(); virtual std::vector<audio::format> getFormatSupportedOutput();
public: public:
virtual void addVolumeStage(const std::shared_ptr<airtalgo::VolumeElement>& _volume); virtual void addVolumeStage(const std::shared_ptr<drain::VolumeElement>& _volume);
virtual bool setParameter(const std::string& _parameter, const std::string& _value); virtual bool setParameter(const std::string& _parameter, const std::string& _value);
virtual std::string getParameter(const std::string& _parameter) const; virtual std::string getParameter(const std::string& _parameter) const;
virtual std::string getParameterProperty(const std::string& _parameter) const; virtual std::string getParameterProperty(const std::string& _parameter) const;

View File

@ -9,10 +9,10 @@
#include <string> #include <string>
#include <audio/format.h> #include <audio/format.h>
#include <airtalgo/channel.h> #include <drain/channel.h>
#include <chrono> #include <chrono>
namespace airtalgo { namespace drain {
/** /**
* @brief Init the instance af algorithm (add all internal factory) * @brief Init the instance af algorithm (add all internal factory)
*/ */
@ -26,13 +26,13 @@ namespace airtalgo {
* @param[in] _name Name of the Algorithm. * @param[in] _name Name of the Algorithm.
* @return Instanciate algorithm * @return Instanciate algorithm
*/ */
airtalgo::Algo* createAlgo(const std::string& _name); drain::Algo* createAlgo(const std::string& _name);
/** /**
* @brief Add a Factory Algorithm in the internal List (static for all instance) * @brief Add a Factory Algorithm in the internal List (static for all instance)
* @param[in] _name Name of the Algorithm. * @param[in] _name Name of the Algorithm.
* @param[in] _functor Function of the factory * @param[in] _functor Function of the factory
*/ */
void addAlgoFactory(const std::string& _name, std::function<airtalgo::Algo*(void)> _functor); void addAlgoFactory(const std::string& _name, std::function<drain::Algo*(void)> _functor);
/** /**
* @brief Remove a Factory Algorithm in the internal List (static for all instance) * @brief Remove a Factory Algorithm in the internal List (static for all instance)
* @param[in] _name Name of the Algorithm. * @param[in] _name Name of the Algorithm.

View File

@ -4,10 +4,10 @@
* @license APACHE v2.0 (see license file) * @license APACHE v2.0 (see license file)
*/ */
#include <airtalgo/debug.h> #include <drain/debug.h>
int32_t airtalgo::getLogId() { int32_t drain::getLogId() {
static int32_t g_val = etk::log::registerInstance("airtalgo"); static int32_t g_val = etk::log::registerInstance("drain");
return g_val; return g_val;
} }

View File

@ -9,17 +9,17 @@
#include <etk/log.h> #include <etk/log.h>
namespace airtalgo { namespace drain {
int32_t getLogId(); int32_t getLogId();
}; };
// TODO : Review this problem of multiple intanciation of "std::stringbuf sb" // TODO : Review this problem of multiple intanciation of "std::stringbuf sb"
#define AIRTALGO_BASE(info,data) \ #define AIRTALGO_BASE(info,data) \
do { \ do { \
if (info <= etk::log::getLevel(airtalgo::getLogId())) { \ if (info <= etk::log::getLevel(drain::getLogId())) { \
std::stringbuf sb; \ std::stringbuf sb; \
std::ostream tmpStream(&sb); \ std::ostream tmpStream(&sb); \
tmpStream << data; \ tmpStream << data; \
etk::log::logStream(airtalgo::getLogId(), info, __LINE__, __class__, __func__, tmpStream); \ etk::log::logStream(drain::getLogId(), info, __LINE__, __class__, __func__, tmpStream); \
} \ } \
} while(0) } while(0)

View File

@ -1,45 +0,0 @@
#!/usr/bin/python
import lutinModule as module
import lutinTools as tools
import lutinDebug as debug
def get_desc():
return "airtalgo : Basic algo interface"
def create(target):
myModule = module.Module(__file__, 'airtalgo', 'LIBRARY')
myModule.add_src_file([
'airtalgo/debug.cpp',
'airtalgo/airtalgo.cpp',
'airtalgo/Algo.cpp',
'airtalgo/ChannelReorder.cpp',
'airtalgo/EndPointCallback.cpp',
'airtalgo/EndPoint.cpp',
'airtalgo/EndPointRead.cpp',
'airtalgo/EndPointWrite.cpp',
'airtalgo/FormatUpdate.cpp',
'airtalgo/Process.cpp',
'airtalgo/Resampler.cpp',
'airtalgo/Volume.cpp',
'airtalgo/IOFormatInterface.cpp',
'airtalgo/AutoLogInOut.cpp'
])
# TODO: myModule.add_optional_module_depend('speexdsp', "HAVE_SPEEX_DSP_RESAMPLE")
myModule.compile_flags_CC("-DHAVE_SPEEX_DSP_RESAMPLE")
myModule.add_module_depend(['etk', 'audio', 'speexdsp'])
myModule.add_export_path(tools.get_current_path(__file__))
# add the currrent module at the
return myModule

45
lutin_drain.py Normal file
View File

@ -0,0 +1,45 @@
#!/usr/bin/python
import lutinModule as module
import lutinTools as tools
import lutinDebug as debug
def get_desc():
return "drain : Basic audio algo interface single pipe to provess data"
def create(target):
myModule = module.Module(__file__, 'drain', 'LIBRARY')
myModule.add_src_file([
'drain/debug.cpp',
'drain/airtalgo.cpp',
'drain/Algo.cpp',
'drain/ChannelReorder.cpp',
'drain/EndPointCallback.cpp',
'drain/EndPoint.cpp',
'drain/EndPointRead.cpp',
'drain/EndPointWrite.cpp',
'drain/FormatUpdate.cpp',
'drain/Process.cpp',
'drain/Resampler.cpp',
'drain/Volume.cpp',
'drain/IOFormatInterface.cpp',
'drain/AutoLogInOut.cpp'
])
# TODO: myModule.add_optional_module_depend('speexdsp', "HAVE_SPEEX_DSP_RESAMPLE")
myModule.compile_flags_CC("-DHAVE_SPEEX_DSP_RESAMPLE")
myModule.add_module_depend(['etk', 'audio', 'speexdsp'])
myModule.add_export_path(tools.get_current_path(__file__))
# add the currrent module at the
return myModule