[DEV] end corection placeholder

This commit is contained in:
2015-02-24 23:55:28 +01:00
parent 0b50032cab
commit 94fb75709c
5 changed files with 76 additions and 88 deletions

View File

@@ -181,29 +181,21 @@ river::io::NodeAEC::NodeAEC(const std::string& _name, const std11::shared_ptr<co
// set callback mode ...
m_interfaceFeedBack->setInputCallback(std11::bind(&river::io::NodeAEC::onDataReceivedFeedBack,
this,
#if __cplusplus >= 201103L
std11::placeholders::_1,
std11::placeholders::_2,
std11::placeholders::_3,
std11::placeholders::_4,
std11::placeholders::_5,
std11::placeholders::_6));
#else
_1, _2, _3, _4, _5, _6));
#endif
// set callback mode ...
m_interfaceMicrophone->setInputCallback(std11::bind(&river::io::NodeAEC::onDataReceivedMicrophone,
this,
#if __cplusplus >= 201103L
std11::placeholders::_1,
std11::placeholders::_2,
std11::placeholders::_3,
std11::placeholders::_4,
std11::placeholders::_5,
std11::placeholders::_6));
#else
_1, _2, _3, _4, _5, _6));
#endif
m_bufferMicrophone.setCapacity(std11::chrono::milliseconds(1000),
audio::getFormatBytes(hardwareFormat.getFormat())*hardwareFormat.getMap().size(),

View File

@@ -220,28 +220,20 @@ river::io::NodeAirTAudio::NodeAirTAudio(const std::string& _name, const std11::s
hardwareFormat.getFormat(), hardwareFormat.getFrequency(), &m_rtaudioFrameSize,
std11::bind(&river::io::NodeAirTAudio::recordCallback,
this,
#if __cplusplus >= 201103L
std::placeholders::_1,
std::placeholders::_2,
std::placeholders::_5,
std::placeholders::_6)
#else
_1, _2, _5, _6)
#endif
std11::placeholders::_1,
std11::placeholders::_2,
std11::placeholders::_5,
std11::placeholders::_6)
);
} else {
err = m_adac.openStream(&params, nullptr,
hardwareFormat.getFormat(), hardwareFormat.getFrequency(), &m_rtaudioFrameSize,
std11::bind(&river::io::NodeAirTAudio::playbackCallback,
this,
#if __cplusplus >= 201103L
std::placeholders::_3,
std::placeholders::_4,
std::placeholders::_5,
std::placeholders::_6)
#else
_3, _4, _5, _6)
#endif
std11::placeholders::_3,
std11::placeholders::_4,
std11::placeholders::_5,
std11::placeholders::_6)
);
}
if (err != airtaudio::error_none) {

View File

@@ -4,7 +4,7 @@
* @license APACHE v2.0 (see license file)
*/
#ifdef __PORTTAUDIO_INFERFACE__
#ifdef __PORTAUDIO_INFERFACE__
#include <river/io/NodePortAudio.h>
#include <river/debug.h>
@@ -30,7 +30,7 @@ static std::string asString(const std11::chrono::system_clock::time_point& tp) {
namespace std {
static std::ostream& operator <<(std::ostream& _os, const std11::chrono::system_clock::time_point& _obj) {
std11::chrono::microseconds us = std11::chrono::duration_cast<std::chrono::microseconds>(_obj.time_since_epoch());
std11::chrono::microseconds us = std11::chrono::duration_cast<std11::chrono::microseconds>(_obj.time_since_epoch());
_os << us.count();
return _os;
}
@@ -45,10 +45,10 @@ static int portAudioStreamCallback(const void *_input,
river::io::NodePortAudio* myClass = reinterpret_cast<river::io::NodePortAudio*>(_userData);
int64_t sec = int64_t(_timeInfo->inputBufferAdcTime);
int64_t nsec = (_timeInfo->inputBufferAdcTime-double(sec))*1000000000LL;
std11::chrono::system_clock::time_point timeInput = std11::chrono::system_clock::from_time_t(sec) + std::chrono::nanoseconds(nsec);
std11::chrono::system_clock::time_point timeInput = std11::chrono::system_clock::from_time_t(sec) + std11::chrono::nanoseconds(nsec);
sec = int64_t(_timeInfo->outputBufferDacTime);
nsec = (_timeInfo->outputBufferDacTime-double(sec))*1000000000LL;
std11::chrono::system_clock::time_point timeOutput = std11::chrono::system_clock::from_time_t(sec) + std::chrono::nanoseconds(nsec);
std11::chrono::system_clock::time_point timeOutput = std11::chrono::system_clock::from_time_t(sec) + std11::chrono::nanoseconds(nsec);
return myClass->duplexCallback(_input,
timeInput,
_output,

View File

@@ -7,7 +7,7 @@
#ifndef __RIVER_IO_NODE_PORTAUDIO_H__
#define __RIVER_IO_NODE_PORTAUDIO_H__
#ifdef __PORTTAUDIO_INFERFACE__
#ifdef __PORTAUDIO_INFERFACE__
#include <river/Interface.h>
#include <river/io/Node.h>