[DEV] update new orchestra modification
This commit is contained in:
parent
63fb66d045
commit
50dcfaff82
@ -53,7 +53,7 @@ void audio::river::io::Group::createFrom(const ejson::Document& _obj, const std:
|
|||||||
for (size_t iii=1; iii<m_list.size(); ++iii) {
|
for (size_t iii=1; iii<m_list.size(); ++iii) {
|
||||||
if (m_list[iii] != nullptr) {
|
if (m_list[iii] != nullptr) {
|
||||||
std11::shared_ptr<audio::river::io::NodeOrchestra> link = std11::dynamic_pointer_cast<audio::river::io::NodeOrchestra>(m_list[iii]);
|
std11::shared_ptr<audio::river::io::NodeOrchestra> link = std11::dynamic_pointer_cast<audio::river::io::NodeOrchestra>(m_list[iii]);
|
||||||
linkRef->m_adac.isMasterOf(link->m_adac);
|
linkRef->m_interface.isMasterOf(link->m_interface);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -52,14 +52,16 @@ audio::river::io::NodeOrchestra::NodeOrchestra(const std::string& _name, const s
|
|||||||
},
|
},
|
||||||
nb-chunk:1024 # number of chunk to open device (create the latency anf the frequency to call user)
|
nb-chunk:1024 # number of chunk to open device (create the latency anf the frequency to call user)
|
||||||
*/
|
*/
|
||||||
enum audio::orchestra::type typeInterface = audio::orchestra::type_undefined;
|
std::string typeInterface = audio::orchestra::type_undefined;
|
||||||
std::string streamName = "default";
|
std::string streamName = "default";
|
||||||
const std11::shared_ptr<const ejson::Object> tmpObject = m_config->getObject("map-on");
|
const std11::shared_ptr<const ejson::Object> tmpObject = m_config->getObject("map-on");
|
||||||
if (tmpObject == nullptr) {
|
if (tmpObject == nullptr) {
|
||||||
RIVER_WARNING("missing node : 'map-on' ==> auto map : 'auto:default'");
|
RIVER_WARNING("missing node : 'map-on' ==> auto map : 'auto:default'");
|
||||||
} else {
|
} else {
|
||||||
std::string value = tmpObject->getStringValue("interface", "default");
|
typeInterface = tmpObject->getStringValue("interface", audio::orchestra::type_undefined);
|
||||||
typeInterface = audio::orchestra::getTypeFromString(value);
|
if (typeInterface == "auto") {
|
||||||
|
typeInterface = audio::orchestra::type_undefined;
|
||||||
|
}
|
||||||
streamName = tmpObject->getStringValue("name", "default");
|
streamName = tmpObject->getStringValue("name", "default");
|
||||||
}
|
}
|
||||||
int32_t nbChunk = m_config->getNumberValue("nb-chunk", 1024);
|
int32_t nbChunk = m_config->getNumberValue("nb-chunk", 1024);
|
||||||
@ -183,14 +185,8 @@ audio::river::io::NodeOrchestra::NodeOrchestra(const std::string& _name, const s
|
|||||||
params.deviceId = deviceId;
|
params.deviceId = deviceId;
|
||||||
params.deviceName = streamName;
|
params.deviceName = streamName;
|
||||||
params.nChannels = hardwareFormat.getMap().size();
|
params.nChannels = hardwareFormat.getMap().size();
|
||||||
if (m_isInput == true) {
|
if (m_info.channels.size() < params.nChannels) {
|
||||||
if (m_info.inputChannels < params.nChannels) {
|
RIVER_CRITICAL("Can not open hardware device with more channel (" << params.nChannels << ") that is autorized by hardware (" << m_info.channels.size() << ").");
|
||||||
RIVER_CRITICAL("Can not open hardware device with more channel (" << params.nChannels << ") that is autorized by hardware (" << m_info.inputChannels << ").");
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (m_info.outputChannels < params.nChannels) {
|
|
||||||
RIVER_CRITICAL("Can not open hardware device with more channel (" << params.nChannels << ") that is autorized by hardware (" << m_info.inputChannels << ").");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
audio::orchestra::StreamOptions option;
|
audio::orchestra::StreamOptions option;
|
||||||
etk::from_string(option.mode, tmpObject->getStringValue("timestamp-mode", "soft"));
|
etk::from_string(option.mode, tmpObject->getStringValue("timestamp-mode", "soft"));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user