File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
lang/en/typeshed/stdlib/microbit Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -169,7 +169,7 @@ class AudioRecording:
169169 def __init__ (
170170 self ,
171171 duration : int = - 1 ,
172- rate : int = 11_000
172+ rate : int = 7_812
173173 ):
174174 """Create a new ``AudioRecording``.
175175
@@ -190,6 +190,8 @@ class AudioRecording:
190190 def track (self , start_ms : int = 0 , end_ms : int = - 1 ) -> AudioTrack :
191191 """Create an ``AudioTrack`` instance from a portion of the data in this ``AudioRecording`` instance.
192192
193+ Out-of-range values will be truncated to the recording limits. If ``end_ms`` is lower than ``start_ms``, an empty track will be created.
194+
193195 Example: ``first_second = my_recording.track(0, 1000)``
194196
195197 :param start_ms: (default=0) Where to start of the track in milliseconds.
@@ -212,7 +214,7 @@ class AudioTrack:
212214
213215 When the input buffer has an associated rate (e.g. an ``AudioRecording``
214216 or ``AudioTrack``), the rate is copied. If the buffer object does not have
215- a rate, the default value of 11_000 is used.
217+ a rate, the default value of 7_812 is used.
216218
217219 Example: ``my_track = AudioTrack(bytearray(4096))``
218220
Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ def sound_level_db() -> int:
8888 """
8989 ...
9090
91- def record (duration : int , rate : int = 11_000 ) -> AudioRecording :
91+ def record (duration : int , rate : int = 7_812 ) -> AudioRecording :
9292 """Record sound into an ``AudioRecording`` for the amount of time indicated by
9393 ``duration`` at the sampling rate indicated by ``rate``.
9494
You can’t perform that action at this time.
0 commit comments