Only the WAV and FLAC generators can generate 8-bit values, so it is
more efficient and sane to just have those generators upscale to 16-bit
signed (if necessary) in generation and simplify all the other
Generators and Outputs.
* 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
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.
The DATA chunk has a size field that was ignored. When there was additional
metadata after the chunk, however, it would try and play it leading to
clicks. Store and only read that amount of data now.
Adds a virtual loop() method to the file input and audio output objects.
By default does nothing, but it can be used to prefill buffers/etc. in the
case of a buffered input, or to update a volume meter on an output, etc.
The AudioGenerators all now call it as part of their own loop()s, so there
is no user intervention required to make it work.
Thanks to @armSeb for the idea with his SPI RAM code.