From: Paul Brossier Date: Thu, 18 Feb 2010 18:55:07 +0000 (+0000) Subject: tests/api/: fix gain computation X-Git-Tag: 0.3.2~187 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=7f7f994cc8037a2a94bbfeb719f5fc58817548bc;p=timeside.git tests/api/: fix gain computation --- diff --git a/tests/api/test_lolevel.py b/tests/api/test_lolevel.py index e5457fa..8f34b93 100644 --- a/tests/api/test_lolevel.py +++ b/tests/api/test_lolevel.py @@ -35,7 +35,7 @@ print "Creating encoder with id=%s for: %s" % (Encoder.id(), destination) encoder = Encoder(destination) gain = 1 -if max_level > 1: +if max_level > 0: gain = 0.9 / max_level effect = examples.Gain(gain) diff --git a/tests/api/test_pipe.py b/tests/api/test_pipe.py index 1aafd69..2296f31 100644 --- a/tests/api/test_pipe.py +++ b/tests/api/test_pipe.py @@ -15,7 +15,7 @@ duration = examples.Duration() (decoder | maxlevel | duration).run() gain = 1 -if maxlevel.result() > 1: +if maxlevel.result() > 0: gain = 0.9 / maxlevel.result() print "input maxlevel: %f" % maxlevel.result()