fix some bad return values
make a function call per chunk, not per sample.