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
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.
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.
* 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.
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.
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.
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.
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.
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.
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.
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 .
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!
@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.
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.
All objects can have a metadata and/or status report callback once created.
They will call the source program with the parsed ID3 tag, ICY StreamTitle,
or text and numeric error ID of any interesting event. It is up to the end
application to figure out what to do with this. Normally, you'd just print
it to the LCD or Serial port. But it is possible to detect, say, a buffer
overflow and then switch to a lower bitrate stream for example.
ID3 tags can now automatically give your app a callback with different tag
types without any additional work on your application. See the PlayMP3 example
for a very simple example of AudioFileSourceID3's use.
The buffer class seems to work very well to avoid hiccups while
streaming from the web, so add it by default to the example to
make it easier for users to cut-n-paste and make it work.
AACs can now be played back on the ESP8266 thanks to the RealNetworks
Helix project's AAC decoder. SBR is *not* supported, as there is not
enough RAM in the system to support it.
AudioGeneratorMIDI plays a .MID file using any Soundfont2 wavetable
synthesis file. This is a highly hacked combination of TinySoundFont
and MIDITONES, and requires the FastROMFS to run at real-time in most
cases.
Ported libFLAC v1.3.2 to the ESP8266. Moved CRC constants to PROGMEM
and the error strings. Still to be done would be decreasing the output
buffer to an int16_t and moving a larce number of "const int" to enums
since "const int" eats 4 bytes per variable.
Implements a simple and stupid HTTP stream reader to allow for ShoutCast
and other MP3 radio streaming to happen. Presently seems to stutter on
128K, 44.1KHz streams, but may be better on lower bitrates.