Let's assume you're working with 1 input and output stream. If the interpolator block doesn't do it for you (I think it does, so try to inherit from that code), 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? -- Michael Dickens [EMAIL PROTECTED] _______________________________________________ Discuss-gnuradio mailing list [email protected] http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
