[SCM] morituri/master: * 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.
js at users.alioth.debian.org
js at users.alioth.debian.org
Sun Oct 19 20:09:05 UTC 2014
The following commit has been merged in the master branch:
commit 3883205ed19243f2c904ff7a87a4aecd205d8ced
Author: Thomas Vander Stichele <thomas (at) apestaart (dot) org>
Date: Thu Jun 4 09:04:19 2009 +0000
* 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.
diff --git a/ChangeLog b/ChangeLog
index f591ba8..a2b4a31 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
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:
Add a method for diffing multiline strings.
diff --git a/morituri/common/common.py b/morituri/common/common.py
index dac88bb..5e1c345 100644
--- a/morituri/common/common.py
+++ b/morituri/common/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
diff --git a/morituri/common/encode.py b/morituri/common/encode.py
index c326bbd..22c6349 100644
--- a/morituri/common/encode.py
+++ b/morituri/common/encode.py
@@ -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))
--
morituri packaging
More information about the pkg-multimedia-commits
mailing list