On Wed, 2008-12-10 at 12:37 -0800, Chris Stankevitz wrote:
> 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?

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-usrp/src/usrp1_source_base.cc#L63

-Johnathan




_______________________________________________
Discuss-gnuradio mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to