Skip to content

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

Closed
@microbit-carlos

Description

@microbit-carlos

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
>>> 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions