* morituri/common/common.py:
Add an argument for the delimiter in formatting. * morituri/common/encode.py: Most programs use peak volume, not power, so do this too.
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
2009-06-04 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||
|
||||
* morituri/common/common.py:
|
||||
Add an argument for the delimiter in formatting.
|
||||
* morituri/common/encode.py:
|
||||
Most programs use peak volume, not power, so do this too.
|
||||
|
||||
2009-06-04 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||
|
||||
* morituri/test/common.py:
|
||||
|
||||
@@ -46,14 +46,14 @@ def msfToFrames(msf):
|
||||
|
||||
return 60 * FRAMES_PER_SECOND * int(m) + FRAMES_PER_SECOND * int(s) + int(f)
|
||||
|
||||
def framesToMSF(frames):
|
||||
def framesToMSF(frames, frameDelimiter=':'):
|
||||
f = frames % FRAMES_PER_SECOND
|
||||
frames -= f
|
||||
s = (frames / FRAMES_PER_SECOND) % 60
|
||||
frames -= s * 60
|
||||
m = frames / FRAMES_PER_SECOND / 60
|
||||
|
||||
return "%02d:%02d:%02d" % (m, s, f)
|
||||
return "%02d:%02d%s%02d" % (m, s, frameDelimiter, f)
|
||||
|
||||
def framesToHMSF(frames):
|
||||
# cdparanoia style
|
||||
|
||||
@@ -94,8 +94,8 @@ class EncodeTask(task.Task):
|
||||
I set tags too.
|
||||
I also calculate the peak level of the track.
|
||||
|
||||
@param peak: the peak power, from 0.0 to 1.0. To get the peak volume,
|
||||
square root this value.
|
||||
@param peak: the peak volume, from 0.0 to 1.0. This is the sqrt of the
|
||||
peak power.
|
||||
@type peak: float
|
||||
"""
|
||||
|
||||
@@ -213,4 +213,4 @@ class EncodeTask(task.Task):
|
||||
self.debug('set state to NULL')
|
||||
task.Task.stop(self)
|
||||
|
||||
self.peak = math.pow(10, self._peakdB / 10.0)
|
||||
self.peak = math.sqrt(math.pow(10, self._peakdB / 10.0))
|
||||
|
||||
Reference in New Issue
Block a user