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
Patch 21c07c0bcd702e7adf3db349ac926914b98d17ce was applied to the TSF's
original code, but not to the fixed-point generator used by the ESP8266.
Apply it to the FP unit as well.
Spotted by Marc Madaule
Velocity in the MIDI format goes from 1...127, so scale the volume of
the note generator by /128 instead of /256. Increases volume of all
notes by 2x linearly (3dB).
Found by Marc Madaule
Valgrind identified cases where the chunk read position came out to be
-1, which was causing a read of memory before the actual cache buffers.
This could result in add'l noise on playback.
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.
Keep track of how many values are actually good in the buffer (before it
was always guaranteed to be the full size) and when EOF is detected,
only shift out valid, good bytes, and return STOP when the unused bytes
are 0 or unchanged from the last pass.
Fixes#265
Merge the upstream changes to the FLAC library up to commit
7a35c528495b6d8a51e87e007f6810b5553101bc.
Shouldn't have any real impact to existing code.
Tested with the example and runs well.
LibTinySoundFont has been modified significantly since I forked
it to do the ESP8266 edits. Update to latest merges.
Tested using the LittleFS MIDI example and seems to work well.
Seems like VSCODE and others try and compile all files in a directory,
even if they aren't used. Because the spiram-fast had ESP8266-only
registers, it caused an error when attempting to build anything for the
ESP32.
Update by writing a new SPI class based version of the spiram-fast class
(tested on the ESP8266) which uses the SPI wrapper class.
Fixes#253
* 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.
The BCK and WS pins aren't needed or used when using the I2SNoDAC
option. Restore their settings to whatever they were before, leaving
them untouched. Apps may configure the additional pins either before or
after the I2SNoDac is created.
* Modified ReadWAVInfo method to give meaingful messages to Serial when it cannot read a WAV file, and also added code to handle WAV files that contain JUNK data, which is a valid part of the WAV specification.
* Added error messages to ReadWAVInfo function using Serial.printf_P(PSTR(
Added error messages to begin function using Serial.printf_P(PSTR(
Implemented skipping through JUNK (as defined in the WAV specification), if present in the WAV file.
* Added new lines to error messages in the "begin" function
* Fix hanging sound on WAV stop for ESP32
* Fix hanging sound on AAC stop for ESP32
* Fix hanging sound on MIDI stop for ESP32
* Fix hanging sound on MOD stop for ESP32
* Fix hanging sound on MP3a stop for ESP32
* Fix hanging sound on RTTTL stop for ESP32
* make dma_buf_count configurable by user, so we can have a larger dma buffer on esp32
* fix comment about interrupt priority (see esp-idf documentation system/intr_alloc)
Fixes#114
Adobe Audition WAV files have a slightly different but legal header
format. Enable that format (only for PCM, not a/ulaw or anything else)
to be decoedd properly.
Add in a WAV object test that can run on hosts and valgrind.
When the ID3 tag had >64 bytes of data for an element, there was a
1-byte out of bounds access, causing a crash at some later point in
time. Properly limit writes to the ID3 field buffer.
Fixes#104
The I2S outputs were converting samples in the buffer passed in
from u8->s16 on every call. When the I2S was full, however, the
sample would not get pushed and the output function would be
called at a later time with the same buffer...which was already
at 16 bits. It'd be converted again and turned into a high
frequency noise on the output.
Now only modify a copy of the input sample in I2S and I2SNoDAC.
Fixes the conversion problem competely.
Fixes#2
An I2S bug in core ESP8266 Arduino was causing the square wave to fail,
not an I2S DAC problem. Move back to the square wave and save some
PROGMEM space and make it simpler and faster.
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.