Apparently PortAudio considers 0 to be an invalid number of inputs,
so pass NULL for the input parameters if input has zero channels.