From 606b896cb964c38ddfed0f0e5785237f9a4d0034 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Fri, 26 Feb 2010 18:57:03 -0800 Subject: fix for io types --- host/lib/usrp/usrp2/io_impl.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'host/lib/usrp/usrp2') diff --git a/host/lib/usrp/usrp2/io_impl.cpp b/host/lib/usrp/usrp2/io_impl.cpp index 43334ddc6..c9a7b5fa4 100644 --- a/host/lib/usrp/usrp2/io_impl.cpp +++ b/host/lib/usrp/usrp2/io_impl.cpp @@ -26,8 +26,8 @@ using namespace uhd::usrp; /*********************************************************************** * Constants **********************************************************************/ -typedef std::complex fc32_t; -typedef std::complex sc16_t; +typedef std::complex fc32_t; +typedef std::complex sc16_t; static const float float_scale_factor = pow(2.0, 15); @@ -159,7 +159,7 @@ size_t usrp2_impl::send( const uhd::metadata_t &metadata, const std::string &type ){ - if (type == "fc32"){ + if (type == "32fc"){ size_t num_samps = boost::asio::buffer_size(buff)/sizeof(fc32_t); boost::shared_array raw_mem(new sc16_t[num_samps]); boost::asio::mutable_buffer raw_buff(raw_mem.get(), num_samps*sizeof(sc16_t)); @@ -173,7 +173,7 @@ size_t usrp2_impl::send( return send_raw(raw_buff, metadata); } - if (type == "sc16"){ + if (type == "16sc"){ #ifdef HAVE_BIG_ENDIAN return send_raw(buff, metadata); #else @@ -202,7 +202,7 @@ size_t usrp2_impl::recv( uhd::metadata_t &metadata, const std::string &type ){ - if (type == "fc32"){ + if (type == "32fc"){ size_t num_samps = boost::asio::buffer_size(buff)/sizeof(fc32_t); boost::shared_array raw_mem(new sc16_t[num_samps]); boost::asio::mutable_buffer raw_buff(raw_mem.get(), num_samps*sizeof(sc16_t)); @@ -218,7 +218,7 @@ size_t usrp2_impl::recv( return num_samps; } - if (type == "sc16"){ + if (type == "16sc"){ #ifdef HAVE_BIG_ENDIAN return recv_raw(buff, metadata); #else -- cgit v1.2.3