Stateful decimation is mostly working.

I figured out the problem. Right now it will only work when fed 1 sample at a time, but having to handle multiple samples is just an implementation issue.