simplify code a bit by using pa_sample_size_of_format()