Skip to content

Commit

Permalink
Use tobytes() instead of tostring()
Browse files Browse the repository at this point in the history
  • Loading branch information
supersonicclay authored Feb 5, 2021
1 parent ce76c50 commit da3c154
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def normalize_audio_buffer(buf, volume_percentage, sample_width=2):
arr = array.array('h', buf)
for idx in range(0, len(arr)):
arr[idx] = int(arr[idx]*scale)
buf = arr.tostring()
buf = arr.tobytes()
return buf


Expand Down

0 comments on commit da3c154

Please sign in to comment.