audio: fix handling of sample_rate and channels count.