Skip to content

Commit 7cb5277

Browse files
Duration doesn't have a default in practice
I've flagged this in the docs - it's possible the implementation will be corrected instead.
1 parent 609444f commit 7cb5277

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,11 @@ def sound_level() -> int:
7070
"""
7171
...
7272

73-
def record(duration: int = 3000, rate: int = 7812) -> AudioFrame:
73+
def record(duration: int, rate: int = 7812) -> AudioFrame:
7474
"""Record sound into an ``AudioFrame`` for the amount of time indicated by
7575
``duration`` at the sampling rate indicated by ``rate``.
7676
77-
Example: ``my_frame = microphone.record()``
77+
Example: ``my_frame = microphone.record(3000)``
7878
7979
The amount of memory consumed is directly related to the length of the
8080
recording and the sampling rate. The higher these values, the more memory
@@ -95,7 +95,7 @@ def record_into(buffer: AudioFrame, rate: int = 7812, wait: bool = True) -> None
9595
"""Record sound into an existing ``AudioFrame`` until it is filled,
9696
or the ``stop_recording()`` function is called.
9797
98-
Example: ``microphone.record_into()``
98+
Example: ``microphone.record_into(my_frame)``
9999
100100
:param buffer: An ``AudioFrame`` to record sound.
101101
:param rate: Number of samples to capture per second.

0 commit comments

Comments
 (0)