* 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.
Each field of keywords.txt is separated by a single true tab. When you use multiple tabs it causes the field to be interpreted as empty. On Arduino IDE 1.6.5 and newer an empty KEYWORD_TOKENTYPE causes the default editor.function.style coloration to be used (as with KEYWORD2, KEYWORD3, LITERAL2). On Arduino IDE 1.6.4 and older it causes the keyword to not be recognized for any special coloration.
Reference:
https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5:-Library-specification#keywords
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.
Hans-J. Ubben found a bug where the pinout wasn't being set properly on
ESP32s because the builtInDAC member was not set before calling SetPinout.
Fix per his suggestion.
The ID3 reader was incorrectly skipping extended headers and was
cutting off the last 10 bytes of the last ID3 entry. Correct per
http://id3.org specs.
Fixes#41
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.
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.
Check for NULL input data buffers and set values to NULL after freeing()
local variables to avoid memory corruption on use-after-freee.
Add lots of error injection in the host testing to help find bugs on
the PC where they're easier to debug.
Check for NULL input data buffers and set values to NULL after freeing()
local variables to avoid memory corruption on use-after-freee.
Add lots of error injection in the host testing to help find bugs on
the PC where they're easier to debug.
When the input file(stream) doesn't open, you could end up calling
mp3::stop() which would try and mad_finish structures that were
not yet initialized. Now carry a flag when these are set, and only
_finish when it's set.