Commit Graph
64 Commits
Author SHA1 Message Date
Earle F. Philhower, III b9666d3652 Get ESP32 CI running again (#532)
Get ESP32 CI running again
ESP32 lacks separable CI stuff
ESP32 has broken GCC 8, don't build MIDI examples
2022-05-19 10:48:24 -07:00
Earle F. Philhower, III a6f1eda9a2 Get ESP8266 CI running again (#531)
Add LWIP to ESP8266 builds
New build step on ESP8266
Fix warnings, quiet get.py
Ack SPIFFS deprecation
Example fix
Clean up overzealous pragmas
Fix server.accept() deprecation
2022-05-18 22:12:33 -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
Wouter van der Put c87b662cb6 Fix typo (#504) 2022-03-15 17:59:40 -07:00
Earle F. Philhower, III 86a1818da5 Add codespell to CI checks (#450) 2021-11-28 10:52:33 -08:00
Wouter van der Put b65bc2df8f Fix: add missing SPIFFS.begin() (#443)
Without this fix, there is no sound and the serial monitor shows:

Starting up...

[E][vfs_api.cpp:22] open(): File system is not mounted
[E][vfs_api.cpp:22] open(): File system is not mounted
BEGIN...
MIDI done
MIDI done

After this fix there is sound and no error on the serial monitor.
Then change is similar to the code in https://github.com/earlephilhower/ESP8266Audio/blob/master/examples/PlayMP3FromSPIFFS/PlayMP3FromSPIFFS.ino
2021-11-28 10:31:36 -08:00
pintomax c55abbfba5 Stream MP3 from HTTP to SPDIF (#436)
Stream MP3 from HTTP to SPDIF
2021-11-02 19:55:43 -07:00
Hideaki Tai f974af9bf3 Add AudioFileSourceFunction which can generate sound from functions (#383) 2021-04-11 18:37:38 -07:00
Hideaki Tai 9b4f36009b Fix compile error due to insufficient capacity (#384) 2021-04-11 13:57:55 -07:00
david gauchard 6ecb6afe30 API to force HTTPv1.0 allowing streaming clean data from some servers (#363) 2021-01-27 16:27:04 -08:00
david gauchard 3349608b11 StreamOnHost: play audio on host (#359)
* StreamOnHost: actually play audio

* (spaces)

* fix comment

* update message
2021-01-08 07:41:03 -08:00
david gauchard 0cee4d410e Proposal for various tiny fixes (#357)
* replace a disappeared shoutcast url by a working one from another example

* increase a buffer size (found by valgrind)

* make emulated example closer to the not emulated one
use `./onHost diff` to show the diff -u

* add `diff` option to onHost script

* add a delay to local copy of AudioOutputNull

* increase another buffer size

* make AudioOutputNullSlow.h compatible with arduino api (not only emulation on host)
2021-01-02 15:09:01 -08:00
david gauchard 1c51669729 test/run on host, output to null device (#299)
* test/run on host to null device

* compilation fix
2020-08-30 15:07:11 -07:00
Earle F. Philhower, III fae26d4010 Add Opus file format (and OGG demux) (#294)
Add ported versions of the Opus codec, OpusFile parser, and OGG demuxer
from Xiph.org.

Only works on the ESP32 due to memory limitations (of opusfile,
strangely enough, and not because of opus compression).

Adds a basic example and a host test.

Fixes #278
2020-08-11 20:56:13 -07:00
Earle F. Philhower, III f8d5ccf7d0 Add ESP32 build, break out ESP8266 install for CI (#288)
Re-enable ESP32 builds in CI

Fix examples which do not compile on ESP32
2020-08-08 16:40:21 -07:00
Earle F. Philhower, III 0f40d83241 Use GitHub CI to run tests (#287) 2020-08-08 15:36:06 -07:00
Earle F. Philhower, III e0d413622c Add Talkie (TI speech synthesizer) support (#269)
Rewrite https://github.com/going-digital/Talkie to work in the
ESP8266Audio framework.  Allows sync and async speech.

Add a very annoying talking clock example.
2020-05-13 20:16:48 -07:00
Earle F. Philhower, III 580706d7e3 Add LittleFS file source, MIDI example
LittleFS reads many times faster than SPIFFS, and is now in the ESP8266,
so include a file source for it and move the MIDI example to LittleFS.

Keep the SPIFFS as ESP32 doesn't support LittleFS yet.
2020-04-15 11:19:56 -07:00
Earle F. Philhower, III 7df1e005e5 Use same SSID/password settings as core examples (#252) 2020-04-14 22:33:10 -07:00
Earle F. Philhower, III 0fd2d0413b Replace external SPIRAM lib w/internal optimized (#250)
* Replace external SPIRAM lib w/internal optimized

Instead of requiring everyone to download and install another Arduino
library to use this lib, include an optimized, self-contained one from
the 8266 VM PR: https://github.com/esp8266/Arduino/pull/6994

Does change the API as it now requires a HW chip select, so that
parameter is removed from the SpiRAM buffer object.

* Redo the FIFO to try and be faster

* Fix the SPI interface, buffering.

SPI FIFO needs special care so do all work in a RAM copy and the copy it
over manually w/32b writes.

Ensure the SPI command is done before touching the FIFO.

Fix buffering organization.

Make the buffer report status as a #### bar.

* Fix infinite wait on EOF

* Add SW chip select support

* Update URL to one that's live today

* Clean up metadata printout

* Clean up readme refs to obsolete lib

* Slow down the DIO->SIO reset sequence

* Update readme to remove old SPIRam library ref

Also add the resistor to the 1T circuit to avoid transistor overheating.
2020-04-14 15:41:47 -07:00
david gauchard aba310d3a0 webradio: example: http: gently listen to the end of the sentence before saying goodbye (#245) 2020-03-24 20:06:03 -07:00
Ivan Kostoski 377b271edd ESP8266 SinglePinI2SDriver, SPDIF output improvements, FLAC memory optimization (#237)
* Added S/PDIF output using I2S peripheral

* Added AudioOutputSPDIF to README and PROGMEM changes

* SPDIF/I2S sample rate fixes

* Fix SPDIF example file name

* Minimal (single pin) I2S driver

* AudioOutputSPDIF changes for minimal I2S driver

* Documentation changes

* FLAC decoding memory optimization
2020-02-24 09:55:30 -08:00
Ivan Kostoski a7a8b917d2 Added S/PDIF output using I2S peripheral (#235)
* Added S/PDIF output using I2S peripheral

* Added AudioOutputSPDIF to README and PROGMEM changes
2020-02-07 13:05:03 -08:00
david gauchard 4fed6a230f install and use a global audioLogger instead of Serial (#198)
* use of global audioLogger-> instead of Serial.

* default to silence

* initialize logger in examples
2019-07-24 10:02:21 -07:00
Simon L e6a4e6c886 Document the internal DAC on ESP32 more explicitly (#184)
* Document INTERNAL_DAC explicitly and its usage

* Add INTERNAL_DAC usage comment in example
2019-05-12 08:31:08 -07:00
Earle F. Philhower, III 582e6e70ac Add RTTTL example and use a non-square waveform
Seems like I2S DACs don't like to be presented with perfect bang-bang
square waveforms, so build a very simple model and use that to avoid
abrupt changes in values.  Sounds about as good as you're going to get
with this.

Also add a simple example showing how to play a RTTTL string.
2018-03-26 08:00:56 -07:00
Earle F. Philhower, III 3c7ffbe0b3 Support volume on each input channel
Call stub->SetGain(float) to set an input's volume before mixing.
2018-02-25 14:24:38 -08:00
Earle F. Philhower, III ca50839712 WIP - AudioOutputMixer to combine multiple streams
This runs but amplification is not working yet.  See MixerSample
for a very crufty example.
2018-02-25 13:37:17 -08:00
h3ndrik 4d9d010e8b Fix webradio to use buffer, not raw input streams
Thanks to @h3ndrik, again.
2018-01-31 19:20:08 -08:00
Earle F. Philhower, III 96fc37dce5 Refactor I2S to be cleaner, more extensible
With the multiple I2S modes on the ESP32, it makes sense to use a
cleaner class hierarchy for the I2S tools.  Make I2SNoDAC into a
subclass of I2S (renamed from I2SDAC) and remove about 80% of the
code which was identical exept for the per-sample bitstream synthesis.
2018-01-25 19:15:02 -08:00
Earle F. Philhower, III 93f7d90baf Update WebRadio to use prealloc'd buffers
To avoid allocations in the application, preallocate all decoder and
buffer memory in and then never free it.  Use the new pre-alloc'd
constructors to generate the playback objects.
2018-01-21 15:07:40 -08:00
Earle F. Philhower, III e5d23a4692 Enable Travis-CI builds
Enable automatic building of all examples and SAM(speech) on a
commit by using Travis-CI.  Build against ESP8266 and ESP32.

Minor tweaks to examples and codebase to allow successful compilation
on ESP32 compiler.
2018-01-19 15:57:30 -08:00
Earle F. Philhower, III 94a3f9ab91 Remove hostname setting for ESP32 compatability
The examples were setting a hostname for the WiFi connection, but this is
done via a different call on the ESP32 vs. the ESP8266.  To avoid #ifdef
explosion, simply remove the call as it's unneeded anyway.

Thanks to @reaper7 for reporting this in pull #33.
2018-01-18 10:57:02 -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 d06dcf1123 Include type and volume in checksum, cleanup code 2017-12-24 09:31:36 -08:00
Earle F. Philhower, III e844536251 Fix the URL max limit in web interface
The web interface has a hardcoded 64 char URL limit, even though the
actual url[] array was increased to 96 chars.  Use sizeof(url) in the
handler instead of a hardcoded number to enable use of all space.
Addresses issue #21 , again.
2017-12-22 21:39:13 -08:00
Earle F. Philhower, III 4cb8861070 Fix PROGMEM string accesses in callbacks
The MD and STATUS callbacks can be passed PROGMEM strings, so be sure to
use proper strcpy_p()s to move them to RAM before printing to avoid crashes.
Found during debug of issue #21 .
2017-12-22 21:28:28 -08:00
Earle F. Philhower, III 5b45a79cf7 Fix ICY decoder overflow causing streams to die 2017-12-16 16:16:01 -08:00
Earle F. Philhower, III 397aee8c19 Actually change volume in the HandleVolue callback 2017-12-15 22:18:23 -08:00
Earle F. Philhower, III 0f0b6cd664 Fix EEPROM save/load and corruption on restart
EEPROM saving was not calculating the correct checksum because it was
not clearing memory before writing.  Fix that so it automatically will
restart the connection on a reset.

There was a fatal corruption caused by improper delete'ing of objects
without clearing their pointers when the initial connection to a stream
failed.  Refactor to use the proper StopPlaying() routine.

Extend the URL to 96 characters.  We not have enough memory to do so!
2017-12-15 19:03:03 -08:00
Earle F. Philhower, III 65a6cc4be7 Fix MetadataCallback function signatures
The MD callback now gets a string, not a stream, so update the examples
to compile properly.
2017-12-15 14:58:14 -08:00
Earle F. Philhower, III 8e94702468 Replace Stream with simple string in MD callback
@armSeb found that the stream interface caused a big slowdown and
hiccups in his playback, replace the MetadataCallback's *Stream with
a simple *char for faster operation and less overhead.
2017-12-15 12:54:49 -08:00
Earle F. Philhower, III d923ebef36 Move the callback constant strings to PMEM 2017-12-15 12:03:05 -08:00
Earle F. Philhower, III 634d0b8d02 Store AAC/MP3 flag in EEPROM for WebRadio 2017-12-15 10:31:19 -08:00
Earle F. Philhower, III 9f42358f31 Try and restart a stream 2secs after a disconnect. 2017-12-14 15:58:39 -08:00
Earle F. Philhower, III e3da480772 Add URL save and restore on reboot 2017-12-14 11:09:43 -08:00
Earle F. Philhower, III ee7febe1ec Refactor and store to EEPROM, restore on reboot
Save the current URL to EEPROM on each change, and try and restart it
after a power loss or reset
2017-12-14 10:35:14 -08:00
Earle F. Philhower, III 143c4e65ae Move request buff to stack
Save 384 heap bytes by handling the web request buffering in the loop()
stack context.
2017-12-14 09:47:00 -08:00
Earle F. Philhower, III ec4979e6f5 Fix web page update, move string to PROGMEM 2017-12-14 09:43:19 -08:00
Earle F. Philhower, III 94489c005a Use low-mem web server to save RAM for playback
Instead of ESP8266WebServer, which is something of a RAM hog and has
extensive use of Strings and allocations, use a simpler one with no
dynamic memory allocations at all, borrowed from PsychoPlug
https://github.com/earlephilhower/psychoplug.
2017-12-12 17:06:21 -08:00