Bugfix: duplex stream came on output
This commit is contained in:
parent
e274e12f82
commit
6bd03301aa
@ -240,7 +240,8 @@ void StreamMgr::startStream(const DaqConfiguration &config) {
|
||||
devinfo = *devinfo2;
|
||||
}
|
||||
|
||||
isInput |= config.monitorOutput && devinfo.hasInternalOutputMonitor;
|
||||
isInput |= (config.monitorOutput && devinfo.hasInternalOutputMonitor);
|
||||
DEBUGTRACE_PRINT(isInput);
|
||||
|
||||
bool isDuplex = isInput && isOutput;
|
||||
|
||||
@ -284,7 +285,9 @@ void StreamMgr::startStream(const DaqConfiguration &config) {
|
||||
_siggen->reset(daq->samplerate());
|
||||
}
|
||||
outCallback = std::bind(&StreamMgr::outCallback, this, _1);
|
||||
if(!isDuplex) {
|
||||
stream_placeholder = std::addressof(_outputStream);
|
||||
}
|
||||
}
|
||||
|
||||
daq->start(inCallback, outCallback);
|
||||
@ -369,10 +372,11 @@ const Daq *StreamMgr::getDaq(StreamType type) const {
|
||||
return _inputStream.get();
|
||||
} else {
|
||||
// Output stream. If input runs in duplex mode, this is also the output
|
||||
// stream. In that case, we return the outputstram
|
||||
// stream. In that case, we return the input stream
|
||||
if (_inputStream && _inputStream->duplexMode()) {
|
||||
return _inputStream.get();
|
||||
} else {
|
||||
return _outputStream.get();
|
||||
}
|
||||
return _outputStream.get();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user