Ignore:
Timestamp:
08-04-10 23:06:52 (3 years ago)
Author:
thomas
Message:
  • morituri/program/cdparanoia.py: Add some debug.
  • morituri/common/encode.py: Add more debug. Handle the case where peak is full scale, and peakdB thus 0, which triggered not setting self.peak.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/morituri/common/encode.py

    r363 r367  
    124124    """ 
    125125 
     126    logCategory = 'EncodeTask' 
     127 
    126128    description = 'Encoding' 
    127129    peak = None 
     
    245247        for p in s['peak']: 
    246248            if self._peakdB < p: 
     249                self.log('higher peakdB found, now %r', self._peakdB) 
    247250                self._peakdB = p 
    248251 
     
    257260        task.Task.stop(self) 
    258261 
    259         if self._peakdB: 
     262        if self._peakdB is not None: 
     263            self.debug('peakdB %r', self._peakdB) 
    260264            self.peak = math.sqrt(math.pow(10, self._peakdB / 10.0)) 
     265        else: 
     266            self.warning('No peak found, something went wrong!') 
Note: See TracChangeset for help on using the changeset viewer.