Skip to content

Commit 2a5688e

Browse files
authored
Updated to ensure sr is float
1 parent ae43324 commit 2a5688e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

PythonBlueBox.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@
7474
continue
7575

7676
stream.write(array.array('f',
77-
((volume * math.sin(2.0 * math.pi * i * tone[0] / sr) + volume * math.sin(2.0 * math.pi * i * tone[1] / sr))
78-
for i in range(int(sr*length)))).tostring())
77+
((volume * math.sin(2.0 * math.pi * i * tone[0] / float(sr)) + volume * math.sin(2.0 * math.pi * i * tone[1] / float(sr)))
78+
for i in range(sr*int(length)))).tostring())
7979

8080

8181
stream.close()

0 commit comments

Comments
 (0)