bbcmicrobit / micropython

Port of MicroPython for the BBC micro:bit
https://microbit-micropython.readthedocs.io
Other
603 stars 284 forks source link

Docs describe AudioFrame as list of signed ints instead of uints #686

Closed aule closed 2 years ago

aule commented 4 years ago

The documentation for the audio module describes an AudioFrame with

An AudioFrame object is a list of 32 samples each of which is a signed byte (whole number between -128 and 127).

https://github.com/bbcmicrobit/micropython/blob/v1.0.1/docs/audio.rst#classes

which does not match the examples included below on the same page. Looking at the struct definition, it is actually an unsigned byte:

https://github.com/bbcmicrobit/micropython/blob/e10a5ffdbaf1cc40a82a665d79343c7b6b78d13b/inc/microbit/modaudio.h#L19

Looks like it was changed five years ago and the docs were never updated.