[Top][All Lists]

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

[Discuss-gnuradio] Simple GR_SYNC_BLOCK

From: Daniel Garcia
Subject: [Discuss-gnuradio] Simple GR_SYNC_BLOCK
Date: Wed, 7 Mar 2007 09:59:02 -0800 (PST)

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 trying to take a diff then do a cumsum on the

Can someone point me in the right direction?


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_items; ii++) {
          out[ii] = in[ii + 1] - in[ii];
        for (int ii = 0; ii < noutput_items; ii++) {
          d_cumsum = out[i] + d_cumsum;
          out[ii] = d_cumsum;

        return noutput_items;

8:00? 8:25? 8:40? Find a flick in no time 
with the Yahoo! Search movie showtime shortcut.

reply via email to

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