From 6bda124196ef363cb65dbe59d5cc399f044776de Mon Sep 17 00:00:00 2001 From: "J.A. de Jong - Redu-Sone B.V., ASCEE V.O.F" Date: Tue, 6 Feb 2024 15:02:25 +0100 Subject: [PATCH] Allow duplex mode for PortAudio ALSA devices --- cpp_src/device/portaudio/lasp_portaudiodaq.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/cpp_src/device/portaudio/lasp_portaudiodaq.cpp b/cpp_src/device/portaudio/lasp_portaudiodaq.cpp index 36f0b30..853bb0f 100644 --- a/cpp_src/device/portaudio/lasp_portaudiodaq.cpp +++ b/cpp_src/device/portaudio/lasp_portaudiodaq.cpp @@ -137,6 +137,9 @@ void fillPortAudioDeviceInfo(DeviceInfoList &devinfolist) { d.ninchannels = deviceInfo->maxInputChannels; d.noutchannels = deviceInfo->maxOutputChannels; + // Duplex mode, only for ALSA devices + d.hasDuplexMode = hasDuplexMode; + devinfolist.push_back(std::make_unique(d)); } } @@ -349,13 +352,6 @@ void PortAudioDaq::start(InDaqCallback inCallback, OutDaqCallback outCallback) { throw rte("Stream is already running"); } - // Logical XOR - if (inCallback && outCallback) { - throw rte( - "Either input or output stream possible for PortAudio. " - "Stream duplex mode not provided."); - } - if (neninchannels() > 0) { if (!inCallback) { throw rte(