diff options
Diffstat (limited to 'gr-uhd/lib/uhd_simple_sink.cc')
-rw-r--r-- | gr-uhd/lib/uhd_simple_sink.cc | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/gr-uhd/lib/uhd_simple_sink.cc b/gr-uhd/lib/uhd_simple_sink.cc index 499ae4d6e..a22b52421 100644 --- a/gr-uhd/lib/uhd_simple_sink.cc +++ b/gr-uhd/lib/uhd_simple_sink.cc @@ -31,7 +31,7 @@ **********************************************************************/ boost::shared_ptr<uhd_simple_sink> uhd_make_simple_sink( const std::string &args, - const std::string &type + const uhd::io_type_t::tid_t &type ){ return boost::shared_ptr<uhd_simple_sink>( new uhd_simple_sink(args, type) @@ -43,15 +43,13 @@ boost::shared_ptr<uhd_simple_sink> uhd_make_simple_sink( **********************************************************************/ uhd_simple_sink::uhd_simple_sink( const std::string &args, - const std::string &type + const uhd::io_type_t &type ) : gr_sync_block( "uhd sink", - gr_make_io_signature(1, 1, get_size(type)), + gr_make_io_signature(1, 1, type.size), gr_make_io_signature(0, 0, 0) -){ - _type = type; +), _type(type){ _dev = uhd::simple_device::make(args); - _sizeof_samp = get_size(type); } uhd_simple_sink::~uhd_simple_sink(void){ @@ -86,8 +84,8 @@ int uhd_simple_sink::work( while(total_items_sent < size_t(noutput_items)){ size_t items_sent = _dev->get_device()->send( boost::asio::buffer( - (uint8_t *)input_items[0]+(total_items_sent*_sizeof_samp), - (noutput_items-total_items_sent)*_sizeof_samp + (uint8_t *)input_items[0]+(total_items_sent*_type.size), + (noutput_items-total_items_sent)*_type.size ), metadata, _type ); total_items_sent += items_sent; |