I would take a look at gr_rational_resampler. The forecasting and all of the control stuff should be useful for you.
Matt Achilleas Anastasopoulos wrote: > Michael, > > Thanks for the info. > Indeed I am looking into small numbers of M,N (order of 10) > so this should work. > > Can I ask for a clarification here: > >> If the interpolator block doesn't do it for you (I think it does, so try >> to inherit from that code), > > Since my overall interpolator block is an M/N-interpolator, even if I > inherit from interpolator, it does not force output_multiple to M, > but rather multiples of (M/N), which is not what I want. > I guess I have to inherit from block and do that manually using > set_output_multiple(M), as you suggested. > > am I right? > >> use "set_output_multiple(M)", then make sure >> your "forecast()" function sets the input stream's required items >> correctly (to a multiple of N). "forecast()" will always be called with >> "noutput" being a multiple of "M", which makes finding the required >> items simple (#in = #out * M / N). You should do an "assert(M % N == >> 0)" before before the divide just to be sure it's OK. >> >> Hope this helps! - MLD >> >> On Mon, 10 Apr 2006 09:36:51 -0400, "Achilleas Anastasopoulos" >> <[EMAIL PROTECTED]> said: >> >>> I am trying to write a block that takes N inputs at a time >>> and produces M outputs at a time. >>> Since M>=N this is an interpolator. >>> However, M/N is not neccesarily an integer. >>> >>> Is there an elegant way to force the work() function to >>> process a multiple number of N input samples every time it is called? > _______________________________________________ Discuss-gnuradio mailing list [email protected] http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
