The framework can give you different size input and output buffers. In this case, you would:
nitems = len(input_items[0]) out[:nitems] = input_items[0] You may have to do more checks, of course, because input could be larger than output. On Tue, May 25, 2021 at 5:03 PM Elmore's <[email protected]> wrote: > I am attempting to add an OOT module to my flowgraph. I have generated a > General block which I want to place between an Audio Source and a Multiply > Constant. > > The Audio Source is set at a 48K sample rate. Input and Output are float. > > As a test (I have never tried using an OOT module before) I said: > out[:] = input_items[0] > in an attempt to simply feed the input to the output unmodified. > > I get a run time error: > ValueError: Could not broadcast input array from shape(4800) into > shape(256) > > Obviously I don’t know how to perform the simplest possible operation. > What is wrong here? > > I have tried looking on forums and reading some of the GNU docs but no joy. > > Thanks for any help. > > Jim > > > > > <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient> > Virus-free. > www.avg.com > <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient> > <#m_-109177683565946075_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> >
