Announcement (2017-05-07): www.ruby-forum.com is now read-only since I
unfortunately do not have the time to support and maintain the forum any
more. Please see rubyonrails.org/community and ruby-lang.org/en/community
for other Rails- und Ruby-related community platforms.

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

On Wed, 2008-12-10 at 12:37 -0800, Chris Stankevitz wrote:
>> int result_nbytes = d_usrp->read (buf, nbytes, &overrun);> //---------->> Question: What guarantees that nbytes is a multiple of 512?
In the usrp1_source_base constructor, a call is made to
set_output_multiple(n), which tells the scheduler to only call the work
function to produce a multiple of n samples:
http://gnuradio.org/trac/browser/gnuradio/trunk/gr...
-Johnathan