On Fri, Sep 21, 2012 at 1:18 PM, cjpatton <cjpat...@ucdavis.edu> wrote: > Tom and Kyle, > > Thanks for your replies. Suppose I want in[0] to refer to the beginning of > the new data. Then I could do this: > > const float *in = (const float *) input_items[history()-1]; > > So in[noutput_items-1] is the last? Thanks! > > Chris
Chris, Close. Remember that input_buffers is a vector of buffers. So you want the first buffer and then offset it. I think this should work: > const float *in = (const float *)(&input_items[0][history()-1]); A good one to look at is the gr_quadrature_demod_cf block where the history is set to 2 and the work function has: const float *in = (const float *) input_items[0]; in++; So the 'in++' sets the pointer forward that one sample so that in[i-1] is valid. Tom _______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio