From: Pierre Ossman Date: Tue, 20 Jun 2006 15:36:28 +0000 (+0000) Subject: Make fix_metrics() exit early so that it doesn't spam the output needlessly. X-Git-Tag: 1.0_branch~3476 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=07edf591771e719a5616ca11319f644fbf66f576;p=profile%2Fivi%2Fpulseaudio.git 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 --- diff --git a/src/utils/padsp.c b/src/utils/padsp.c index af89f8f..3b8ecbf 100644 --- a/src/utils/padsp.c +++ b/src/utils/padsp.c @@ -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? */