No description
Find a file
Jeff Epler f8afdcb729 Add audiodelays & audioeffects to unix coverage port
.. and add a very basic audioeffects test, showing that it plausibly
is working

I had to address several build errors that occurred in the Unix build,
mostly related to conversion from FP types to integral types (replaced
by explicit casts) and by
accidental mixing of regular & f-suffixed floating constants (replaced
with the MICROPY_FLOAT_CONST macro)

Particularly this change could use consideration:
```diff
-    self->max_echo_buffer_len = self->sample_rate / 1000.0f * max_delay_ms * (self->channel_count * sizeof(uint16_t)); // bytes
+    self->max_echo_buffer_len = (uint32_t)(self->sample_rate / 1000.0f * max_delay_ms) * (self->channel_count * sizeof(uint16_t)); // bytes
```

The buffer length is being calculated in floating point based on the
millisecond delay & the sample rate. The result could then be a fractional
number such as 529.2 for a 12ms delay at 44.1kHz. Multiplying a floating
number by the size required for each echo buffer item
(`(self->channel_count * sizeof(uint16_t))`) could yield a number of bytes
that doesn't correspond to an integral number of buffer items. I grouped
the float->int conversion so that it converts the number of echo buffer
items to an integer and then multiplies by the size of the item.
2024-11-05 09:36:18 -06:00
.codespell add formatting/spelling exceptions 2024-07-29 18:59:59 -04:00
.devcontainer another trailing whitespace. Note that trailing whitespace is valid markdown for a line-break 2024-03-21 11:24:44 +01:00
.github more yaml syntax fixes 2024-11-04 12:18:22 -06:00
data merge from 8.2.9 2023-12-06 14:18:01 -05:00
devices/ble_hci fix ble_serial_connected() 2024-10-03 16:55:00 -04:00
docs Additional rotation detail 2024-09-24 17:18:07 -04:00
examples non-conflict merge changes 2024-09-05 14:54:18 -04:00
extmod add static to 'extmod/vfs_fat.c: fat_vfs_label_obj' 2024-10-04 16:55:35 +08:00
frozen Merge pull request #9469 from dhalbert/merge-from-micropython-v1.22.2 2024-08-21 18:11:19 -04:00
lib mbedtls: avoid function that only exists on rp2040 2024-11-04 18:29:46 -06:00
LICENSES updates before header conversion 2024-05-17 14:56:28 -04:00
locale Translated using Weblate (Portuguese (Brazil)) 2024-10-23 03:15:48 +02:00
logo non-conflict merge changes 2024-09-05 14:54:18 -04:00
mpy-cross change remaining STATIC to static 2024-09-03 17:40:07 -04:00
ports Add audiodelays & audioeffects to unix coverage port 2024-11-05 09:36:18 -06:00
py Throw TypeError when json-serializing invalid types 2024-11-04 09:16:44 -06:00
shared merge from main 2024-09-10 16:36:32 -04:00
shared-bindings Update loop docstrings to demonstrate BlockInput implementation. 2024-11-04 11:25:51 -06:00
shared-module Add audiodelays & audioeffects to unix coverage port 2024-11-05 09:36:18 -06:00
supervisor fix ble_serial_connected() 2024-10-03 16:55:00 -04:00
tests Add audiodelays & audioeffects to unix coverage port 2024-11-05 09:36:18 -06:00
tools support setups with all modules in src-directory 2024-09-30 09:08:10 +02:00
.codespellrc fix typos (partial) detected by codepell 2023-03-18 22:17:02 +07:00
.git-blame-ignore-revs top: Update .git-blame-ignore-revs for latest format/spell commits. 2024-03-07 16:29:46 +11:00
.gitattributes merge from main 2024-07-29 17:41:46 -04:00
.gitignore MPy v1.22 merge: initial merge; not compiled yet 2024-07-25 15:16:24 -04:00
.gitmodules MDNS hostname match DHCP. Fix collision mangling 2024-10-08 15:01:47 -07:00
.mailmap More updates to mailmap based on git shortlog inspection 2024-07-26 12:40:04 -05:00
.pre-commit-config.yaml Merge pull request #9469 from dhalbert/merge-from-micropython-v1.22.2 2024-08-21 18:11:19 -04:00
.readthedocs.yml non-conflict merge changes 2024-09-05 14:54:18 -04:00
.rosie.yml Add license to some obvious files. 2020-07-06 19:16:25 +01:00
ACKNOWLEDGEMENTS Merge MicroPython 1.12 into CircuitPython 2021-05-03 14:01:18 -07:00
ACKNOWLEDGEMENTS.license Add license to some obvious files. 2020-07-06 19:16:25 +01:00
BUILDING.md rename ports/nrf to ports/nordic 2024-03-19 17:36:57 -04:00
CODE_OF_CONDUCT.md restore CODE_OF_CONDUCT.md 2023-10-23 19:34:45 -04:00
conf.py conf.py: remove deprecated get_html_theme_path() 2024-10-08 16:29:35 -04:00
CONTRIBUTING.md fix documentation typo 2024-08-23 03:42:31 +00:00
LICENSE non-conflict merge changes 2024-09-05 14:54:18 -04:00
LICENSE_MicroPython non-conflict merge changes 2024-09-05 14:54:18 -04:00
main.c Improve ESP BLE and turn on BLE workflow 2024-06-11 16:21:40 -07:00
Makefile make coverage improvement 2024-08-17 14:59:29 -04:00
MANIFEST.in-stubs refine stubs-building procedure 2021-06-22 08:59:05 -05:00
pyproject.toml non-conflict merge changes 2024-09-05 14:54:18 -04:00
README.rst Fix typo in README 2024-09-16 18:05:48 -04:00
README.rst-stubs Actually reduce the README text for the stubs package 2021-06-24 13:41:01 -05:00
requirements-ci.txt only install awscli when required 2023-01-16 17:03:39 +05:30
requirements-dev.txt lift version requirement on cryptography, espressif fixed it 2024-10-24 11:45:10 -05:00
requirements-doc.txt pin sphinx temporarily while debugging doc build 2024-10-10 18:48:22 -04:00
runtime.py Conditionalize LTO 2022-05-27 12:59:54 -07:00
setup.py-stubs device specific stubs 2024-02-04 14:08:33 -06:00
WEBUSB_README.md Rename esp32s2 port to espressif 2021-09-13 16:44:55 -07:00

CircuitPython
=============

.. image:: https://s3.amazonaws.com/adafruit-circuit-python/CircuitPython_Repo_header_logo.png

|Build Status| |Doc Status| |License| |Discord| |Weblate|

`circuitpython.org <https://circuitpython.org>`__ \| `Get CircuitPython <#get-circuitpython>`__ \|
`Documentation <#documentation>`__ \| `Contributing <#contributing>`__ \|
`Branding <#branding>`__ \| `Differences from Micropython <#differences-from-micropython>`__ \|
`Project Structure <#project-structure>`__

**CircuitPython** is a *beginner friendly*, open source version of Python for tiny, inexpensive
computers called microcontrollers.

This package contains the "stubs", or type definitions for CircuitPython.  With some advanced
editors and other tools, this information can be identify TypeErrors, AttributeErrors, and other
problems before you deploy your code to a device and can even help autocomplete your code.

.. |Build Status| image:: https://github.com/adafruit/circuitpython/workflows/Build%20CI/badge.svg
   :target: https://github.com/adafruit/circuitpython/actions?query=branch%3Amain
.. |Doc Status| image:: https://readthedocs.org/projects/circuitpython/badge/?version=latest
   :target: http://circuitpython.readthedocs.io/
.. |Discord| image:: https://img.shields.io/discord/327254708534116352.svg
   :target: https://adafru.it/discord
.. |License| image:: https://img.shields.io/badge/License-MIT-brightgreen.svg
   :target: https://choosealicense.com/licenses/mit/
.. |Weblate| image:: https://hosted.weblate.org/widgets/circuitpython/-/svg-badge.svg
   :target: https://hosted.weblate.org/engage/circuitpython/?utm_source=widget