Fixing I/O loop for recording+transmitting audio

The space used in the buffer would gradually become truncated when fewer bytes than the requested amount are read. If a single byte is read in a single read operation, for example, the maximum number of bytes requested from that point forward would be a single byte.