File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
lang/en/typeshed/stdlib/microbit Expand file tree Collapse file tree 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:
7171 ...
7272
7373def sound_level () -> int :
74- """Get the sound pressure level.
74+ """Get the sound pressure level in the range 0 to 255 .
7575
7676 Example: ``microphone.sound_level()``
7777
7878 :return: A representation of the sound pressure level in the range 0 to 255.
7979 """
8080 ...
8181
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+
8291def record (duration : int , rate : int = 7812 ) -> AudioFrame :
8392 """Record sound into an ``AudioFrame`` for the amount of time indicated by
8493 ``duration`` at the sampling rate indicated by ``rate``.
You can’t perform that action at this time.
0 commit comments