Skip to content

Commit

Permalink
src: Update test_record.py to use mult for volume.
Browse files Browse the repository at this point in the history
Signed-off-by: Damien George <[email protected]>
  • Loading branch information
dpgeorge committed Aug 21, 2024
1 parent 69a5da3 commit c0ea61a
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/test_record.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,7 @@
while button_a.is_pressed():
sleep(50)
display.clear()
# amplify volume
GAIN = 2
#my_recording *= GAIN
for i in range(len(my_track)):
my_track[i] = max(0, min(128 + GAIN * (my_track[i] - 128), 255))
my_track *= 2 # amplify volume
if button_b.is_pressed():
audio.play(my_track, wait=False)
level = 0
Expand Down

0 comments on commit c0ea61a

Please sign in to comment.