microbit-foundation / micropython-microbit-v2

Temporary home for MicroPython for micro:bit v2 as we stablise it before pushing upstream
MIT License
41 stars 22 forks source link

`microphone.record()` with negative values crashes/locks up #183

Closed microbit-carlos closed 2 months ago

microbit-carlos commented 3 months ago

Using the latest version (at the time of writing) of the recording & playback branch: https://github.com/microbit-foundation/micropython-microbit-v2/commit/0b06914c71c18533da90df85230ac198578669bf Hex: https://github.com/microbit-foundation/micropython-microbit-v2/actions/runs/8416237764?pr=163

>>> microphone.record(0)
<AudioFrame>
>>> microphone.record(-1)
# Hangs here
>>> microphone.record(1000, -1)
# Hangs here

Ctrl+C and Ctrl-D don't work either.

dpgeorge commented 2 months ago

Now fixed on the PR/branch.