On 02/20/2014 01:46 PM, Activecat wrote: > I need to create a interpolator block which has a callback function to > change its interpolation factor on the fly. > > If this block is inherited from gr::sync_interpolator, its interpolation > factor cannot be changed on the fly because the interpolation factor is > an argument of its constructor. > > The alternative is to inherit from gr::block instead. If the > set_output_multiple() could be called on the fly, then the problem is > solved. > > The problem is, the set_output_multiple() could not be changed on the fly ! > http://lists.gnu.org/archive/html/discuss-gnuradio/2010-11/msg00504.html > > Any solution to this? > The objective is to create an interpolator block that its interpolation > factor could be changed on the fly.
Well, in a ::block you can do whatever you like with your in- and output buffers. Also, forecast() is called all the time, and its behaviour can by dynamic. So, between those you should be able to figure something out. 1) Edit forecast() 2) in general_work(), check if buffer sizes work 3) produce() and consume() as required MB _______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio