diff options
author | Josh Blum <josh@joshknows.com> | 2011-10-05 11:59:27 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-11-03 20:37:10 -0700 |
commit | a629bbe7e3c39a10bdc3a981f6badb85a436b443 (patch) | |
tree | 58036a96d8fa045ce8900821b073f9f5a441f683 /host/examples/rx_ascii_art_dft.cpp | |
parent | e89b20da1511f02d887435d093d8efef3e4df261 (diff) | |
download | uhd-a629bbe7e3c39a10bdc3a981f6badb85a436b443.tar.gz uhd-a629bbe7e3c39a10bdc3a981f6badb85a436b443.tar.bz2 uhd-a629bbe7e3c39a10bdc3a981f6badb85a436b443.zip |
uhd: updated examples to use new streamer interface
Diffstat (limited to 'host/examples/rx_ascii_art_dft.cpp')
-rw-r--r-- | host/examples/rx_ascii_art_dft.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/host/examples/rx_ascii_art_dft.cpp b/host/examples/rx_ascii_art_dft.cpp index 11a0ccc24..14b83fb65 100644 --- a/host/examples/rx_ascii_art_dft.cpp +++ b/host/examples/rx_ascii_art_dft.cpp @@ -147,6 +147,10 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ UHD_ASSERT_THROW(ref_locked.to_bool()); } + //create a receive streamer + uhd::streamer_args stream_args("fc32"); //complex floats + uhd::rx_streamer::sptr rx_stream = usrp->get_rx_streamer(stream_args); + //allocate recv buffer and metatdata uhd::rx_metadata_t md; std::vector<std::complex<float> > buff(num_bins); @@ -162,10 +166,8 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ //------------------------------------------------------------------ while (true){ //read a buffer's worth of samples every iteration - size_t num_rx_samps = usrp->get_device()->recv( - &buff.front(), buff.size(), md, - uhd::io_type_t::COMPLEX_FLOAT32, - uhd::device::RECV_MODE_FULL_BUFF + size_t num_rx_samps = rx_stream->recv( + &buff.front(), buff.size(), md ); if (num_rx_samps != buff.size()) continue; |