[DEV] rework test with new API
This commit is contained in:
@@ -35,6 +35,7 @@ river::io::Node::Node(const std::string& _name, const std11::shared_ptr<const ej
|
||||
mux-demux-type:"int16_on_int32",
|
||||
*/
|
||||
std::string interfaceType = m_config->getStringValue("io");
|
||||
RIVER_INFO("interfaceType=" << interfaceType);
|
||||
if ( interfaceType == "input"
|
||||
|| interfaceType == "PAinput"
|
||||
|| interfaceType == "aec"
|
||||
@@ -72,7 +73,12 @@ river::io::Node::Node(const std::string& _name, const std11::shared_ptr<const ej
|
||||
hardwareFormat.set(map, formatType, frequency);
|
||||
|
||||
|
||||
std::string muxerDemuxerConfig = m_config->getStringValue("mux-demux-type", "int16-on-int32");
|
||||
std::string muxerDemuxerConfig;
|
||||
if (m_isInput == true) {
|
||||
muxerDemuxerConfig = m_config->getStringValue("mux-demux-type", "int16");
|
||||
} else {
|
||||
muxerDemuxerConfig = m_config->getStringValue("mux-demux-type", "int16-on-int32");
|
||||
}
|
||||
enum audio::format muxerFormatType = audio::getFormatFromString(muxerDemuxerConfig);
|
||||
if (m_isInput == true) {
|
||||
if (muxerFormatType != audio::format_int16) {
|
||||
|
@@ -220,10 +220,15 @@ river::io::NodeAirTAudio::NodeAirTAudio(const std::string& _name, const std11::s
|
||||
airtaudio::StreamOptions option;
|
||||
etk::from_string(option.mode, tmpObject->getStringValue("timestamp-mode", "soft"));
|
||||
|
||||
RIVER_DEBUG("interfaceFormat=" << interfaceFormat);
|
||||
RIVER_DEBUG("hardwareFormat=" << hardwareFormat);
|
||||
|
||||
m_rtaudioFrameSize = nbChunk;
|
||||
RIVER_INFO("Open output stream nbChannels=" << params.nChannels);
|
||||
enum airtaudio::error err = airtaudio::error_none;
|
||||
if (m_isInput == true) {
|
||||
m_process.setInputConfig(hardwareFormat);
|
||||
m_process.setOutputConfig(interfaceFormat);
|
||||
err = m_adac.openStream(nullptr, ¶ms,
|
||||
hardwareFormat.getFormat(), hardwareFormat.getFrequency(), &m_rtaudioFrameSize,
|
||||
std11::bind(&river::io::NodeAirTAudio::recordCallback,
|
||||
@@ -235,6 +240,8 @@ river::io::NodeAirTAudio::NodeAirTAudio(const std::string& _name, const std11::s
|
||||
option
|
||||
);
|
||||
} else {
|
||||
m_process.setInputConfig(interfaceFormat);
|
||||
m_process.setOutputConfig(hardwareFormat);
|
||||
err = m_adac.openStream(¶ms, nullptr,
|
||||
hardwareFormat.getFormat(), hardwareFormat.getFrequency(), &m_rtaudioFrameSize,
|
||||
std11::bind(&river::io::NodeAirTAudio::playbackCallback,
|
||||
|
Reference in New Issue
Block a user