From 60afface354110cbe95e4d26bc5b8279a43503ce Mon Sep 17 00:00:00 2001 From: "J.A. de Jong" Date: Sun, 17 Oct 2021 14:50:38 +0200 Subject: [PATCH] Fixed #90, and set default sample rate back to 48k --- lasp/device/lasp_cppuldaq.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lasp/device/lasp_cppuldaq.cpp b/lasp/device/lasp_cppuldaq.cpp index 2d260a2..f92837d 100644 --- a/lasp/device/lasp_cppuldaq.cpp +++ b/lasp/device/lasp_cppuldaq.cpp @@ -87,7 +87,9 @@ public: if (handle == 0) { throw runtime_error("Unable to create a handle to the specified DAQ " - "device. Is the device currently in use?"); + "device. Is the device currently in use? Please make sure to set " + "the DAQ configuration in duplex mode if simultaneous input and " + "output is required."); } err = ulConnectDaqDevice(handle); @@ -579,14 +581,14 @@ void fillUlDaqDeviceInfo(vector &devinfolist) { devinfo.availableSampleRates.push_back(50400); devinfo.availableSampleRates.push_back(51000); - devinfo.prefSampleRateIndex = 5; + devinfo.prefSampleRateIndex = 11; devinfo.availableFramesPerBlock.push_back(512); devinfo.availableFramesPerBlock.push_back(1024); devinfo.availableFramesPerBlock.push_back(2048); devinfo.availableFramesPerBlock.push_back(4096); devinfo.availableFramesPerBlock.push_back(8192); - devinfo.prefFramesPerBlockIndex = 1; + devinfo.prefFramesPerBlockIndex = 2; devinfo.availableInputRanges = {1.0, 10.0}; devinfo.prefInputRangeIndex = 0;