Make fix_metrics() exit early so that it doesn't spam the output needlessly.

git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1046 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
Pierre Ossman 2006-06-20 15:36:28 +00:00
parent 1342999b51
commit 07edf59177

View file

@ -673,6 +673,13 @@ static void fix_metrics(fd_info *i) {
char t[PA_SAMPLE_SPEC_SNPRINT_MAX];
fs = pa_frame_size(&i->sample_spec);
/* Don't fix things more than necessary */
if ((i->fragment_size % fs) == 0 &&
i->n_fragments >= 2 &&
i->fragment_size > 0)
return;
i->fragment_size = (i->fragment_size/fs)*fs;
/* Number of fragments set? */