discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] `s < d_bufsize' failed.


From: Charles Swiger
Subject: Re: [Discuss-gnuradio] `s < d_bufsize' failed.
Date: Mon, 01 May 2006 18:56:17 -0400

On Mon, 2006-05-01 at 15:05 -0700, Eric Blossom wrote:
> > but modern compilers deallocate the index when the loop
> > is completed (one web page says), so the fix is to use:
> > 
> > 
> >   for (int k = 0; k < noutput_items; k++){
> >     ...
> >     out_sample[k] = interp_sample;
> >     ...
> >   }
> > 
> >   return noutput_items;
> 
> As long as there's no early exit from the loop ;)
> 
> Otherwise:
> 
>   int k = 0;
>   for (k = 0; k < noutput_items; k++){
>     ...
>     out_sample[k] = interp_sample;
>     ...
>   }
> 
>   return k;

That's the correct fix - the "int k = 0" above was a self inflicted
wound as there was already an "unsigned int k" declared outside the
loop.

IANAC++P ;)

With that fix in place, data appears from the equalizer and field sync
demux is searching for sync.

--Chuck






reply via email to

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