[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] Block with two or more outputs, with different si
Re: [Discuss-gnuradio] Block with two or more outputs, with different sizes
Wed, 9 May 2012 17:50:44 -0400
On Wed, May 9, 2012 at 3:06 PM, André Selva <address@hidden> wrote:
> I'm creating a signal processing block in C++, and I want my block to
> separate the source information into two different outputs, according to a
> pattern. The problem is that the outputs have different sizes, and, as a I
> return noutput_items in the work method, the outputs are completed with
> zeros until they have all the same size. Is it possible to have different
> output sizes in the block?
> André F. B. Selva
You can call "produce(which_output, how_many_items)" yourself inside
the work function. When you return, instead of returning
noutput_items, return WORK_CALLED_PRODUCE (or -2). The 'produce'
handles updating the write buffers, and the return tells the scheduler
not to do anything more with the pointers.
I've never used this myself, so be careful :)