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:
169
169
def __init__ (
170
170
self ,
171
171
duration : int = - 1 ,
172
- rate : int = 11_000
172
+ rate : int = 7_812
173
173
):
174
174
"""Create a new ``AudioRecording``.
175
175
@@ -190,6 +190,8 @@ class AudioRecording:
190
190
def track (self , start_ms : int = 0 , end_ms : int = - 1 ) -> AudioTrack :
191
191
"""Create an ``AudioTrack`` instance from a portion of the data in this ``AudioRecording`` instance.
192
192
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
+
193
195
Example: ``first_second = my_recording.track(0, 1000)``
194
196
195
197
:param start_ms: (default=0) Where to start of the track in milliseconds.
@@ -212,7 +214,7 @@ class AudioTrack:
212
214
213
215
When the input buffer has an associated rate (e.g. an ``AudioRecording``
214
216
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.
216
218
217
219
Example: ``my_track = AudioTrack(bytearray(4096))``
218
220
Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ def sound_level_db() -> int:
88
88
"""
89
89
...
90
90
91
- def record (duration : int , rate : int = 11_000 ) -> AudioRecording :
91
+ def record (duration : int , rate : int = 7_812 ) -> AudioRecording :
92
92
"""Record sound into an ``AudioRecording`` for the amount of time indicated by
93
93
``duration`` at the sampling rate indicated by ``rate``.
94
94
You can’t perform that action at this time.
0 commit comments