a2dpsink: Process right amount of data with sbc_encode
sbc_encode()
can only process data with at least this->codesize
bytes.
When encode_buffer()
is called with less then codesize bytes, accumulate those bytes in a temporary buffer up to codesize length, then SBC encode them.
Maximum size for SBC buffer is (subbands * blocks * channels * 2) with max subbands = 8, max blocks = 16, max channels = 2, i.e. 512.