Commit Graph
9 Commits
Author SHA1 Message Date
Earle F. Philhower, III 0b5da0e9dd Add PWMAudio support for the RP2040 (#597)
Uses the RP2040 HW PWM generator to provide a stereo audio signal.
2023-01-03 17:08:56 -08:00
Christian Ferbar 074dfd47b0 Allow playing wav files via HTTPStream (#224)
* ReadWAVInfo(): print error message if seek() fails

* AudioFileSourceHTTPStream::seek() print error message - not implemented

* AudioFileSourceBuffer::seek if SEEK_CUR and seek_len < writePtr keep the buffer (fix for HTTPStream)

* Update AudioFileSourceBuffer.cpp
2019-11-24 08:52:50 -07:00
bootrino abee116aa2 Added failure messages to ReadWAVInfo, also handled JUNK in WAV (#171)
* 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
2019-05-12 08:32:40 -07:00
Maigre 87fbcadd80 Call output->stop() when stopping generators (#174)
* 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
2019-04-12 16:17:10 -07:00
Earle F. Philhower, III 955b1d29b2 Fix WAV header decode, add WAV host test
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.
2018-08-03 12:02:52 -07:00
Earle F. Philhower, III 0c002cd014 Obey data size field, avoid WAV clicks w/metadata
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.
2018-01-10 08:04:39 -08:00
Earle F. Philhower, III fece88a9be Add loop method to all input and outputs
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.
2017-11-24 10:35:20 -08:00
Earle F. Philhower, III 0a453a077a Warning and static removal
Clean up compiler warnings and make static variables in class functions
into class variables where they belong.
2017-08-15 20:58:16 -07:00
Earle F. Philhower, III 2cf8fcef2a Bring in files from original projects
The library was originally part of several separate projects.  Make the
needed structure and bring those files in, including some READMEs.
2017-08-12 09:01:42 -07:00