discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss-gnuradio] usrp1_source_base, usrp_standard_rx::read, and 512 nb


From: Chris Stankevitz
Subject: [Discuss-gnuradio] usrp1_source_base, usrp_standard_rx::read, and 512 nbytes
Date: Wed, 10 Dec 2008 12:37:46 -0800
User-agent: Thunderbird 2.0.0.18 (X11/20081201)

usrp1_source_base.cc has this chunk of code that reads from usrp_standard_rx:

//----------
while (output_index < noutput_items)
{
  int nbytes = ninput_bytes_reqd_for_noutput_items (
    noutput_items - output_index);

  nbytes = std::min (nbytes, BUFSIZE);

  int result_nbytes = d_usrp->read (buf, nbytes, &overrun);
//----------

Question: What guarantees that nbytes is a multiple of 512?

According to usrp_basic.h, nbytes must be a multiple of 512. It seems to me that nouput_items would need to be specially crafted upstream so that nbytes is a multiple of 512.

Thank you,

Chris




reply via email to

[Prev in Thread] Current Thread [Next in Thread]