diff options
author | Josh Blum <josh@joshknows.com> | 2012-01-16 23:04:53 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2012-01-26 13:03:09 -0800 |
commit | 9f2aa9235f01b531966a8903583a2044fec1455d (patch) | |
tree | ea0b0d2bbd35c412766c33d7fe83f1381726856a /host/lib/usrp/usrp2 | |
parent | cbeb4305b59d4b9370bfa7c6f5da7597f9de8045 (diff) | |
download | uhd-9f2aa9235f01b531966a8903583a2044fec1455d.tar.gz uhd-9f2aa9235f01b531966a8903583a2044fec1455d.tar.bz2 uhd-9f2aa9235f01b531966a8903583a2044fec1455d.zip |
uhd: add samples per pkt option to rx streamer
Diffstat (limited to 'host/lib/usrp/usrp2')
-rw-r--r-- | host/lib/usrp/usrp2/io_impl.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/host/lib/usrp/usrp2/io_impl.cpp b/host/lib/usrp/usrp2/io_impl.cpp index fd81071fb..e3fa46920 100644 --- a/host/lib/usrp/usrp2/io_impl.cpp +++ b/host/lib/usrp/usrp2/io_impl.cpp @@ -389,7 +389,8 @@ rx_streamer::sptr usrp2_impl::get_rx_stream(const uhd::stream_args_t &args_){ - sizeof(vrt::if_packet_info_t().cid) //no class id ever used ; const size_t bpp = _mbc[_mbc.keys().front()].rx_dsp_xports[0]->get_recv_frame_size() - hdr_size; - const size_t spp = bpp/convert::get_bytes_per_item(args.otw_format); + const size_t bpi = convert::get_bytes_per_item(args.otw_format); + const size_t spp = unsigned(args.args.cast<double>("spp", bpp/bpi)); //make the new streamer given the samples per packet boost::shared_ptr<sph::recv_packet_streamer> my_streamer = boost::make_shared<sph::recv_packet_streamer>(spp); |