Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SoundEffect vol_start/vol_end parameters and attributes accepts values up to 2492 #129

Closed
microbit-carlos opened this issue Sep 21, 2022 · 1 comment
Milestone

Comments

@microbit-carlos
Copy link
Contributor

Up to value 2492 works, although anything above 255 (the max value) sounds as loud:

>>> audio.SoundEffect(vol_start=2492, vol_end=2492)
SoundEffect(500, 2500, 500, 2492, 2492, 3, 0, 18)
>>> audio.SoundEffect().vol_start = 2492
>>> audio.SoundEffect().vol_end = 2492
>>> 

2493 starts to throw exceptions indicating the max value is 9999.

>>> audio.SoundEffect(vol_start=2493)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: maximum value is 9999
>>> audio.SoundEffect(vol_end=2493)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: maximum value is 9999
>>> audio.SoundEffect().vol_start = 2493
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: maximum value is 9999
>>> audio.SoundEffect().vol_end = 2493
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: maximum value is 9999
>>> 
@microbit-carlos microbit-carlos added this to the 2.1.0 milestone Sep 21, 2022
dpgeorge added a commit that referenced this issue Sep 26, 2022
Addresses issue #129.

Signed-off-by: Damien George <damien@micropython.org>
@dpgeorge
Copy link
Collaborator

Fixed by de38138

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants