The buffer size is determined with a call to this API:
AudioRecord.getMinBufferSize(SampleRate,channelConfig, audioFormat);
This is the minimum acceptable buffer size based on the parameters.
The input and output features are not related to each other. You can use them both at the same time. You will encounter a "positive feedback" problem if the microphone will catch the output.
See the walkie talkie example:
Walkie Talkie - Audio streaming over Wifi or Bluetooth