Use buffer length to calculate buffer when bit streaming.
Add AudioInputPin support

This allows us to control the buffer count (number of available
samples).