]> git.parisson.com Git - timeside.git/commitdiff
bugfix
authoryomguy <yomguy@parisson.com>
Thu, 17 Feb 2011 15:00:17 +0000 (15:00 +0000)
committeryomguy <yomguy@parisson.com>
Thu, 17 Feb 2011 15:00:17 +0000 (15:00 +0000)
timeside/analyzer/max_level.py

index 6bcad1a37f54f3bb7f288b5dd1848ecb020fda14..e60a047b513dcb6f530c3389c0126049f17df490 100644 (file)
@@ -32,7 +32,7 @@ class MaxLevel(Processor):
     @interfacedoc
     def setup(self, channels=None, samplerate=None, nframes=None):
         super(MaxLevel, self).setup(channels, samplerate, nframes)
-        self.value = -120
+        self.value = -140
 
     @staticmethod
     @interfacedoc
@@ -50,7 +50,7 @@ class MaxLevel(Processor):
         return "dB"
 
     def process(self, frames, eod=False):
-        max = round(20*numpy.log(frames.max()), 3)
+        max = numpy.round(20*numpy.log(frames.max()), 3)
         if max > self.value:
             self.value = max
         return frames, eod