Re: [Discuss-gnuradio] Simple GR_SYNC_BLOCK

2007-03-07 Thread Eric Blossom
On Wed, Mar 07, 2007 at 09:59:02AM -0800, Daniel Garcia wrote: > > I think I've misunderstood they way GR_SYNC_BLOCK > works. Can someone set me strait? > > I've called set_history(1) in the constructor; I have > one input and one output. I assumed that the in buffer > would contain noutput_items

Re: [Discuss-gnuradio] Simple GR_SYNC_BLOCK

2007-03-07 Thread Daniel Garcia
> 1) That out[i] bothers me. Shouldn't it be out[ii]? Yes, it should. I edited the snippet in the email to remove a bunch of std::cout junk.. mucked that up in the process. > 2) Is there a good reason for doing this in two > passes with two stores > to each memory location? There is a very go

Re: [Discuss-gnuradio] Simple GR_SYNC_BLOCK

2007-03-07 Thread Dan Halperin
Daniel Garcia wrote: work ( int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) { const float *in = (const float *) input_items[0]; float *out = (float *) output_items[0]; for (int ii = 0; ii < noutput_i

[Discuss-gnuradio] Simple GR_SYNC_BLOCK

2007-03-07 Thread Daniel Garcia
I think I've misunderstood they way GR_SYNC_BLOCK works. Can someone set me strait? I've called set_history(1) in the constructor; I have one input and one output. I assumed that the in buffer would contain noutput_items + 1 samples; with in[0] being the history (overlap) from the previous. I'm