Skip to content

Document TileGrid limitation to tile values 0..255 & improve mp3 doc #6245

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions shared-bindings/audiomp3/MP3Decoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,20 @@
//| :param typing.BinaryIO file: Already opened mp3 file
//| :param ~circuitpython_typing.WriteableBuffer buffer: Optional pre-allocated buffer, that will be split in half and used for double-buffering of the data. If not provided, two buffers are allocated internally. The specific buffer size required depends on the mp3 file.
//|
//| Playback of mp3 audio is CPU intensive, and the
//| exact limit depends on many factors such as the particular
//| microcontroller, SD card or flash performance, and other
//| code in use such as displayio. If playback is garbled,
//| skips, or plays as static, first try using a "simpler" mp3:
//|
//| * Use constant bit rate (CBR) not VBR or ABR (variable or average bit rate) when encoding your mp3 file
//| * Use a lower sample rate (e.g., 11.025kHz instead of 48kHz)
//| * Use a lower bit rate (e.g., 32kbit/s instead of 256kbit/s)
//|
//| Reduce activity taking place at the same time as
//| mp3 playback. For instance, only update small portions of a
//| displayio screen if audio is playing. Disable auto-refresh
//| and explicitly call refresh.
//|
//| Playing a mp3 file from flash::
//|
Expand Down
2 changes: 2 additions & 0 deletions shared-bindings/displayio/TileGrid.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@
//| convert the value and its location to a display native pixel color. This may be a simple color
//| palette lookup, a gradient, a pattern or a color transformer.
//|
//| To save RAM usage, tile values are only allowed in the range from 0 to 255 inclusive (single byte values).
//|
//| tile_width and tile_height match the height of the bitmap by default.
//|
//| :param Bitmap,OnDiskBitmap,Shape bitmap: The bitmap storing one or more tiles.
Expand Down