File tree 1 file changed +10
-1
lines changed
lang/en/typeshed/stdlib/microbit 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -71,14 +71,23 @@ def set_threshold(event: SoundEvent, value: int) -> None:
71
71
...
72
72
73
73
def sound_level () -> int :
74
- """Get the sound pressure level.
74
+ """Get the sound pressure level in the range 0 to 255 .
75
75
76
76
Example: ``microphone.sound_level()``
77
77
78
78
:return: A representation of the sound pressure level in the range 0 to 255.
79
79
"""
80
80
...
81
81
82
+ def sound_level_db () -> int :
83
+ """Get the sound pressure level in decibels.
84
+
85
+ Example: ``microphone.sound_level_db()``
86
+
87
+ :return: A representation of the sound pressure level in decibels (dB).
88
+ """
89
+ ...
90
+
82
91
def record (duration : int , rate : int = 7812 ) -> AudioFrame :
83
92
"""Record sound into an ``AudioFrame`` for the amount of time indicated by
84
93
``duration`` at the sampling rate indicated by ``rate``.
You can’t perform that action at this time.
0 commit comments