summaryrefslogtreecommitdiffstats
path: root/host/examples
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2013-07-19 12:43:22 -0700
committerJosh Blum <josh@joshknows.com>2013-07-19 12:43:22 -0700
commiteb3f43c5485dd264c4310417f19313bf65dc6e34 (patch)
tree09b445a4c9ee53a21101ea79865b1d614ef59984 /host/examples
parent94a810f3b95c2fcd361a41862abf5280e989eee1 (diff)
downloaduhd-eb3f43c5485dd264c4310417f19313bf65dc6e34.tar.gz
uhd-eb3f43c5485dd264c4310417f19313bf65dc6e34.tar.bz2
uhd-eb3f43c5485dd264c4310417f19313bf65dc6e34.zip
uhd: dont handle multi-chan overflow recovery here
Diffstat (limited to 'host/examples')
-rw-r--r--host/examples/benchmark_rate.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/host/examples/benchmark_rate.cpp b/host/examples/benchmark_rate.cpp
index 3a69e001b..66424c85d 100644
--- a/host/examples/benchmark_rate.cpp
+++ b/host/examples/benchmark_rate.cpp
@@ -22,11 +22,12 @@
#include <boost/program_options.hpp>
#include <boost/format.hpp>
#include <boost/thread/thread.hpp>
-#include <boost/math/special_functions/round.hpp>
#include <iostream>
#include <complex>
#include <cstdlib>
+#define myllround(x) ((long long)((x) + 0.5))
+
namespace po = boost::program_options;
/***********************************************************************
@@ -61,7 +62,6 @@ void benchmark_rx_rate(uhd::usrp::multi_usrp::sptr usrp, const std::string &rx_c
uhd::time_spec_t last_time;
const double rate = usrp->get_rx_rate();
- issue_new_stream_cmd:
uhd::stream_cmd_t cmd(uhd::stream_cmd_t::STREAM_MODE_START_CONTINUOUS);
cmd.time_spec = usrp->get_time_now() + uhd::time_spec_t(0.05);
cmd.stream_now = (buffs.size() == 1);
@@ -74,7 +74,7 @@ void benchmark_rx_rate(uhd::usrp::multi_usrp::sptr usrp, const std::string &rx_c
case uhd::rx_metadata_t::ERROR_CODE_NONE:
if (had_an_overflow){
had_an_overflow = false;
- num_dropped_samps += boost::math::iround((md.time_spec - last_time).get_real_secs()*rate);
+ num_dropped_samps += myllround((md.time_spec - last_time).get_real_secs()*rate);
}
break;
@@ -82,11 +82,6 @@ void benchmark_rx_rate(uhd::usrp::multi_usrp::sptr usrp, const std::string &rx_c
had_an_overflow = true;
last_time = md.time_spec;
num_overflows++;
- if (rx_stream->get_num_channels() > 1)
- {
- rx_stream->issue_stream_cmd(uhd::stream_cmd_t::STREAM_MODE_STOP_CONTINUOUS);
- goto issue_new_stream_cmd;
- }
break;
default: