summaryrefslogtreecommitdiffstats
path: root/Lib/wave.py
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2010-08-28 17:22:16 (GMT)
committerMark Dickinson <dickinsm@gmail.com>2010-08-28 17:22:16 (GMT)
commit64a38c0eb5b7fd6e4ee5f3e912cff9eda8dd19af (patch)
tree457064e7557fbfd0538aba4e2a42d8acbd6f2328 /Lib/wave.py
parenta62074883b7a32f83b13525b01efb619ae478cdf (diff)
downloadcpython-64a38c0eb5b7fd6e4ee5f3e912cff9eda8dd19af.zip
cpython-64a38c0eb5b7fd6e4ee5f3e912cff9eda8dd19af.tar.gz
cpython-64a38c0eb5b7fd6e4ee5f3e912cff9eda8dd19af.tar.bz2
Issue #1512791: In setframerate method of Wave_write, round non-integral
inputs to the nearest integer. Thanks Neil Tallim for the patch.
Diffstat (limited to 'Lib/wave.py')
-rw-r--r--Lib/wave.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/wave.py b/Lib/wave.py
index 2fa9b6b..950d8e2 100644
--- a/Lib/wave.py
+++ b/Lib/wave.py
@@ -355,7 +355,7 @@ class Wave_write:
raise Error('cannot change parameters after starting to write')
if framerate <= 0:
raise Error('bad frame rate')
- self._framerate = framerate
+ self._framerate = int(round(framerate))
def getframerate(self):
if not self._framerate: