The numberOfInputs property of the AudioNode returns the number of inputs feeding the node. Source nodes are defined as nodes having a numberOfInputs property with a value of 0.
numberOfInputs
int get numberOfInputs;