[DEV] update of external of elog and ethread
This commit is contained in:
@@ -17,7 +17,7 @@ int32_t audio::river::io::NodeOrchestra::recordCallback(const void* _inputBuffer
|
||||
const audio::Time& _timeInput,
|
||||
uint32_t _nbChunk,
|
||||
const std::vector<audio::orchestra::status>& _status) {
|
||||
std11::unique_lock<std11::mutex> lock(m_mutex);
|
||||
std::unique_lock<std::mutex> lock(m_mutex);
|
||||
// TODO : Manage status ...
|
||||
RIVER_VERBOSE("data Input size request :" << _nbChunk << " [BEGIN] status=" << _status << " nbIO=" << m_list.size());
|
||||
newInput(_inputBuffer, _nbChunk, _timeInput);
|
||||
@@ -28,7 +28,7 @@ int32_t audio::river::io::NodeOrchestra::playbackCallback(void* _outputBuffer,
|
||||
const audio::Time& _timeOutput,
|
||||
uint32_t _nbChunk,
|
||||
const std::vector<audio::orchestra::status>& _status) {
|
||||
std11::unique_lock<std11::mutex> lock(m_mutex);
|
||||
std::unique_lock<std::mutex> lock(m_mutex);
|
||||
// TODO : Manage status ...
|
||||
RIVER_VERBOSE("data Output size request :" << _nbChunk << " [BEGIN] status=" << _status << " nbIO=" << m_list.size());
|
||||
newOutput(_outputBuffer, _nbChunk, _timeOutput);
|
||||
@@ -37,11 +37,11 @@ int32_t audio::river::io::NodeOrchestra::playbackCallback(void* _outputBuffer,
|
||||
|
||||
|
||||
|
||||
std11::shared_ptr<audio::river::io::NodeOrchestra> audio::river::io::NodeOrchestra::create(const std::string& _name, const std11::shared_ptr<const ejson::Object>& _config) {
|
||||
return std11::shared_ptr<audio::river::io::NodeOrchestra>(new audio::river::io::NodeOrchestra(_name, _config));
|
||||
std::shared_ptr<audio::river::io::NodeOrchestra> audio::river::io::NodeOrchestra::create(const std::string& _name, const std::shared_ptr<const ejson::Object>& _config) {
|
||||
return std::shared_ptr<audio::river::io::NodeOrchestra>(new audio::river::io::NodeOrchestra(_name, _config));
|
||||
}
|
||||
|
||||
audio::river::io::NodeOrchestra::NodeOrchestra(const std::string& _name, const std11::shared_ptr<const ejson::Object>& _config) :
|
||||
audio::river::io::NodeOrchestra::NodeOrchestra(const std::string& _name, const std::shared_ptr<const ejson::Object>& _config) :
|
||||
Node(_name, _config) {
|
||||
audio::drain::IOFormatInterface interfaceFormat = getInterfaceFormat();
|
||||
audio::drain::IOFormatInterface hardwareFormat = getHarwareFormat();
|
||||
@@ -54,7 +54,7 @@ audio::river::io::NodeOrchestra::NodeOrchestra(const std::string& _name, const s
|
||||
*/
|
||||
std::string typeInterface = audio::orchestra::type_undefined;
|
||||
std::string streamName = "default";
|
||||
const std11::shared_ptr<const ejson::Object> tmpObject = m_config->getObject("map-on");
|
||||
const std::shared_ptr<const ejson::Object> tmpObject = m_config->getObject("map-on");
|
||||
if (tmpObject == nullptr) {
|
||||
RIVER_WARNING("missing node : 'map-on' ==> auto map : 'auto:default'");
|
||||
} else {
|
||||
@@ -202,12 +202,12 @@ audio::river::io::NodeOrchestra::NodeOrchestra(const std::string& _name, const s
|
||||
m_process.setOutputConfig(interfaceFormat);
|
||||
err = m_interface.openStream(nullptr, ¶ms,
|
||||
hardwareFormat.getFormat(), hardwareFormat.getFrequency(), &m_rtaudioFrameSize,
|
||||
std11::bind(&audio::river::io::NodeOrchestra::recordCallback,
|
||||
std::bind(&audio::river::io::NodeOrchestra::recordCallback,
|
||||
this,
|
||||
std11::placeholders::_1,
|
||||
std11::placeholders::_2,
|
||||
std11::placeholders::_5,
|
||||
std11::placeholders::_6),
|
||||
std::placeholders::_1,
|
||||
std::placeholders::_2,
|
||||
std::placeholders::_5,
|
||||
std::placeholders::_6),
|
||||
option
|
||||
);
|
||||
} else {
|
||||
@@ -215,12 +215,12 @@ audio::river::io::NodeOrchestra::NodeOrchestra(const std::string& _name, const s
|
||||
m_process.setOutputConfig(hardwareFormat);
|
||||
err = m_interface.openStream(¶ms, nullptr,
|
||||
hardwareFormat.getFormat(), hardwareFormat.getFrequency(), &m_rtaudioFrameSize,
|
||||
std11::bind(&audio::river::io::NodeOrchestra::playbackCallback,
|
||||
std::bind(&audio::river::io::NodeOrchestra::playbackCallback,
|
||||
this,
|
||||
std11::placeholders::_3,
|
||||
std11::placeholders::_4,
|
||||
std11::placeholders::_5,
|
||||
std11::placeholders::_6),
|
||||
std::placeholders::_3,
|
||||
std::placeholders::_4,
|
||||
std::placeholders::_5,
|
||||
std::placeholders::_6),
|
||||
option
|
||||
);
|
||||
}
|
||||
@@ -231,7 +231,7 @@ audio::river::io::NodeOrchestra::NodeOrchestra(const std::string& _name, const s
|
||||
}
|
||||
|
||||
audio::river::io::NodeOrchestra::~NodeOrchestra() {
|
||||
std11::unique_lock<std11::mutex> lock(m_mutex);
|
||||
std::unique_lock<std::mutex> lock(m_mutex);
|
||||
RIVER_INFO("close input stream");
|
||||
if (m_interface.isStreamOpen() ) {
|
||||
m_interface.closeStream();
|
||||
@@ -239,7 +239,7 @@ audio::river::io::NodeOrchestra::~NodeOrchestra() {
|
||||
};
|
||||
|
||||
void audio::river::io::NodeOrchestra::start() {
|
||||
std11::unique_lock<std11::mutex> lock(m_mutex);
|
||||
std::unique_lock<std::mutex> lock(m_mutex);
|
||||
RIVER_INFO("Start stream : '" << m_name << "' mode=" << (m_isInput?"input":"output") );
|
||||
enum audio::orchestra::error err = m_interface.startStream();
|
||||
if (err != audio::orchestra::error_none) {
|
||||
@@ -248,7 +248,7 @@ void audio::river::io::NodeOrchestra::start() {
|
||||
}
|
||||
|
||||
void audio::river::io::NodeOrchestra::stop() {
|
||||
std11::unique_lock<std11::mutex> lock(m_mutex);
|
||||
std::unique_lock<std::mutex> lock(m_mutex);
|
||||
RIVER_INFO("Stop stream : '" << m_name << "' mode=" << (m_isInput?"input":"output") );
|
||||
enum audio::orchestra::error err = m_interface.stopStream();
|
||||
if (err != audio::orchestra::error_none) {
|
||||
|
Reference in New Issue
Block a user