Skip to content

Commit b90c486

Browse files
Add WIP audio.sound_level stub
To be updated once there is a doc for it.
1 parent 79b44b6 commit b90c486

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lang/en/typeshed/stdlib/microbit/audio.pyi

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@ def is_playing() -> bool:
2828
:return: ``True`` if audio is playing, otherwise ``False``."""
2929
...
3030

31+
def sound_level() -> int:
32+
"""Returns the average intensity of the sound played.
33+
34+
Example: ``audio.sound_level()``
35+
36+
:return: A number between 0 and 254, being the average intensity of the sound played from the most recent chunk of data."""
37+
...
38+
3139
def stop() -> None:
3240
"""Stop all audio playback.
3341

0 commit comments

Comments
 (0)