It will always be the number of samples in the input buffer, so just use that directly instead of passing it as a separate parameter.