Block question


#1

two interrelated questions here:

  1. in a block with minimum output streams = 1 and maximum = 1, do I need
    to know if the output stream is not connected and not try to fill the
    output buffer at all (or will outputitems be 0?)
    and 2) if yes, how do I get a count of the number of connected streams?

#2

Brett L. Trotter wrote:

two interrelated questions here:

  1. in a block with minimum output streams = 1 and maximum = 1, do I need
    to know if the output stream is not connected and not try to fill the
    output buffer at all (or will outputitems be 0?)
    and 2) if yes, how do I get a count of the number of connected streams?

drat- should have proof read that. minimum was meant to be 0.
please excuse…


#3

On Sat, 2008-11-22 at 13:47 -0600, Brett L. Trotter wrote:

Brett L. Trotter wrote:

two interrelated questions here:

  1. in a block with minimum output streams = 1 and maximum = 1, do I need
    to know if the output stream is not connected and not try to fill the
    output buffer at all (or will outputitems be 0?)
    and 2) if yes, how do I get a count of the number of connected streams?

Check the length of the output_items array, that tells you how many
outputs are connected. You still need to return the proper value from
the work function, even if there are no outputs.

-Johnathan