cut buffer sizes in half
remove pointless writephase reset
maxsize argument
fix off-by-one error with negative rates