Taken smart padding code using LPC extrapolation from vorbis/opus. Padding is done on both beginning and ending, but enc_delay and padding remains the same (we discard extra padding frame introduced on our side after encoding).