Buffering remainders during preprocessing

Avoids extra sample insertion; can lead to a few samples being
discarded at the end of a file