Commit Graph

10 Commits

Author SHA1 Message Date
Earle F. Philhower, III b3c41668a2
Fix GCC12.3 new warnings for RP2040 (#679)
* Fix GCC12.3 new warnings for RP2040

* Remove OPUS encoder, not supported on embedded
2024-04-16 16:32:16 -07:00
Earle F. Philhower, III 2069060574
Add RP2040 build (#530)
Fix examples to build on RP2040
Clean up generator warnings
No SPDIF on RP2040 (yet)
Add back C sources for AAC on ARM
No WiFi streaming on RP2040
No webradio on RP2040
No talking clock (NTP) on RP2040 either
2022-05-18 21:03:37 -07:00
david gauchard 1ca965b474
(WIP) updates for c++17 - opened for discussion (#249)
* updates for c++17

* picked upstream fix on Earle's advice
21c07c0bcd/tsf.h (L829-L839)
(simplified PR)

* remove `register`
2020-04-16 15:38:14 -07:00
Earle F. Philhower, III 8ffebe6496 Enable static allocated buffers, no dynamic malloc
Because we are allocating objects totaling over 80% of the ESP8266 memory
space, we are very sensitive to memory fragmentation.  While we can control
our own allocs, the IP and SDK can allocate any size, at any time, which
can cause us to not be able to find the large contiguous memory areas we need
for the codes.

Work around this by preallocating, before anything else, buffer memory and
never freeing it.  Pass this memory into the codec and it will allocate from
this block and be guaranteed to always succeed.

This may fix the last of the hangs on the webradio/http streaming, which only
seemed to happen after a stop/start cycle.
2018-01-21 13:02:05 -08:00
Earle F. Philhower, III 68e557fdaa Remove ESP8266 compile warning in layer3.c 2018-01-19 22:28:00 -08:00
Earle F. Philhower, III e84123e03d Clean up ESP32 compile warnings, use audio PLL
Remove a couple compiler warnings found when building for the ESP32.

Enable the high-precision audio PLL as clock source on ESP32.
2018-01-18 10:01:32 -08:00
tueddy 03aa2467f0 Porting for ESP-32 (#33)
* support ESP-32
* make compile with ESP-32/arduino platform
* fixed: use libmad on ESP8266 as original
2018-01-18 08:55:03 -08:00
Earle F. Philhower, III 2d25b16f09 Preallocate all memory and move imdct_s to progmem
Because the mp3 player is a long living object and needs to allocate
large contiguous chunks on each frame, it is safer to allocate the
large xr[] and tmp[] arrays at the beginning.  Add them to the frame
structure which lives the entire time the mp3 object is alive.  No
heap allocations are now used by the mp3 player.

Move the imdct_s[] array to progmem, but do a memcpy_P() to stack
as the macros may cause a 16-bit access after optimization.  It's only
36 words long and each data is read, anyway, so this doesn't increase
the CPU work significantly.
2018-01-01 11:41:31 -08:00
Earle F. Philhower, III cce9ceaffd Try and allocate inner loop mem on stack
Check the available stack space, and if large enough use a stack
variable for the inner loop.  If not, fall back to heap allocation.
2017-12-12 16:57:20 -08:00
Earle F. Philhower, III 2cf8fcef2a Bring in files from original projects
The library was originally part of several separate projects.  Make the
needed structure and bring those files in, including some READMEs.
2017-08-12 09:01:42 -07:00