Skip to content

Commit

Permalink
Add WIP audio.sound_level stub
Browse files Browse the repository at this point in the history
To be updated once there is a doc for it.
  • Loading branch information
microbit-grace committed Apr 3, 2024
1 parent 79b44b6 commit b90c486
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lang/en/typeshed/stdlib/microbit/audio.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ def is_playing() -> bool:
:return: ``True`` if audio is playing, otherwise ``False``."""
...

def sound_level() -> int:
"""Returns the average intensity of the sound played.
Example: ``audio.sound_level()``
:return: A number between 0 and 254, being the average intensity of the sound played from the most recent chunk of data."""
...

def stop() -> None:
"""Stop all audio playback.
Expand Down

0 comments on commit b90c486

Please sign in to comment.