discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] custom work function gets into an endless loop


From: Sylvain Munaut
Subject: Re: [Discuss-gnuradio] custom work function gets into an endless loop
Date: Mon, 28 Sep 2015 15:14:32 +0200

> /    void
>     bbframer_bb_impl::forecast (int noutput_items, gr_vector_int
> &ninput_items_required)
>     {
>         ninput_items_required[0] = ((noutput_items - 32) / 8); // 32 bit
> postamble
>     }/

You should make sure forecast can never return <0 or even ==0 numbers.
Returning 0 means you can produce output without input and the only
valid case for it is either a 'source' block, or if you _know_ that
you have currently buffered data and you can produce output without
any further inputs.


Cheers,

   Sylvain



reply via email to

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