summary refs log tree commit diff
path: root/pkgs/development/python-modules/pydub/pyaudioop-python3.patch
blob: 58c56db5b8a5eecbac65a6aa201ed4b90fccaf01 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
diff --git i/pydub/pyaudioop.py w/pydub/pyaudioop.py
index 8f8f017..aa6bb8c 100644
--- i/pydub/pyaudioop.py
+++ w/pydub/pyaudioop.py
@@ -1,4 +1,4 @@
-import __builtin__
+import builtins
 import math
 import struct
 from fractions import gcd
@@ -79,7 +79,7 @@ def _get_minval(size, signed=True):
 def _get_clipfn(size, signed=True):
     maxval = _get_maxval(size, signed)
     minval = _get_minval(size, signed)
-    return lambda val: __builtin__.max(min(val, maxval), minval)
+    return lambda val: builtins.max(min(val, maxval), minval)
 
 
 def _overflow(val, size, signed=True):
@@ -109,7 +109,7 @@ def max(cp, size):
     if len(cp) == 0:
         return 0
 
-    return __builtin__.max(abs(sample) for sample in _get_samples(cp, size))
+    return builtins.max(abs(sample) for sample in _get_samples(cp, size))
 
 
 def minmax(cp, size):
@@ -117,8 +117,8 @@ def minmax(cp, size):
 
     max_sample, min_sample = 0, 0
     for sample in _get_samples(cp, size):
-        max_sample = __builtin__.max(sample, max_sample)
-        min_sample = __builtin__.min(sample, min_sample)
+        max_sample = builtins.max(sample, max_sample)
+        min_sample = builtins.min(sample, min_sample)
 
     return min_sample, max_sample
 
@@ -542,4 +542,4 @@ def lin2adpcm(cp, size, state):
 
 
 def adpcm2lin(cp, size, state):
-    raise NotImplementedError()
\ No newline at end of file
+    raise NotImplementedError()