Increase min output buffer size (python block)

Hi all,

I am currently working on my DRM receiver and have written a python
block
that returns either 0 or 3200 samples. Everything works fine as long as
I
do not connect its output to another custom python block that consumes
only 1280 samples
per call to general_work(). Both blocks are general blocks. Now I get
this
error message:

File “/usr/local/lib/python2.7/dist-packages/drmrx/freq_sync_py.py”,
line
120, in general_work
out[:self.nfft] = self.correct_freq_offset(in0[:self.nfft])
ValueError: operands could not be broadcast together with shapes (1791)
(3200)
thread[thread-per-block[10]: <gr_block freq_sync_py (23)>]: caught
unrecognized exception

If I understand that correctly, the output buffer of the first block is
too small and therefore cannot take all the samples I’d like to return.
I
tried to call top_block.drmrx_freq_sync_py_0.set_min_output_buffer(3200)
in the python file generated by GRC but it gave me another error:

tb.drmrx_freq_sync_py_0.set_min_output_buffer(3200)
AttributeError: ‘freq_sync_py’ object has no attribute
‘set_min_output_buffer’

Is there a possibility to solve this problem or do I have to find an
alternative solution, e. g. creating an internal buffer?

Best regards
Felix W.

tb.drmrx_freq_sync_py_0.set_min_output_buffer(3200)
AttributeError: ‘freq_sync_py’ object has no attribute
‘set_min_output_buffer’

Is there a possibility to solve this problem or do I have to find an
alternative solution, e. g. creating an internal buffer?

There is an API call set_output_multiple, this sets the minimum reserve
size for buffers. So your worker should only get called with buffers of
at least this size.

-josh