diff --git a/src/lasp/device/lasp_streammgr.cpp b/src/lasp/device/lasp_streammgr.cpp index e2714d4..dea3662 100644 --- a/src/lasp/device/lasp_streammgr.cpp +++ b/src/lasp/device/lasp_streammgr.cpp @@ -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(); } }