refactor output-related stuff into output.c
output_sample_rate is a redundant member name